From 10d03c84a80b2ebf7cb6034bdb47ecc45e404283 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Fri, 7 Jun 2019 23:17:34 +0100 Subject: [PATCH] extend ld/st mem test --- src/scoreboard/test_mem_fu_matrix.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/scoreboard/test_mem_fu_matrix.py b/src/scoreboard/test_mem_fu_matrix.py index 43cdf07f..015368fa 100644 --- a/src/scoreboard/test_mem_fu_matrix.py +++ b/src/scoreboard/test_mem_fu_matrix.py @@ -641,12 +641,29 @@ def test_scoreboard(): # vcd_name='test_scoreboard6600.vcd') +def mem_sim(dut): + yield dut.ld_i.eq(0x1) + yield dut.fn_issue_i.eq(0x1) + yield + yield dut.st_i.eq(0x2) + yield dut.fn_issue_i.eq(0x2) + yield + yield dut.fn_issue_i.eq(0x0) + yield + + yield dut.stwd_hit_i.eq(0x2) + yield + + def test_mem_fus(): dut = MemFunctionUnits(4) vl = rtlil.convert(dut, ports=dut.ports()) with open("test_mem_fus.il", "w") as f: f.write(vl) + run_simulation(dut, mem_sim(dut), + vcd_name='test_mem_fus.vcd') + if __name__ == '__main__': test_mem_fus() -- 2.30.2