block picker hazard on input to PriorityPicker rather than output
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 21 Nov 2021 22:21:52 +0000 (22:21 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 21 Nov 2021 22:21:52 +0000 (22:21 +0000)
reason: another register could be picked if the input is blocked
but if the output is masked out, the picker will sit there with the
highest priority port stopping all others

src/soc/simple/core.py

index fc851d40e3a9303c288c8af820efed45ce606723..c47a9464402659851a9e2ceffaa4dd7d1c6a6aac 100644 (file)
@@ -491,9 +491,9 @@ class NonProductionCore(ControlBase):
 
                 # exclude any currently-enabled read-request (mask out active)
                 comb += pick.eq(fu.rd_rel_o[idx] & fu_active & rdflags[i] &
-                                ~delay_pick)
+                                ~delay_pick & ~hazard_detected)
                 # entirely block anything hazarded from being picked
-                comb += rdpick.i[pi].eq(pick & ~hazard_detected)
+                comb += rdpick.i[pi].eq(pick)
                 comb += fu.go_rd_i[idx].eq(delay_pick) # pass in *delayed* pick
 
                 # if picked, select read-port "reg select" number to port