From 4e2cf70c016de8ee077088e4215438ba8da4a6bc Mon Sep 17 00:00:00 2001 From: Tobias Platen Date: Mon, 19 Jul 2021 20:38:05 +0200 Subject: [PATCH] test_dcbz_pi.py: more work on unit test --- src/soc/experiment/test/test_dcbz_pi.py | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/soc/experiment/test/test_dcbz_pi.py b/src/soc/experiment/test/test_dcbz_pi.py index 8da01503..fd593895 100644 --- a/src/soc/experiment/test/test_dcbz_pi.py +++ b/src/soc/experiment/test/test_dcbz_pi.py @@ -121,20 +121,23 @@ def _test_dcbz_addr_zero(dut, mem): yield mmu.rin.prtbl.eq(0x1000000) # set process table yield - addr = 0x1000 - data = 0x1337 + addr = 0x100e0 + data = 0xf553b658ba7e1f51 # size ==, msr_pr TODO ## causes hang in pi_dcbz -- investigate - ##yield from pi_st(pi, addr, data, 8, msr_pr=1) - ##yield - ##yield - ##yield Display("done_pi_st") + yield from pi_st(pi, addr, data, 8, msr_pr=1) + yield + yield Display("======== done_pi_st") + + ld_data = yield from pi_ld(pi, addr, 8, msr_pr=1) + assert ld_data == 0xf553b658ba7e1f51 + #ok until here -- any other operation hangs ## verify this one first ## is_dcbz 1 ## addrok 1 - yield from pi_dcbz(pi, addr, data, 8, msr_pr=1) - yield + #yield from pi_dcbz(pi, addr, data, 8, msr_pr=1) + #yield yield stop = True @@ -143,7 +146,6 @@ def test_dcbz_addr_zero(): m, cmpi = setup_mmu() - # dcache_load at addr 0 mem = { 0x10000: # PARTITION_TABLE_2 # PATB_GR=1 PRTB=0x1000 PRTS=0xb @@ -161,6 +163,8 @@ def test_dcbz_addr_zero(): 0x1000000: # PROCESS_TABLE_3 # RTS1 = 0x2 RPDB = 0x300 RTS2 = 0x5 RPDS = 13 b(0x40000000000300ad), + + 0x10004: 0 } -- 2.30.2