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})
+ imm = randint(0, (1<<wid)-1)
+ res.append({'oper_i': oper, 'opim_i': opi,
+ 'imm_i': imm, 'dest_i': dst,
+ 'src1_i': op1, 'src2_i': op2})
return res
def test_iq():
wid = 8
opwid = 4
- qlen = 4
- n_in = 2
- n_out = 3
+ qlen = 2
+ n_in = 1
+ n_out = 1
dut = InstructionQ(wid, opwid, qlen, n_in, n_out)
insns = mk_insns(1000, wid, opwid)