From fa266e2d2b5f4e84b10df1572dff4c946cd104d9 Mon Sep 17 00:00:00 2001 From: Cesar Strauss Date: Tue, 17 Aug 2021 07:13:04 -0300 Subject: [PATCH] Fix activation of cancel signal As an active low signal, the conditions to cancel must be ANDed together. Being active high, exc_o.happened must be inverted. --- src/soc/experiment/compldst_multi.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/soc/experiment/compldst_multi.py b/src/soc/experiment/compldst_multi.py index d47572b4..d7fcb89b 100644 --- a/src/soc/experiment/compldst_multi.py +++ b/src/soc/experiment/compldst_multi.py @@ -455,8 +455,10 @@ class LDSTCompUnit(RegSpecAPI, Elaboratable): comb += self.adr_rel_o.eq(alu_valid & adr_l.q & busy_o) # the write/store (etc) all must be cancelled if an exception occurs + # note: cancel is active low, like shadown_i, + # while exc_o.happpened is active high cancel = Signal(reset_less=True) - comb += cancel.eq(self.exc_o.happened | self.shadown_i) + comb += cancel.eq(~self.exc_o.happened & self.shadown_i) # store release when st ready *and* all operands read (and no shadow) comb += self.st.rel_o.eq(sto_l.q & busy_o & rd_done & op_is_st & -- 2.30.2