update SVSTATE to 64 bit length (fortunately very easy)
[soc.git] / src / soc / fu / trap / trap_input_record.py
1 from soc.fu.base_input_record import CompOpSubsetBase
2 from openpower.decoder.power_enums import (MicrOp, Function)
3 from openpower.consts import TT
4 from soc.experiment.mem_types import LDSTException
5
6 class CompTrapOpSubset(CompOpSubsetBase):
7 """CompTrapOpSubset
8
9 a copy of the relevant subset information from Decode2Execute1Type
10 needed for TRAP operations. use with eq_from_execute1 (below) to
11 grab subsets.
12 """
13 def __init__(self, name=None):
14 layout = [('insn_type', MicrOp),
15 ('fn_unit', Function),
16 ('insn', 32),
17 ('msr', 64), # from core.state
18 ('cia', 64), # likewise
19 ('svstate', 64), # likewise
20 ('is_32bit', 1),
21 ('traptype', TT.size), # see trap main_stage.py, PowerDecoder2
22 ('trapaddr', 13),
23 ('ldst_exc', len(LDSTException._exc_types)),
24 ]
25
26 super().__init__(layout, name=name)
27