mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
Conditionally instantiate hardware in ifu
This commit is contained in:
parent
d0735887de
commit
d2ccba9a49
1
.gitignore
vendored
1
.gitignore
vendored
@ -83,7 +83,6 @@ synthDC/ppa/plots
|
|||||||
synthDC/wallyplots/
|
synthDC/wallyplots/
|
||||||
synthDC/runArchive
|
synthDC/runArchive
|
||||||
synthDC/hdl
|
synthDC/hdl
|
||||||
synthDC/wrappers
|
|
||||||
sim/power.saif
|
sim/power.saif
|
||||||
tests/fp/vectors/*.tv
|
tests/fp/vectors/*.tv
|
||||||
synthDC/Summary.csv
|
synthDC/Summary.csv
|
||||||
|
@ -389,13 +389,17 @@ module ifu import cvw::*; #(parameter cvw_t P) (
|
|||||||
assign BranchMisalignedFaultE = (IEUAdrE[1] & ~P.COMPRESSED_SUPPORTED) & PCSrcE;
|
assign BranchMisalignedFaultE = (IEUAdrE[1] & ~P.COMPRESSED_SUPPORTED) & PCSrcE;
|
||||||
flopenr #(1) InstrMisalignedReg(clk, reset, ~StallM, BranchMisalignedFaultE, InstrMisalignedFaultM);
|
flopenr #(1) InstrMisalignedReg(clk, reset, ~StallM, BranchMisalignedFaultE, InstrMisalignedFaultM);
|
||||||
|
|
||||||
// Instruction and PC/PCLink pipeline registers
|
// Instruction and PC pipeline registers
|
||||||
// Cannot use flopenrc for Instr(E/M) as it resets to NOP not 0.
|
// Cannot use flopenrc for Instr(E/M) as it resets to NOP not 0.
|
||||||
mux2 #(32) FlushInstrEMux(InstrD, nop, FlushE, NextInstrD);
|
mux2 #(32) FlushInstrEMux(InstrD, nop, FlushE, NextInstrD);
|
||||||
mux2 #(32) FlushInstrMMux(InstrE, nop, FlushM, NextInstrE);
|
mux2 #(32) FlushInstrMMux(InstrE, nop, FlushM, NextInstrE);
|
||||||
flopenr #(32) InstrEReg(clk, reset, ~StallE, NextInstrD, InstrE);
|
flopenr #(32) InstrEReg(clk, reset, ~StallE, NextInstrD, InstrE);
|
||||||
flopenr #(32) InstrMReg(clk, reset, ~StallM, NextInstrE, InstrM);
|
|
||||||
flopenr #(P.XLEN) PCEReg(clk, reset, ~StallE, PCD, PCE);
|
flopenr #(P.XLEN) PCEReg(clk, reset, ~StallE, PCD, PCE);
|
||||||
|
|
||||||
|
// InstrM is only needed with CSRs or atomic operations
|
||||||
|
if (P.ZICSR_SUPPORTED | P.A_SUPPORTED)
|
||||||
|
flopenr #(32) InstrMReg(clk, reset, ~StallM, NextInstrE, InstrM);
|
||||||
|
else assign InstrM = 0;
|
||||||
// PCM is only needed with CSRs or branch prediction
|
// PCM is only needed with CSRs or branch prediction
|
||||||
if (P.ZICSR_SUPPORTED | P.BPRED_SUPPORTED)
|
if (P.ZICSR_SUPPORTED | P.BPRED_SUPPORTED)
|
||||||
flopenr #(P.XLEN) PCMReg(clk, reset, ~StallM, PCE, PCM);
|
flopenr #(P.XLEN) PCMReg(clk, reset, ~StallM, PCE, PCM);
|
||||||
|
Loading…
Reference in New Issue
Block a user