From: Luke Kenneth Casson Leighton Date: Thu, 24 Jun 2021 14:52:25 +0000 (+0100) Subject: propagate new use_svp64_ldst_dec mode through TestCore and TestIssuer X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d1fa49728c44f1054efe442e81a3c0e952743534;p=soc.git propagate new use_svp64_ldst_dec mode through TestCore and TestIssuer --- diff --git a/src/soc/simple/core.py b/src/soc/simple/core.py index a95750cc..84555c37 100644 --- a/src/soc/simple/core.py +++ b/src/soc/simple/core.py @@ -112,6 +112,7 @@ class NonProductionCore(Elaboratable): if self.svp64_en: self.sv_rm = SVP64Rec(name="core_svp64_rm") # SVP64 RM field self.is_svp64_mode = Signal() # set if SVP64 mode is enabled + self.use_svp64_ldst_dec = Signal() # use alternative LDST decoder self.sv_pred_sm = Signal() # TODO: SIMD width self.sv_pred_dm = Signal() # TODO: SIMD width @@ -173,6 +174,11 @@ class NonProductionCore(Elaboratable): if k != self.trapunit: comb += v.sv_rm.eq(self.sv_rm) # pass through SVP64 ReMap comb += v.is_svp64_mode.eq(self.is_svp64_mode) + # only the LDST PowerDecodeSubset *actually* needs to + # know to use the alternative decoder. this is all + # a terrible hack + if k.lower().startswith("ldst"): + comb += v.use_svp64_ldst_dec.eq(self.use_svp64_ldst_dec) # ssh, cheat: trap uses the main decoder because of the rewriting self.des[self.trapunit] = self.e.do diff --git a/src/soc/simple/issuer.py b/src/soc/simple/issuer.py index 879a455a..f28b4581 100644 --- a/src/soc/simple/issuer.py +++ b/src/soc/simple/issuer.py @@ -748,6 +748,9 @@ class TestIssuerInternal(Elaboratable): sync += core.sv_a_nz.eq(pdecode2.sv_a_nz) # and svp64 detection sync += core.is_svp64_mode.eq(is_svp64_mode) + # and svp64 bit-rev'd ldst mode + ldst_dec = pdecode2.use_svp64_ldst_dec + sync += core.use_svp64_ldst_dec.eq(ldst_dec) m.next = "INSN_EXECUTE" # move to "execute"