1 from nmigen
.hdl
.rec
import Record
, Layout
3 from soc
.decoder
.power_enums
import InternalOp
, Function
6 class CompLDSTOpSubset(Record
):
9 a copy of the relevant subset information from Decode2Execute1Type
10 needed for LD/ST operations. use with eq_from_execute1 (below) to
13 def __init__(self
, name
=None):
14 layout
= (('insn_type', InternalOp
),
15 ('imm_data', Layout((("imm", 64), ("imm_ok", 1)))),
23 Record
.__init
__(self
, Layout(layout
), name
=name
)
25 # grrr. Record does not have kwargs
26 self
.insn_type
.reset_less
= True
27 self
.is_32bit
.reset_less
= True
28 self
.is_signed
.reset_less
= True
29 self
.data_len
.reset_less
= True
30 self
.byte_reverse
.reset_less
= True
31 self
.sign_extend
.reset_less
= True
32 self
.update
.reset_less
= True
34 def eq_from_execute1(self
, other
):
35 """ use this to copy in from Decode2Execute1Type
38 for fname
, sig
in self
.fields
.items():
39 eqfrom
= other
.fields
[fname
]
40 res
.append(sig
.eq(eqfrom
))
44 return [self
.insn_type
,