From ac0c8772a0e7b487f40af7e9b1ba3f3026a0ebaf Mon Sep 17 00:00:00 2001 From: Cesar Strauss Date: Fri, 1 Jan 2021 09:59:49 -0300 Subject: [PATCH] Disable data value output on NOP --- src/soc/experiment/alu_hier.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 -- 2.30.2