HA! found a bug in MultiCompUnit handling of write-masks
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 31 May 2020 14:58:04 +0000 (15:58 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 31 May 2020 14:58:04 +0000 (15:58 +0100)
src/soc/experiment/compalu_multi.py

index d41fdd64f00bac3890cdb909eb836cda22c0a909..c2faf5bab0fcebf486ab3ecd10a73ab205d3b5f1 100644 (file)
@@ -205,7 +205,8 @@ class MultiCompUnit(RegSpecALUAPI, Elaboratable):
         req_done = Signal(reset_less=True)
         m.d.comb += self.done_o.eq(self.busy_o & ~(self.wr.rel.bool()))
         m.d.comb += wr_any.eq(self.wr.go.bool())
-        m.d.comb += req_done.eq(wr_any & ~self.alu.n.ready_i & (req_l.q == 0))
+        m.d.comb += req_done.eq(wr_any & ~self.alu.n.ready_i & \
+                ((req_l.q & self.wrmask) == 0))
 
         # shadow/go_die
         reset = Signal(reset_less=True)