test_ldst_pi.py: fix race condition causing early stop
authorTobias Platen <tplaten@posteo.de>
Tue, 25 May 2021 19:00:41 +0000 (21:00 +0200)
committerTobias Platen <tplaten@posteo.de>
Tue, 25 May 2021 19:00:41 +0000 (21:00 +0200)
src/soc/experiment/test/test_ldst_pi.py

index 6574de6e6c38e9ce600a3bccc91358878abad8ff..f77121d0edd6546c52cec5b18b577d34723582eb 100644 (file)
@@ -38,6 +38,7 @@ def wb_get(wb, mem):
     """
 
     global stop
+    assert(stop==False)
 
     while not stop:
         while True: # wait for dc_valid
@@ -155,6 +156,9 @@ def ldst_sim(dut):
 
 def setup_mmu():
 
+    global stop
+    stop = False
+
     pspec = TestMemPspec(ldst_ifacetype='mmu_cache_wb',
                          imem_ifacetype='',
                          addr_wid=48,