From: Cesar Strauss Date: Fri, 1 Jan 2021 12:59:49 +0000 (-0300) Subject: Disable data value output on NOP X-Git-Tag: 24jan2021_ls180~46 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ac0c8772a0e7b487f40af7e9b1ba3f3026a0ebaf;p=soc.git Disable data value output on NOP --- diff --git a/src/soc/experiment/alu_hier.py b/src/soc/experiment/alu_hier.py index c01cc26e..39e9cb92 100644 --- a/src/soc/experiment/alu_hier.py +++ b/src/soc/experiment/alu_hier.py @@ -317,11 +317,13 @@ class ALU(Elaboratable): # choose between zero-delay output, or registered with m.If(go_now): - m.d.comb += self.o.data.eq(sub.o) + with m.If(self.o.ok): + m.d.comb += self.o.data.eq(sub.o) m.d.comb += self.cr.ok.eq(self.op.rc.rc) # only present the result at the last computation cycle with m.Elif(alu_done): - m.d.comb += self.o.data.eq(alu_r) + with m.If(self.o.ok): + m.d.comb += self.o.data.eq(alu_r) m.d.comb += self.cr.ok.eq(cr_ok_r) # determine condition register bits based on the data output value