reduce number of FastRegs read ports
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 22 Jul 2020 09:29:58 +0000 (10:29 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 22 Jul 2020 09:30:02 +0000 (10:30 +0100)
src/soc/regfile/regfiles.py
src/soc/simple/issuer.py

index be47754e30969aecef3f67982e53d112ab3b1de7..7bcf5c9ca4bf1185bc533cc1ab99b572b6d1c280 100644 (file)
@@ -73,13 +73,12 @@ class FastRegs(RegFileArray):
                         'msr': self.write_port("dest2"),
                         'fast1': self.write_port("dest3"),
                         'fast2': self.write_port("dest4"),
-                        'd_wr1': self.write_port("d_wr1")} # writing PC
-        self.r_ports = {'cia': self.read_port("src1"),
-                        'msr': self.read_port("src2"),
-                        'fast1': self.read_port("src3"),
-                        'fast2': self.read_port("src4"),
-                        'd_rd1': self.read_port("d_rd1"), # reading PC
-                        'd_rd2': self.read_port("d_rd2")} # reading MSR
+                        'd_wr1': self.write_port("d_wr1")} # writing PC (issuer)
+        self.r_ports = {'cia': self.read_port("cia"), # reading PC (issuer)
+                        'msr': self.read_port("msr"), # reading MSR (issuer)
+                        'fast1': self.read_port("src1"),
+                        'fast2': self.read_port("src2"),
+                        }
 
 
 # CR Regfile
index 10f455866a4f7a51517a1a2ee80536b9dd9a5854..38f94077ff97062fb44ba06920d26ed5a8572b47 100644 (file)
@@ -56,9 +56,9 @@ class TestIssuer(Elaboratable):
         self.memerr_o = Signal(reset_less=True)
 
         # FAST regfile read /write ports for PC and MSR
-        self.fast_r_pc = self.core.regs.rf['fast'].r_ports['d_rd1'] # PC rd
+        self.fast_r_pc = self.core.regs.rf['fast'].r_ports['cia'] # PC rd
         self.fast_w_pc = self.core.regs.rf['fast'].w_ports['d_wr1'] # PC wr
-        self.fast_r_msr = self.core.regs.rf['fast'].r_ports['d_rd2'] # MSR rd
+        self.fast_r_msr = self.core.regs.rf['fast'].r_ports['msr'] # MSR rd
 
         # hack method of keeping an eye on whether branch/trap set the PC
         self.fast_nia = self.core.regs.rf['fast'].w_ports['nia']