mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-02 09:45:18 +00:00
trap comments
This commit is contained in:
parent
370678f730
commit
a9008cb293
@ -4,7 +4,7 @@
|
||||
// Written: David_Harris@hmc.edu 12 May 2022
|
||||
// Modified:
|
||||
//
|
||||
// Purpose: Track privilege mode
|
||||
// Purpose: Track privilege mode. Change on traps and returns.
|
||||
//
|
||||
// Documentation: RISC-V System on Chip Design Chapter 5
|
||||
//
|
||||
@ -30,11 +30,14 @@
|
||||
|
||||
module privmode (
|
||||
input logic clk, reset,
|
||||
input logic StallW, TrapM, mretM, sretM,
|
||||
input logic DelegateM,
|
||||
input logic [1:0] STATUS_MPP,
|
||||
input logic STATUS_SPP,
|
||||
output logic [1:0] NextPrivilegeModeM, PrivilegeModeW
|
||||
input logic StallW,
|
||||
input logic TrapM, // Trap
|
||||
input logic mretM, sretM, // return instruction
|
||||
input logic DelegateM, // trap delegated to supervisor mode
|
||||
input logic [1:0] STATUS_MPP, // machine trap previous privilege mode
|
||||
input logic STATUS_SPP, // supervisor trap previous privilege mode
|
||||
output logic [1:0] NextPrivilegeModeM, // next privilege mode, used when updating STATUS CSR on a trap
|
||||
output logic [1:0] PrivilegeModeW // current privilege mode
|
||||
);
|
||||
|
||||
if (`U_SUPPORTED) begin:privmode
|
||||
|
@ -32,12 +32,13 @@ module privpiperegs (
|
||||
input logic clk, reset,
|
||||
input logic StallD, StallE, StallM,
|
||||
input logic FlushD, FlushE, FlushM,
|
||||
input logic InstrPageFaultF, InstrAccessFaultF,
|
||||
input logic IllegalIEUInstrFaultD,
|
||||
output logic InstrPageFaultM, InstrAccessFaultM,
|
||||
output logic IllegalIEUInstrFaultM
|
||||
input logic InstrPageFaultF, InstrAccessFaultF, // instruction faults
|
||||
input logic IllegalIEUInstrFaultD, // illegal IEU instruction decoded
|
||||
output logic InstrPageFaultM, InstrAccessFaultM, // delayed instruction faults
|
||||
output logic IllegalIEUInstrFaultM // delayed illegal IEU instruction
|
||||
);
|
||||
|
||||
// Delayed fault signals
|
||||
logic InstrPageFaultD, InstrAccessFaultD;
|
||||
logic InstrPageFaultE, InstrAccessFaultE;
|
||||
logic IllegalIEUInstrFaultE;
|
||||
|
Loading…
Reference in New Issue
Block a user