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
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
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"