fmin/fmax ok

master
kaqu 1 year ago
parent b9b3f82faa
commit ea794dfa9c
  1. 8
      libmodules/bfloat16nncore.py

@ -205,20 +205,18 @@ class bfloat16NeuralNetworkCore(Module, AutoCSR, AutoDoc, ModuleDoc):
fpu.fmadd
fpu.fmsub
fpu.fnmadd
fpu.fnmsub
fpu.fmin
fpu.fmax
fpu.fnmsub
"""
Loader_fsm.act("Loader_EXEC1",
NextValue(self.b16Status.storage[5], True), # Current status added
NextValue(fpu.fsqrt, True), # This command requested
NextValue(fpu.fmax, True), # This command requested
NextValue(fpu.fready, False), # Engage trigger
NextState("Loader_EXEC2")
)
Loader_fsm.act("Loader_EXEC2",
NextValue(self.b16Status.storage[6], True), # Current status added
If(fpu.fready,
NextValue(fpu.fsqrt, False), # Clear command request
NextValue(fpu.fmax, False), # Clear command request
NextValue(self.b16Result.storage, fpu.fresult[16:32]), # Pick result (little endian, high word!)
NextValue(self.b16Status.storage[15], True), # Indicate readyness ...
NextValue(self.bReady, True), # Indicate readyness (LED on!)

Loading…
Cancel
Save