disallow overlap in core on LDST, Branch, and Trap.
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 29 Nov 2021 10:26:35 +0000 (10:26 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 29 Nov 2021 10:26:35 +0000 (10:26 +0000)
these are all the ones that could cause exceptions or mess with ordering

src/soc/simple/core.py

index c6c35b66bc970ed4aac42c30054a0c909cc69adc..f8c3c2451fc636c3601ff9913ca2925e47117362 100644 (file)
@@ -427,6 +427,14 @@ class NonProductionCore(ControlBase):
             # and resolved
             with m.If(self.issue_conflict):
                 comb += busy_o.eq(1)
+            # make sure that LDST, Branch and Trap all say "busy"
+            # and do not allow overlap
+            for funame, fu in fus.items():
+                if (funame.lower().startswith('ldst') or
+                    funame.lower().startswith('branch') or
+                    funame.lower().startswith('trap')):
+                    with m.If(fu.busy_o):
+                        comb += busy_o.eq(1)
 
         # return both the function unit "enable" dict as well as the "busy".
         # the "busy-or-issued" can be passed in to the Read/Write port