self.name = name
self.subset = subset
if fields is not None:
- for k, v in fields:
+ for k, v in fields.items():
setattr(self, k, v)
return
debug_report = set()
"""
fields = {}
for fname in other._fields:
- sig = getattr(other, fname)
- fields[fname] = sig.__class__.like(sig)
+ sig = getattr(other, fname, None)
+ if sig is not None:
+ fields[fname] = sig.__class__.like(sig)
return PowerOp(subset=other.subset, fields=fields)
def _eq(self, row=None):
from openpower.decoder.power_regspec_map import regspec_decode_read
from openpower.decoder.power_decoder import (create_pdecode,
- create_pdecode_svp64_ldst,)
+ create_pdecode_svp64_ldst,
+ PowerOp)
from openpower.decoder.power_enums import (MicrOp, CryIn, Function,
CRInSel, CROutSel,
LdstLen, In1Sel, In2Sel, In3Sel,
row_subset=self.rowsubsetfn)
self.svdecldst = svdecldst
+ # set up a copy of the PowerOp
+ self.op = PowerOp.like(self.dec.op)
+
# state information needed by the Decoder
if state is None:
state = CoreState("dec2")
m.submodules.dec_rc = self.dec_rc = dec_rc = DecodeRC(self.dec)
m.submodules.dec_oe = dec_oe = DecodeOE(self.dec, op)
+ # use op from first decoder (self.dec.op) if not in SVP64-LDST mode
+ # (TODO)
+ comb += self.op.eq(self.dec.op)
+
if self.svp64_en:
# and SVP64 RM mode decoder
m.submodules.sv_rm_dec = rm_dec = self.rm_dec
m = super().elaborate(platform)
comb = m.d.comb
state = self.state
- e_out, op, do_out = self.e, self.dec.op, self.e.do
+ op, e_out, do_out = self.op, self.e, self.e.do
dec_spr, msr, cia, ext_irq = state.dec, state.msr, state.pc, state.eint
rc_out = self.dec_rc.rc_out.data
e = self.e_tmp