add option to disable bus forwarding on SPRs and FAST regs.
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 27 Apr 2021 18:51:02 +0000 (19:51 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 27 Apr 2021 18:51:02 +0000 (19:51 +0100)
not StateRegs: that actually critically depends on access to PC through
bus forwarding

src/soc/regfile/regfiles.py

index 8ac0b123f07968cb0c6b210b8e74521ef7a33d77..1f45ab918bb2bfe1104bb57741e39de7f5549b80 100644 (file)
@@ -100,7 +100,7 @@ class FastRegs(RegFileMem, FastRegsEnum): #RegFileArray):
     Note: r/w issue are used by issuer to increment/decrement TB/DEC.
     """
     def __init__(self, svp64_en=False, regreduce_en=False):
-        super().__init__(64, FastRegsEnum.N_REGS)
+        super().__init__(64, FastRegsEnum.N_REGS, fwd_bus_mode=not regreduce_en)
         self.w_ports = {'fast1': self.write_port("dest1"),
                         'issue': self.write_port("issue"), # writing DEC/TB
                        }
@@ -172,7 +172,8 @@ class SPRRegs(RegFileMem):
             n_sprs = len(SPRreduced)
         else:
             n_sprs = len(SPRfull)
-        super().__init__(width=64, depth=n_sprs)
+        super().__init__(width=64, depth=n_sprs,
+                         fwd_bus_mode=not regreduce_en)
         self.w_ports = {'spr1': self.write_port("spr1")}
         self.r_ports = {'spr1': self.read_port("spr1")}