spr = Signal(10, reset_less=True)
comb += spr.eq(decode_spr_num(self.dec.SPR)) # from XFX
- # XXX BUG - don't use hardcoded magic constants.
- # also use ".value" otherwise the test fails. bit of a pain
- # https://bugs.libre-soc.org/show_bug.cgi?id=603
-
- SPR_PID = 48 # TODO read docs for POWER9
# Microwatt doesn't implement the partition table
- # instead has PRTBL register (SPR) to point to process table
- SPR_PRTBL = 720 # see common.vhdl in microwatt, not in POWER9
+ # instead has PRTBL(SVSRR0) register (SPR) to point to process table
with m.If(((self.dec.op.internal_op == MicrOp.OP_MTSPR) |
(self.dec.op.internal_op == MicrOp.OP_MFSPR)) &
- ((spr == SPR.DSISR) | (spr == SPR.DAR)
- | (spr==SPR_PRTBL) | (spr==SPR_PID))):
+ ((spr == SPR.DSISR.value) | (spr == SPR.DAR.value) |
+ (spr==SPR.SVSRR0.value) | (spr==SPR.PIDR.value))):
comb += self.do_copy("fn_unit", Function.MMU)
with m.Else():
comb += self.do_copy("fn_unit",fn)