use PRTBL SPR in RADIXMMU
[soc.git] / src / soc / decoder / power_decoder.py
index 6712cd1d63fc5f518776423ecff2d3fbf1470270..eb6df3cf18cdd95bad47dc4918d4055780ec57cf 100644 (file)
@@ -92,7 +92,7 @@ from nmigen import Module, Elaboratable, Signal, Cat, Mux
 from nmigen.cli import rtlil
 from soc.decoder.power_enums import (Function, Form, MicrOp,
                                      In1Sel, In2Sel, In3Sel, OutSel,
-                                     SVEXTRA, SVEtype, SVPtype, # Simple-V
+                                     SVEXTRA, SVEtype, SVPtype,  # Simple-V
                                      RC, LdstLen, LDSTMode, CryIn,
                                      single_bit_flags, CRInSel,
                                      CROutSel, get_signal_name,
@@ -131,6 +131,7 @@ power_op_types = {'function_unit': Function,
                   'sv_in2': SVEXTRA,
                   'sv_in3': SVEXTRA,
                   'sv_out': SVEXTRA,
+                  'sv_out2': SVEXTRA,
                   'sv_cr_in': SVEXTRA,
                   'sv_cr_out': SVEXTRA,
                   'ldst_len': LdstLen,
@@ -150,8 +151,11 @@ power_op_csvmap = {'function_unit': 'unit',
                    'sv_in2': 'sv_in2',
                    'sv_in3': 'sv_in3',
                    'sv_out': 'sv_out',
+                   'sv_out2': 'sv_out2',
                    'sv_cr_in': 'sv_cr_in',
                    'sv_cr_out': 'sv_cr_out',
+                   'SV_Etype': 'SV_Etype',
+                   'SV_Ptype': 'SV_Ptype',
                    'cr_in': 'CR in',
                    'cr_out': 'CR out',
                    'ldst_len': 'ldst len',
@@ -221,7 +225,7 @@ class PowerOp:
             if field not in power_op_csvmap:
                 continue
             csvname = power_op_csvmap[field]
-            print (field, ptype, csvname, row)
+            print(field, ptype, csvname, row)
             val = row[csvname]
             if csvname == 'upd' and isinstance(val, int):  # LDSTMode different
                 val = ptype(val)
@@ -491,6 +495,7 @@ class TopPowerDecoder(PowerDecoder):
     def elaborate(self, platform):
         m = PowerDecoder.elaborate(self, platform)
         comb = m.d.comb
+        # sigh duplicated in SVP64PowerDecoder
         # raw opcode in assumed to be in LE order: byte-reverse it to get BE
         raw_le = self.raw_opcode_in
         l = []
@@ -554,6 +559,8 @@ def create_pdecode(name=None, col_subset=None, row_subset=None):
                    opint=True, bitsel=(0, 2), suffix=None, subdecoders=[]),
         Subdecoder(pattern=62, opcodes=get_csv("minor_62.csv"),
                    opint=True, bitsel=(0, 2), suffix=None, subdecoders=[]),
+        Subdecoder(pattern=22, opcodes=get_csv("minor_22.csv"),
+                   opint=True, bitsel=(1, 5), suffix=None, subdecoders=[]),
     ]
 
     # top level: extra merged with major