diff --git a/umi/umi/testbench/test_mem_agent.py b/umi/umi/testbench/test_mem_agent.py index 52d74bc..72601cb 100755 --- a/umi/umi/testbench/test_mem_agent.py +++ b/umi/umi/testbench/test_mem_agent.py @@ -121,7 +121,8 @@ def main(vldmode="2", rdymode="2", n=100, host2dut="host2dut_0.q", dut2host="dut if not (atomicval == data[0]): print(f"ERROR umi atomic from addr 0x{addr:08x} expected {data[0]} actual {atomicval}") assert (atomicval == data[0]) - data[0] = apply_atomic(data[0], atomicdata, atomicopcode, maxrange) + temp_data = apply_atomic(data[0], atomicdata, atomicopcode, maxrange) + data[0] = np.array(temp_data).astype(avail_datatype[wordindexer]) print(f"umi read from addr 0x{addr:08x}") val = host.read(addr, length+1, dtype=avail_datatype[wordindexer]) diff --git a/umi/umi/testbench/test_regif.py b/umi/umi/testbench/test_regif.py index f7170e5..9ea7857 100755 --- a/umi/umi/testbench/test_regif.py +++ b/umi/umi/testbench/test_regif.py @@ -115,7 +115,7 @@ def main(vldmode="2", rdymode="2", n=100, host2dut="host2dut_0.q", dut2host="dut if not (atomicval == data): print(f"ERROR umi atomic from addr 0x{addr:08x} expected {data} actual {atomicval}") assert (atomicval == data) - data = np.uint32(apply_atomic(data, atomicdata, atomicopcode, 2**32)) + data = np.array(apply_atomic(data, atomicdata, atomicopcode, 2**32)).astype(np.uint32) print(f"umi read from addr 0x{addr:08x}") val = host.read(addr, np.uint32) diff --git a/umi/umi/testbench/test_umi_ram.py b/umi/umi/testbench/test_umi_ram.py index 96fb499..3db6cb3 100755 --- a/umi/umi/testbench/test_umi_ram.py +++ b/umi/umi/testbench/test_umi_ram.py @@ -121,7 +121,8 @@ def main(vldmode="2", rdymode="2", n=100): if not (atomicval == data[0]): print(f"ERROR umi atomic from addr 0x{addr:08x} expected {data[0]} actual {atomicval}") assert (atomicval == data[0]) - data[0] = apply_atomic(data[0], atomicdata, atomicopcode, maxrange) + temp_data = apply_atomic(data[0], atomicdata, atomicopcode, maxrange) + data[0] = np.array(temp_data).astype(avail_datatype[wordindexer]) psel = np.random.choice([0, 1, 2, 3, 4]) print(f"umi{psel} read from addr 0x{addr:08x}")