self.xer_in = Signal(3, reset_less=True) # xer might be read
self.xer_out = Signal(reset_less=True) # xer might be written
+ # for the FAST regs (SRR1, SRR2, SVSRR0, CTR, LR etc.)
self.read_fast1 = Data(3, name="fast1")
self.read_fast2 = Data(3, name="fast2")
+ self.read_fast3 = Data(3, name="fast3") # really only for SVSRR0
self.write_fast1 = Data(3, name="fasto1")
self.write_fast2 = Data(3, name="fasto2")
+ self.write_fast3 = Data(3, name="fasto3") # likewise
self.read_cr1 = Data(7, name="cr_in1")
self.read_cr2 = Data(7, name="cr_in2")
return e.read_fast1.ok, e.read_fast1.data
if name == 'fast2':
return e.read_fast2.ok, e.read_fast2.data
+ if name == 'fast3':
+ return e.read_fast3.ok, e.read_fast3.data
# SPR regfile
return e.write_fast1, e.write_fast1.data
if name == 'fast2':
return e.write_fast2, e.write_fast2.data
+ if name == 'fast3':
+ return e.write_fast3, e.write_fast3.data
# SPR regfile
spr2_data = sim.spr[spr2_sel].value
res['fast2'] = spr2_data
+ def get_sim_fast_spr3(res, sim, dec2):
+ fast3_en = yield dec2.e.read_fast3.ok
+ if fast3_en:
+ fast3_sel = yield dec2.e.read_fast3.data
+ spr3_sel = fast_reg_to_spr(fast3_sel)
+ spr3_data = sim.spr[spr3_sel].value
+ res['fast3'] = spr3_data
+
def get_sim_cr_a(res, sim, dec2):
cridx_ok = yield dec2.e.read_cr1.ok
if cridx_ok:
if 'fast2' in inp:
yield alu.p.data_i.fast2.eq(inp['fast2'])
+ def set_fast_spr3(alu, dec2, inp):
+ if 'fast3' in inp:
+ yield alu.p.data_i.fast3.eq(inp['fast3'])
+
def set_cr_a(alu, dec2, inp):
if 'cr_a' in inp:
yield alu.p.data_i.cr_a.eq(inp['cr_a'])