allow CompLDSTOpSubset to be passed through to LDSTCompUnit
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 6 Jun 2020 14:45:14 +0000 (15:45 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 6 Jun 2020 14:45:14 +0000 (15:45 +0100)
src/soc/experiment/compldst_multi.py

index e2bc1f431f8ca843c5e5718cac37afa3fecb7516..f9c9ad6ed826aaf35e6f31616f5c4693f09ba76b 100644 (file)
@@ -94,8 +94,8 @@ from soc.fu.ldst.ldst_input_record import CompLDSTOpSubset
 
 
 class LDSTCompUnitRecord(CompUnitRecord):
-    def __init__(self, rwid, name=None):
-        CompUnitRecord.__init__(self, CompLDSTOpSubset, rwid,
+    def __init__(self, rwid, opsubset=CompLDSTOpSubset, name=None):
+        CompUnitRecord.__init__(self, opsubset, rwid,
                                 n_src=3, n_dst=2, name=name)
 
         self.ad = go_record(1, name="ad") # address go in, req out
@@ -163,11 +163,12 @@ class LDSTCompUnit(Elaboratable):
     depending on whether the operation is a ST or LD.
     """
 
-    def __init__(self, pi=None, rwid=64, awid=48, debugtest=False):
+    def __init__(self, pi=None, rwid=64, awid=48, opsubset=CompLDSTOpSubset,
+                      debugtest=False):
         self.rwid = rwid
         self.awid = awid
         self.pi = pi
-        self.cu = cu = LDSTCompUnitRecord(rwid)
+        self.cu = cu = LDSTCompUnitRecord(rwid, opsubset)
         self.debugtest = debugtest
 
         # POWER-compliant LD/ST has index and update: *fixed* number of ports