reduce regfile port usage for INT and FAST
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 11 Aug 2020 13:37:51 +0000 (14:37 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 11 Aug 2020 13:37:51 +0000 (14:37 +0100)
src/soc/regfile/regfiles.py
src/soc/simple/core.py

index 20826b76dbeb4c70187a1a26ab04f5b178a4302d..c3abdf004f2f89f4c113ac7016caf9636d08c927 100644 (file)
@@ -68,7 +68,8 @@ class IntRegs(RegFileArray):
     def __init__(self):
         super().__init__(64, 32)
         self.w_ports = {'o': self.write_port("dest1"),
-                        'o1': self.write_port("dest2")} # for now (LD/ST update)
+                        #'o1': self.write_port("dest2") # for now (LD/ST update)
+                        }
         self.r_ports = {'ra': self.read_port("src1"),
                         'rbc': self.read_port("src3"),
                         'dmi': self.read_port("dmi")} # needed for Debug (DMI)
@@ -93,7 +94,6 @@ class FastRegs(RegFileArray):
     def __init__(self):
         super().__init__(64, 5)
         self.w_ports = {'fast1': self.write_port("dest3"),
-                        'fast2': self.write_port("dest4"),
                        }
         self.r_ports = {'fast1': self.read_port("src1"),
                         }
index de5fa6cd95131abfe03d2b2b5daf0ffe16ba267a..7da869294584ecdf2cc613307d82cf656dc2b4e1 100644 (file)
@@ -366,6 +366,15 @@ class NonProductionCore(Elaboratable):
         for regfile, spec in byregfiles_wr.items():
             fuspecs = byregfiles_wrspec[regfile]
             wrpickers[regfile] = {}
+
+            # argh, more port-merging
+            if regfile == 'INT':
+                fuspecs['o'] = [fuspecs.pop('o')]
+                fuspecs['o'].append(fuspecs.pop('o1'))
+            if regfile == 'FAST':
+                fuspecs['fast1'] = [fuspecs.pop('fast1')]
+                fuspecs['fast1'].append(fuspecs.pop('fast2'))
+
             for (regname, fspec) in sort_fuspecs(fuspecs):
                 self.connect_wrport(m, fu_bitdict, wrpickers,
                                         regfile, regname, fspec)