Allow the formal engine to perform a same-cycle result in the ALU
[soc.git] / src / soc / fu / ldst / ldst_input_record.py
1 from soc.fu.base_input_record import CompOpSubsetBase
2 from nmigen.hdl.rec import Layout
3
4 from openpower.decoder.power_enums import MicrOp, Function, LDSTMode
5
6
7 class CompLDSTOpSubset(CompOpSubsetBase):
8 """CompLDSTOpSubset
9
10 a copy of the relevant subset information from Decode2Execute1Type
11 needed for LD/ST operations. use with eq_from_execute1 (below) to
12 grab subsets.
13
14 note: rc / oe is needed (later) for st*cx when it comes to setting OV/SO
15 """
16 def __init__(self, name=None):
17 layout = (('insn_type', MicrOp),
18 ('fn_unit', Function),
19 ('imm_data', Layout((("data", 64), ("ok", 1)))),
20 ('zero_a', 1),
21 ('rc', Layout((("rc", 1), ("ok", 1)))), # for later
22 ('oe', Layout((("oe", 1), ("ok", 1)))), # for later
23 ('msr', 64), # TODO: a lot less bits. only need PR
24 ('is_32bit', 1),
25 ('is_signed', 1),
26 ('data_len', 4),
27 ('byte_reverse', 1),
28 ('sign_extend', 1),
29 ('ldst_mode', LDSTMode),
30 ('insn', 32),
31 )
32
33 super().__init__(layout, name=name)
34