From 07ab2ef32be27e32237b25d35a88f07e1b097a7a Mon Sep 17 00:00:00 2001 From: klehman Date: Tue, 21 Sep 2021 14:19:10 -0400 Subject: [PATCH] changed over to use state mem compare --- src/soc/simple/test/test_core.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/soc/simple/test/test_core.py b/src/soc/simple/test/test_core.py index 9e69f3b4..2f1ae1cb 100644 --- a/src/soc/simple/test/test_core.py +++ b/src/soc/simple/test/test_core.py @@ -11,7 +11,8 @@ from nmigen.back.pysim import Simulator, Delay, Settle from nmutil.formaltest import FHDLTestCase from nmigen.cli import rtlil import unittest -from openpower.test.state import SimState, teststate_check_regs +from openpower.test.state import (SimState, teststate_check_regs, + teststate_check_mem) from soc.simple.test.teststate import HDLState from openpower.decoder.isa.caller import special_sprs from openpower.decoder.power_decoder import create_pdecode @@ -156,6 +157,12 @@ def check_regs(dut, sim, core, test, code): yield from teststate_check_regs(dut, testdic, test, code) +def check_mem(dut, sim, core, test, code): + # create the two states and compare mem + testdic = {'sim': sim, 'hdl': core} + yield from teststate_check_mem(dut, testdic, test, code) + + def wait_for_busy_hi(cu): while True: busy_o = yield cu.busy_o @@ -269,7 +276,7 @@ class TestRunner(FHDLTestCase): yield from check_regs(self, sim, core, test, code) # Memory check - yield from check_sim_memory(self, l0, sim, code) + yield from check_mem(self, sim, core, test, code) sim.add_sync_process(process) with sim.write_vcd("core_simulator.vcd", "core_simulator.gtkw", -- 2.30.2