fix unit tests due to change in using pspec
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 2 Jul 2020 23:10:10 +0000 (00:10 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 2 Jul 2020 23:10:10 +0000 (00:10 +0100)
src/soc/experiment/l0_cache.py
src/soc/fu/compunits/compunits.py

index c622ef44996fd9bb533b47c6b3f163685360b62a..6efde5933120234266721e211bfb3addd0575bc1 100644 (file)
@@ -353,7 +353,11 @@ class TestL0Cache(unittest.TestCase):
 
     def test_l0_cache_test_bare_wb(self):
 
-        dut = TstL0CacheBuffer(regwid=64, ifacetype='test_bare_wb')
+        pspec = TestMemPspec(ldst_ifacetype='test_bare_wb',
+                             addr_wid=48,
+                             mask_wid=8,
+                             reg_wid=64)
+        dut = TstL0CacheBuffer(pspec)
         vl = rtlil.convert(dut, ports=[])# TODOdut.ports())
         with open("test_basic_l0_cache_bare_wb.il", "w") as f:
             f.write(vl)
@@ -363,7 +367,11 @@ class TestL0Cache(unittest.TestCase):
 
     def test_l0_cache_testpi(self):
 
-        dut = TstL0CacheBuffer(regwid=64, ifacetype='testpi')
+        pspec = TestMemPspec(ldst_ifacetype='testpi',
+                             addr_wid=48,
+                             mask_wid=8,
+                             reg_wid=64)
+        dut = TstL0CacheBuffer(pspec)
         vl = rtlil.convert(dut, ports=[])# TODOdut.ports())
         with open("test_basic_l0_cache.il", "w") as f:
             f.write(vl)
index 6a65c6afcccb79241901a080e3daf778fc819bbc..bec55b833e693e19435f804f16fe2d1b145d58b7 100644 (file)
@@ -178,7 +178,7 @@ class AllFunctionUnits(Elaboratable):
      * type of FU required
 
     """
-    def __init__(self, pilist=None, addrwid=6):
+    def __init__(self, pspec, pilist=None, addrwid=6):
         self.fus = {}
         for (name, qty, kls) in (('alu', 1, ALUFunctionUnit),
                                  ('cr', 1, CRFunctionUnit),