Merge branch 'master' of https://git.libre-riscv.org/git/soc
[soc.git] / src / scoreboard / test_iq.py
index 9ad5e19297f0af587c807bbf63fbe6675bb25981..94ceac7ec4c873e144092fd1d6eb3ed46922058c 100644 (file)
@@ -92,19 +92,23 @@ def mk_insns(n_insns, wid, opwid):
     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)