put sv_input_record_layout onto CompOpSubsetBase after all
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 5 May 2021 12:38:39 +0000 (13:38 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 5 May 2021 12:39:27 +0000 (13:39 +0100)
src/soc/fu/alu/alu_input_record.py
src/soc/fu/base_input_record.py

index 39585f31aa344b1ff77b3efabe16f476c0d78b37..4126fc6c5500c2e81cd3723ada8dee34d90e05be 100644 (file)
@@ -2,8 +2,6 @@ from soc.fu.base_input_record import CompOpSubsetBase
 from openpower.decoder.power_enums import MicrOp, Function, CryIn
 from nmigen.hdl.rec import Layout
 
-# needed for SVP64 information at the pipeline
-from openpower.decoder.power_svp64_rm import sv_input_record_layout
 
 class CompALUOpSubset(CompOpSubsetBase):
     """CompALUOpSubset
@@ -13,7 +11,7 @@ class CompALUOpSubset(CompOpSubsetBase):
     grab subsets.
     """
     def __init__(self, name=None):
-        layout = [('insn_type', MicrOp),
+        layout = (('insn_type', MicrOp),
                   ('fn_unit', Function),
                   ('imm_data', Layout((("data", 64), ("ok", 1)))),
                   ('rc', Layout((("rc", 1), ("ok", 1)))), # Data
@@ -28,6 +26,6 @@ class CompALUOpSubset(CompOpSubsetBase):
                   ('is_signed', 1),
                   ('data_len', 4), # actually used by ALU, in OP_EXTS
                   ('insn', 32),
-                  ] + sv_input_record_layout
+                  )
         super().__init__(layout, name=name)
 
index 524ad073e18f6c9bffbd23d7cab75c3b82f23a22..99f763bb8c48775eaecbcd5e5729a6d0f5fa8452 100644 (file)
@@ -1,6 +1,9 @@
 from nmigen.hdl.rec import Record, Layout
 from nmigen import Signal
 
+# needed for SVP64 information at the pipeline
+from openpower.decoder.power_svp64_rm import sv_input_record_layout
+
 
 class CompOpSubsetBase(Record):
     """CompOpSubsetBase
@@ -15,6 +18,7 @@ class CompOpSubsetBase(Record):
             assert name.endswith("OpSubset")
             name = name[4:-8].lower() + "_op"
 
+        layout = list(layout) + sv_input_record_layout
         Record.__init__(self, Layout(layout), name=name)
 
         # grrr.  Record does not have kwargs