add Regfiles comments
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 14 Feb 2021 13:03:13 +0000 (13:03 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 14 Feb 2021 13:03:13 +0000 (13:03 +0000)
src/soc/regfile/regfiles.py

index 27aaecb9c7268488d807f23a9d0447614765bd47..aec56e4442efb818e984309bb11f5a9bfb9d0d3b 100644 (file)
@@ -178,6 +178,7 @@ class SPRRegs(RegFileMem):
 class RegFiles:
     def __init__(self):
         self.rf = {}
+        # create regfiles here, Factory style
         for (name, kls) in [('int', IntRegs),
                             ('cr', CRRegs),
                             ('xer', XERRegs),
@@ -185,6 +186,7 @@ class RegFiles:
                             ('state', StateRegs),
                             ('spr', SPRRegs),]:
             rf = self.rf[name] = kls()
+            # also add these as instances, self.state, self.fast, self.cr etc.
             setattr(self, name, rf)
 
     def elaborate_into(self, m, platform):