From: Luke Kenneth Casson Leighton Date: Tue, 4 May 2021 16:02:49 +0000 (+0100) Subject: note a way to see if an exception happened, in TestIssuer X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7d8165c511127319183db8763a65c87ee7e25ea7;p=soc.git note a way to see if an exception happened, in TestIssuer --- diff --git a/src/soc/simple/issuer.py b/src/soc/simple/issuer.py index a78eb074..21cf3fe5 100644 --- a/src/soc/simple/issuer.py +++ b/src/soc/simple/issuer.py @@ -594,6 +594,15 @@ class TestIssuerInternal(Elaboratable): comb += next_srcstep.eq(cur_state.svstate.srcstep+1) comb += next_dststep.eq(cur_state.svstate.dststep+1) + # note if an exception happened. in a pipelined or OoO design + # this needs to be accompanied by "shadowing" (or stalling) + el = [] + for exc in core.fus.excs.values(): + el.append(exc.happened) + exc_happened = Signal() + if len(el) > 0: # at least one exception + comb += exc.happened.eq(Cat(*el).bool()) + with m.FSM(name="issue_fsm"): # sync with the "fetch" phase which is reading the instruction