with m.If(i != bt):
comb += cr_output_arr[i].eq(cr_input_arr[i])
with m.Else():
- comb += cr_output_arr[i].eq(dut.o.cr_o.data)
+ comb += cr_output_arr[i].eq(dut.o.cr.data)
with m.Case(InternalOp.OP_MCRF):
# This does a similar thing to OP_CROP above, with
with m.If(i != bf):
comb += cr_output_arr[i].eq(cr_input_arr[i])
with m.Else():
- comb += cr_output_arr[i].eq(dut.o.cr_o.data)
+ comb += cr_output_arr[i].eq(dut.o.cr.data)
# For the other two, they take the full CR as input, and
# output a full CR. This handles that
# check that data ok was only enabled when op actioned
comb += Assert(dut.o.o.ok == o_ok)
- comb += Assert(dut.o.cr_o.ok == cr_o_ok)
+ comb += Assert(dut.o.cr.ok == cr_o_ok)
comb += Assert(dut.o.full_cr.ok == full_cr_o_ok)
return m
op = self.i.ctx.op
a, b, full_cr = self.i.a, self.i.b, self.i.full_cr
cr_a, cr_b, cr_c = self.i.cr_a, self.i.cr_b, self.i.cr_c
- cr_o, full_cr_o, rt_o = self.o.cr_o, self.o.full_cr, self.o.o
+ cr_o, full_cr_o, rt_o = self.o.cr, self.o.full_cr, self.o.o
xl_fields = self.fields.FormXL
xfx_fields = self.fields.FormXFX
class CROutputData(IntegerData):
regspec = [('INT', 'o', '0:63'), # 64 bit range
('CR', 'full_cr', '0:31'), # 32 bit range
- ('CR', 'cr_o', '0:3')] # 4 bit range
+ ('CR', 'cr', '0:3')] # 4 bit range
def __init__(self, pspec):
super().__init__(pspec)
self.o = Data(64, name="o") # RA
self.full_cr = Data(32, name="cr_out") # CR in
- self.cr_o = Data(4, name="cr_o")
+ self.cr = Data(4, name="cr_o")
def __iter__(self):
yield from super().__iter__()
yield self.o
yield self.full_cr
- yield self.cr_o
+ yield self.cr
def eq(self, i):
lst = super().eq(i)
return lst + [self.o.eq(i.o),
self.full_cr.eq(i.full_cr),
- self.cr_o.eq(i.cr_o)]
+ self.cr.eq(i.cr)]
class CRPipeSpec(CommonPipeSpec):
elif cr_en:
cr_sel = yield dec2.e.write_cr.data
expected_cr = simulator.crl[cr_sel].get_range().value
- real_cr = yield alu.n.data_o.cr_o.data
+ real_cr = yield alu.n.data_o.cr.data
self.assertEqual(expected_cr, real_cr, code)
alu_out = yield alu.n.data_o.o.data
out_reg_valid = yield dec2.e.write_reg.ok