49b7f52f18c2ee1a5f6a5fd90f5409e73df8d46e
[soc.git] / src / soc / fu / shift_rot / sr_input_record.py
1 from soc.fu.base_input_record import CompOpSubsetBase
2 from nmigen.hdl.rec import Layout
3
4 from soc.decoder.power_enums import MicrOp, Function, CryIn
5
6
7 class CompSROpSubset(CompOpSubsetBase):
8 """CompSROpSubset
9
10 a copy of the relevant subset information from Decode2Execute1Type
11 needed for ALU operations. use with eq_from_execute1 (below) to
12 grab subsets.
13 """
14 def __init__(self, name=None):
15 layout = (('insn_type', MicrOp),
16 ('fn_unit', Function),
17 ('imm_data', Layout((("data", 64), ("ok", 1)))),
18 ('rc', Layout((("rc", 1), ("ok", 1)))),
19 ('oe', Layout((("oe", 1), ("ok", 1)))),
20 ('write_cr0', 1),
21 ('input_carry', CryIn),
22 ('output_carry', 1),
23 ('input_cr', 1),
24 ('output_cr', 1),
25 ('is_32bit', 1),
26 ('is_signed', 1),
27 ('insn', 32),
28 )
29
30 super().__init__(layout, name=name)
31