add I-Cache wishbone bus to wb_get when MMU and ROM mode enabled
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 9 Dec 2021 15:46:11 +0000 (15:46 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 9 Dec 2021 15:46:11 +0000 (15:46 +0000)
src/openpower/test/runner.py

index b8378a93ee550c67ac4eb48097005e9f631f0879..102d3dd58f26bc705b044d00c3c2b8d0681a3418 100644 (file)
@@ -127,10 +127,16 @@ class TestRunnerBase(FHDLTestCase):
         m = Module()
         comb = m.d.comb
         if self.microwatt_mmu:
-            ldst_ifacetype = 'test_mmu_cache_wb'
+            # do not wire these up to anything if wb_get is to be used
+            if self.rom is not None:
+                ldst_ifacetype = 'mmu_cache_wb'
+                imem_ifacetype = 'bare_wb'
+            else:
+                ldst_ifacetype = 'test_mmu_cache_wb'
+                imem_ifacetype = 'test_bare_wb'
         else:
             ldst_ifacetype = 'test_bare_wb'
-        imem_ifacetype = 'test_bare_wb'
+            imem_ifacetype = 'test_bare_wb'
 
         pspec = TestMemPspec(ldst_ifacetype=ldst_ifacetype,
                              imem_ifacetype=imem_ifacetype,
@@ -461,9 +467,12 @@ class TestRunnerBase(FHDLTestCase):
         # extra emulated process
         if self.rom is not None:
             dcache = hdlrun.issuer.core.fus.fus["mmu0"].alu.dcache
+            icache = hdlrun.issuer.core.fus.fus["mmu0"].alu.icache
             default_mem = self.rom
             sim.add_sync_process(wrap(wb_get(dcache.bus,
                                              default_mem, "DCACHE")))
+            sim.add_sync_process(wrap(wb_get(icache.bus,
+                                             default_mem, "ICACHE")))
 
         with sim.write_vcd("issuer_simulator.vcd"):
             sim.run()