From 9714aaa4b68260f3d66899f3d7ee53ceaf1c804e Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Thu, 2 Dec 2021 14:56:50 +0000 Subject: [PATCH] add module parameter to regspec_decode and therefore to get_byregfiles as well --- src/soc/simple/core.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/soc/simple/core.py b/src/soc/simple/core.py index bb7f8ce9..68b7132f 100644 --- a/src/soc/simple/core.py +++ b/src/soc/simple/core.py @@ -333,7 +333,7 @@ class NonProductionCore(ControlBase): # rdmask, which is for registers needs to come from the *main* decoder for funame, fu in fus.items(): - rdmask = get_rdflags(self.ireg.e, fu) + rdmask = get_rdflags(m, self.ireg.e, fu) comb += fu.rdmaskn.eq(~rdmask) # sigh - need a NOP counter @@ -643,7 +643,7 @@ class NonProductionCore(ControlBase): rd_hazard = [] # dictionary of lists of regfile read ports - byregfiles_rdspec = self.get_byregfiles(True) + byregfiles_rdspec = self.get_byregfiles(m, True) # okaay, now we need a PriorityPicker per regfile per regfile port # loootta pickers... peter piper picked a pack of pickled peppers... @@ -959,7 +959,7 @@ class NonProductionCore(ControlBase): fus = self.fus.fus regs = self.regs # dictionary of lists of regfile write ports - byregfiles_wrspec = self.get_byregfiles(False) + byregfiles_wrspec = self.get_byregfiles(m, False) # same for write ports. # BLECH! complex code-duplication! BLECH! @@ -1009,7 +1009,7 @@ class NonProductionCore(ControlBase): comb += wvclr.eq(ortreereduce_sig(wvclren)) # clear (regfile write) comb += wvset.eq(ortreereduce_sig(wvseten)) # set (issue time) - def get_byregfiles(self, readmode): + def get_byregfiles(self, m, readmode): mode = "read" if readmode else "write" regs = self.regs @@ -1038,7 +1038,8 @@ class NonProductionCore(ControlBase): # the PowerDecoder2 (main one, not the satellites) contains # the decoded regfile numbers. obtain these now - okflag, regport = regspec_decode(readmode, e, regfile, regname) + okflag, regport = regspec_decode(m, readmode, e, + regfile, regname) # construct the dictionary of regspec information by regfile if regname not in byregfiles_spec[regfile]: -- 2.30.2