From 7d8165c511127319183db8763a65c87ee7e25ea7 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Tue, 4 May 2021 17:02:49 +0100 Subject: [PATCH] note a way to see if an exception happened, in TestIssuer --- src/soc/simple/issuer.py | 9 +++++++++ 1 file changed, 9 insertions(+) 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 -- 2.30.2