From: Luke Kenneth Casson Leighton Date: Wed, 5 May 2021 12:38:39 +0000 (+0100) Subject: put sv_input_record_layout onto CompOpSubsetBase after all X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=095318372c9d0d1fc7817e1b905556066f406a35;p=soc.git put sv_input_record_layout onto CompOpSubsetBase after all --- diff --git a/src/soc/fu/alu/alu_input_record.py b/src/soc/fu/alu/alu_input_record.py index 39585f31..4126fc6c 100644 --- a/src/soc/fu/alu/alu_input_record.py +++ b/src/soc/fu/alu/alu_input_record.py @@ -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) diff --git a/src/soc/fu/base_input_record.py b/src/soc/fu/base_input_record.py index 524ad073..99f763bb 100644 --- a/src/soc/fu/base_input_record.py +++ b/src/soc/fu/base_input_record.py @@ -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