X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fsoc%2Fsimple%2Fissuer.py;h=0b42aaa3312226f04869904e44748c512f562f76;hb=92a9fd0a7ca5ecb5fe7cfe46fd4fd603a4a594fd;hp=8b04ee0b0ccc7011577fe56b45b5de8c7954242d;hpb=95092280c4ad69524b68e65f80f92cb2f58efec8;p=soc.git diff --git a/src/soc/simple/issuer.py b/src/soc/simple/issuer.py index 8b04ee0b..0b42aaa3 100644 --- a/src/soc/simple/issuer.py +++ b/src/soc/simple/issuer.py @@ -31,10 +31,10 @@ from openpower.decoder.power_decoder2 import PowerDecode2, SVP64PrefixDecoder from openpower.decoder.decode2execute1 import IssuerDecode2ToOperand from openpower.decoder.decode2execute1 import Data from openpower.decoder.power_enums import (MicrOp, SVP64PredInt, SVP64PredCR, - SVP64PredMode) + SVP64PredMode) from openpower.state import CoreState from openpower.consts import (CR, SVP64CROffs) -from soc.experiment.testmem import TestMemory # test only for instructions +from soc.experiment.testmem import TestMemory # test only for instructions from soc.regfile.regfiles import StateRegs, FastRegs from soc.simple.core import NonProductionCore from soc.config.test.test_loadstore import TestMemPspec @@ -48,10 +48,11 @@ from soc.bus.SPBlock512W64B8W import SPBlock512W64B8W from soc.clock.select import ClockSelect from soc.clock.dummypll import DummyPLL from openpower.sv.svstate import SVSTATERec - +from soc.experiment.icache import ICache from nmutil.util import rising_edge + def get_insn(f_instr_o, pc): if f_instr_o.width == 32: return f_instr_o @@ -60,11 +61,12 @@ def get_insn(f_instr_o, pc): return f_instr_o.word_select(pc[2], 32) # gets state input or reads from state regfile -def state_get(m, core_rst, state_i, name, regfile, regnum): + + +def state_get(m, res, core_rst, state_i, name, regfile, regnum): comb = m.d.comb sync = m.d.sync - # read the PC - res = Signal(64, reset_less=True, name=name) + # read the {insert state variable here} res_ok_delay = Signal(name="%s_ok_delay" % name) with m.If(~core_rst): sync += res_ok_delay.eq(~state_i.ok) @@ -72,12 +74,11 @@ def state_get(m, core_rst, state_i, name, regfile, regnum): # incoming override (start from pc_i) comb += res.eq(state_i.data) with m.Else(): - # otherwise read StateRegs regfile for PC... - comb += regfile.ren.eq(1<