From: Luke Kenneth Casson Leighton Date: Sun, 21 Nov 2021 22:44:42 +0000 (+0000) Subject: restrict (refine) hazard selection to the one being picked for this port X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7e546135d2f9ee6933504a49b9df5adb2724c82e;p=soc.git restrict (refine) hazard selection to the one being picked for this port --- diff --git a/src/soc/simple/core.py b/src/soc/simple/core.py index c47a9464..9f3a1141 100644 --- a/src/soc/simple/core.py +++ b/src/soc/simple/core.py @@ -488,10 +488,11 @@ class NonProductionCore(ControlBase): pick = Signal(name="pick_"+name) # picker input rp = Signal(name="rp_"+name) # picker output delay_pick = Signal(name="dp_"+name) # read-enable "underway" + rhazard = Signal(name="rhaz_"+name) # exclude any currently-enabled read-request (mask out active) comb += pick.eq(fu.rd_rel_o[idx] & fu_active & rdflags[i] & - ~delay_pick & ~hazard_detected) + ~delay_pick & ~rhazard) # entirely block anything hazarded from being picked comb += rdpick.i[pi].eq(pick) comb += fu.go_rd_i[idx].eq(delay_pick) # pass in *delayed* pick @@ -535,9 +536,11 @@ class NonProductionCore(ControlBase): # if FU is busy (which doesn't get set at the same time as # issue) and no hazard was detected, clear wvchk_en (i.e. # stop checking for hazards) - with m.If(fu.busy_o & ~hazard_detected): + with m.If(fu.busy_o & ~rhazard): comb += wvchk_en.eq(0) + comb += rhazard.eq((wvchk.o_data & wvchk_en).bool()) + wvens.append(wvchk_en) # or-reduce the muxed read signals