initial_regs[2] = random.randint(0, (1<<64)-1)
self.run_tst_program(Program(lst), initial_regs)
+ def test_rand_divwu(self):
+ insns = ["divwu", "divwu.", "divwuo", "divwuo."]
+ for i in range(40):
+ choice = random.choice(insns)
+ lst = [f"{choice} 3, 1, 2"]
+ initial_regs = [0] * 32
+ initial_regs[1] = random.randint(0, (1<<64)-1)
+ initial_regs[2] = random.randint(0, (1<<64)-1)
+ self.run_tst_program(Program(lst), initial_regs)
+
def test_ilang(self):
pspec = DIVPipeSpec(id_wid=2)
alu = DIVBasePipe(pspec)