def __init__(self, name, wid, opwid):
RecordObject.__init__(self, name=name)
self.oper_i = Signal(opwid, reset_less=True)
+ self.opim_i = Signal(1, reset_less=True) # src2 is an immediate
self.dest_i = Signal(wid, reset_less=True)
self.src1_i = Signal(wid, reset_less=True)
self.src2_i = Signal(wid, reset_less=True)
res = []
for i in range(n_insns):
op1 = randint(0, (1<<wid)-1)
+ opi = randint(0, 1)
op2 = randint(0, (1<<wid)-1)
dst = randint(0, (1<<wid)-1)
oper = randint(0, (1<<opwid)-1)
- res.append({'oper_i': oper, 'dest_i': dst, 'src1_i': op1, 'src2_i': op2})
+ res.append({'oper_i': oper, 'opim_i': opi, 'dest_i': dst,
+ 'src1_i': op1, 'src2_i': op2})
return res