prtbl = 0x1000000
initial_regs[1] = prtbl
-
-
- initial_sprs = {}
+ initial_sprs = {'DSISR': 0, 'DAR': 0,
+ 720: 0}
self.add_case(Program(lst, bigendian),
initial_regs, initial_sprs)
def spr_to_fast_reg(spr_num):
if not isinstance(spr_num, str):
spr_num = spr_dict[spr_num].SPR
- return sprstr_to_fast[spr_num]
+ return sprstr_to_fast.get(spr_num, None)
def slow_reg_to_spr(slow_reg):
# match behaviour of SPRMap in power_decoder2.py
for i, x in enumerate(SPR):
if sprname == x.name:
- yield sregs[i].reg.eq(val)
print("setting slow SPR %d (%s) to %x" %
(i, sprname, val))
+ yield sregs.memory._array[i].eq(val)
else:
yield fregs.regs[fast].reg.eq(val)
print("setting fast reg %d (%s) to %x" %