+# SPDX-License-Identifier: LGPLv3+
+# Copyright (C) 2020, 2021 Luke Kenneth Casson Leighton <lkcl@lkcl.net>
+# Copyright (C) 2020 Michael Nolan
+# Funded by NLnet http://nlnet.nl
"""core of the python-based POWER9 simulator
this is part of a cycle-accurate POWER9 simulator. its primary purpose is
def __init__(self, dec):
self.dec = dec
- self.sv_rm = SVP64Rec() # SVP64 RM field
self.sel_in = Signal(In3Sel, reset_less=True)
self.insn_in = Signal(32, reset_less=True)
self.reg_out = Data(5, "reg_c")
def __init__(self, dec):
self.dec = dec
- self.sv_rm = SVP64Rec() # SVP64 RM field
self.sel_in = Signal(OutSel, reset_less=True)
self.insn_in = Signal(32, reset_less=True)
self.reg_out = Data(5, "reg_o")
def __init__(self, dec):
self.dec = dec
- self.sv_rm = SVP64Rec() # SVP64 RM field
self.sel_in = Signal(OutSel, reset_less=True)
self.lk = Signal(reset_less=True)
self.insn_in = Signal(32, reset_less=True)
def __init__(self, dec):
self.dec = dec
- self.sv_rm = SVP64Rec() # SVP64 RM field
self.sel_in = Signal(CRInSel, reset_less=True)
self.insn_in = Signal(32, reset_less=True)
self.cr_bitfield = Data(3, "cr_bitfield")
dec_c.insn_in, dec_o.insn_in, dec_o2.insn_in]:
comb += i.eq(self.dec.opcode_in)
- # ... and svp64 rm
- for i in [dec_a.insn_in, dec_b.insn_in,
- dec_c.insn_in, dec_o.insn_in, dec_o2.insn_in]:
- comb += i.eq(self.sv_rm)
-
# now do the SVP64 munging. op.SV_Etype and op.sv_in1 comes from
# PowerDecoder which in turn comes from LDST-RM*.csv and RM-*.csv
# which in turn were auto-generated by sv_analysis.py