from nmigen.cli import rtlil
from soc.decoder.power_enums import (Function, Form, InternalOp,
In1Sel, In2Sel, In3Sel, OutSel,
- RC, LdstLen, CryIn, get_csv,
+ RC, LdstLen, LDSTMode, CryIn, get_csv,
single_bit_flags, CRInSel,
CROutSel, get_signal_name,
default_values, insns, asmidx)
self.cr_in = Signal(CRInSel, reset_less=True)
self.cr_out = Signal(CROutSel, reset_less=True)
self.ldst_len = Signal(LdstLen, reset_less=True)
+ self.upd = Signal(LDSTMode, reset_less=True)
self.rc_sel = Signal(RC, reset_less=True)
self.cry_in = Signal(CryIn, reset_less=True)
for bit in single_bit_flags:
import pdb; pdb.set_trace()
print(row)
print(row)
+ ldst_mode = row['upd']
+ if ldst_mode.isdigit():
+ ldst_mode = LDSTMode(int(ldst_mode))
+ else:
+ ldst_mode = LDSTMode[ldst_mode]
res = [self.function_unit.eq(Function[row['unit']]),
self.form.eq(Form[row['form']]),
self.internal_op.eq(InternalOp[row['internal op']]),
self.cr_in.eq(CRInSel[row['CR in']]),
self.cr_out.eq(CROutSel[row['CR out']]),
self.ldst_len.eq(LdstLen[row['ldst len']]),
+ self.upd.eq(ldst_mode),
self.rc_sel.eq(RC[row['rc']]),
self.cry_in.eq(CryIn[row['cry in']]),
]
self.cr_out.eq(otherop.cr_out),
self.rc_sel.eq(otherop.rc_sel),
self.ldst_len.eq(otherop.ldst_len),
+ self.upd.eq(otherop.upd),
self.cry_in.eq(otherop.cry_in)]
for bit in single_bit_flags:
sig = getattr(self, get_signal_name(bit))
# names of the fields in the tables that don't correspond to an enum
single_bit_flags = ['inv A', 'inv out',
- 'cry out', 'BR', 'sgn ext', 'upd', 'rsrv', '32b',
+ 'cry out', 'BR', 'sgn ext', 'rsrv', '32b',
'sgn', 'lk', 'sgl pipe']
# default values for fields in the table
'in1': "RA", 'in2': 'NONE', 'in3': 'NONE', 'out': 'NONE',
'CR in': 'NONE',
'ldst len': 'NONE',
+ 'upd': '0',
'rc': 'NONE', 'cry in': 'ZERO', 'form': 'NONE'}