elif name == 'RC':
if in3_sel == In3Sel.RC.value:
return 3
- assert False, "RC does not exist yet"
elif name in ['EA', 'RS']:
if in1_sel == In1Sel.RS.value:
return 1
mi2 = self.svstate.mi2
mo0 = self.svstate.mo0
mo1 = self.svstate.mo1
- steps = [(self.dec2.in1_step, mi0), # RA
- (self.dec2.in2_step, mi1), # RB
- (self.dec2.in3_step, mi2), # RC
- (self.dec2.o_step, mo0), # RT
- (self.dec2.o2_step, mo1), # EA
+ steps = [[self.dec2.in1_step, mi0], # RA
+ [self.dec2.in2_step, mi1], # RB
+ [self.dec2.in3_step, mi2], # RC
+ [self.dec2.o_step, mo0], # RT
+ [self.dec2.o2_step, mo1], # EA
]
+ if False: # TODO
+ rnames = ['RA', 'RB', 'RC', 'RT', 'RS']
+ for i, reg in enumerate(rnames):
+ idx = yield from get_idx_map(self.dec2, reg)
+ if idx is None:
+ idx = yield from get_idx_map(self.dec2, "F"+reg)
+ if idx == 1: # RA
+ steps[i][0] = self.dec2.in1_step
+ elif idx == 2: # RB
+ steps[i][0] = self.dec2.in2_step
+ elif idx == 3: # RC
+ steps[i][0] = self.dec2.in3_step
+ log("remap step", i, reg, idx, steps[i][1])
remap_idxs = self.remap_idxs
rremaps = []
# now cross-index the required SHAPE for each of 3-in 2-out regs
if shape.value == 0x0:
continue
# now set the actual requested step to the current index
- yield dstep.eq(remap_idx)
+ if dstep is not None:
+ yield dstep.eq(remap_idx)
# debug printout info
- rremaps.append((shape.mode, hex(shape.value),
+ rremaps.append((shape.mode, hex(shape.value), dstep,
i, rnames[i], shape_idx, remap_idx))
for x in rremaps:
log("shape remap", x)
print (sim.gpr.dump())
self._check_regs(sim, expected_regs)
self.assertEqual(sim.svstate.RMpst, 1) # mm=1 so persist=1
- self.assertEqual(sim.svstate.SVme, 0b10010) # RS and RB active
+ self.assertEqual(sim.svstate.SVme, 0b00110) # RS and RB active
# rmm is 0b00001 which means mi0=0 and all others inactive (0)
self.assertEqual(sim.svstate.mi0, 0) # RS
self.assertEqual(sim.svstate.mi1, 1) # RB