From 6588eb42c4ba417ba486d25151954c570c52d39d Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sun, 14 Feb 2021 13:03:13 +0000 Subject: [PATCH] add Regfiles comments --- src/soc/regfile/regfiles.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/soc/regfile/regfiles.py b/src/soc/regfile/regfiles.py index 27aaecb9..aec56e44 100644 --- a/src/soc/regfile/regfiles.py +++ b/src/soc/regfile/regfiles.py @@ -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): -- 2.30.2