mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
Merge branch 'main' of github.com:davidharrishmc/riscv-wally into main
This commit is contained in:
commit
84edb8b5d5
@ -49,6 +49,7 @@ module regfile (
|
|||||||
// register 0 hardwired to 0
|
// register 0 hardwired to 0
|
||||||
|
|
||||||
// reset is intended for simulation only, not synthesis
|
// reset is intended for simulation only, not synthesis
|
||||||
|
// can logic be adjusted to not need resettable registers?
|
||||||
|
|
||||||
always_ff @(negedge clk) // or posedge reset) // *** make this a preload in testbench rather than reset
|
always_ff @(negedge clk) // or posedge reset) // *** make this a preload in testbench rather than reset
|
||||||
if (reset) for(i=1; i<NUMREGS; i++) rf[i] <= 0;
|
if (reset) for(i=1; i<NUMREGS; i++) rf[i] <= 0;
|
||||||
|
@ -151,6 +151,7 @@ module hptw
|
|||||||
// to decrease the latency of the HPTW. However, if the D$ is a cycle limiter, it's better to leave the
|
// to decrease the latency of the HPTW. However, if the D$ is a cycle limiter, it's better to leave the
|
||||||
// HPTW as shown below to keep the D$ setup time out of the critical path.
|
// HPTW as shown below to keep the D$ setup time out of the critical path.
|
||||||
// *** Is this really true. Talk with Ross. Seems like it's the next state logic on critical path instead.
|
// *** Is this really true. Talk with Ross. Seems like it's the next state logic on critical path instead.
|
||||||
|
// *** address TYPE(statetype)
|
||||||
flopenl #(.TYPE(statetype)) WalkerStateReg(clk, reset, 1'b1, NextWalkerState, IDLE, WalkerState);
|
flopenl #(.TYPE(statetype)) WalkerStateReg(clk, reset, 1'b1, NextWalkerState, IDLE, WalkerState);
|
||||||
always_comb
|
always_comb
|
||||||
case (WalkerState)
|
case (WalkerState)
|
||||||
@ -190,7 +191,8 @@ module hptw
|
|||||||
LEAF: NextWalkerState = IDLE; // updates TLB
|
LEAF: NextWalkerState = IDLE; // updates TLB
|
||||||
default: begin
|
default: begin
|
||||||
// synthesis translate_off
|
// synthesis translate_off
|
||||||
$error("Default state in HPTW should be unreachable; was %d", WalkerState);
|
if (WalkerState !== 'x)
|
||||||
|
$error("Default state in HPTW should be unreachable; was %d", WalkerState);
|
||||||
// synthesis translate_on
|
// synthesis translate_on
|
||||||
NextWalkerState = IDLE; // should never be reached
|
NextWalkerState = IDLE; // should never be reached
|
||||||
end
|
end
|
||||||
|
@ -49,7 +49,7 @@ module privdec (
|
|||||||
assign ecallM = PrivilegedM & (InstrM[31:20] == 12'b000000000000);
|
assign ecallM = PrivilegedM & (InstrM[31:20] == 12'b000000000000);
|
||||||
assign ebreakM = PrivilegedM & (InstrM[31:20] == 12'b000000000001);
|
assign ebreakM = PrivilegedM & (InstrM[31:20] == 12'b000000000001);
|
||||||
assign wfiM = PrivilegedM & (InstrM[31:20] == 12'b000100000101);
|
assign wfiM = PrivilegedM & (InstrM[31:20] == 12'b000100000101);
|
||||||
assign sfencevmaM = PrivilegedM & (InstrM[31:25] == 7'b0001001);
|
assign sfencevmaM = PrivilegedM & (InstrM[31:25] == 7'b0001001); // *** & (PrivilegedModeW == `M_MODE | ~STATUS_TVM); // *** does this work in U mode?
|
||||||
assign IllegalPrivilegedInstrM = PrivilegedM & ~(sretM|mretM|ecallM|ebreakM|wfiM|sfencevmaM);
|
assign IllegalPrivilegedInstrM = PrivilegedM & ~(sretM|mretM|ecallM|ebreakM|wfiM|sfencevmaM);
|
||||||
assign IllegalInstrFaultM = (IllegalIEUInstrFaultM & IllegalFPUInstrM) | IllegalPrivilegedInstrM | IllegalCSRAccessM | TrappedSRETM; // *** generalize this for other instructions
|
assign IllegalInstrFaultM = (IllegalIEUInstrFaultM & IllegalFPUInstrM) | IllegalPrivilegedInstrM | IllegalCSRAccessM | TrappedSRETM; // *** generalize this for other instructions
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user