mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
fix testbench timing bug where interrupt forcing didn't happen soon enough because it was waiting on StallM
This commit is contained in:
parent
eb21e34000
commit
fe53dd1683
@ -729,8 +729,11 @@ module testbench;
|
|||||||
// New IP spoofing
|
// New IP spoofing
|
||||||
logic globalIntsBecomeEnabled;
|
logic globalIntsBecomeEnabled;
|
||||||
assign globalIntsBecomeEnabled = (`CSR_BASE.csrm.WriteMSTATUSM || `CSR_BASE.csrs.WriteSSTATUSM) && (|(`CSR_BASE.CSRWriteValM & (~`CSR_BASE.csrm.MSTATUS_REGW) & 32'h22));
|
assign globalIntsBecomeEnabled = (`CSR_BASE.csrm.WriteMSTATUSM || `CSR_BASE.csrs.WriteSSTATUSM) && (|(`CSR_BASE.CSRWriteValM & (~`CSR_BASE.csrm.MSTATUS_REGW) & 32'h22));
|
||||||
|
logic checkInterruptM;
|
||||||
|
assign checkInterruptM = dut.core.ieu.InstrValidM & ~dut.core.priv.priv.trap.InstrPageFaultM & ~dut.core.priv.priv.trap.InterruptM;
|
||||||
|
|
||||||
always @(negedge clk) begin
|
always @(negedge clk) begin
|
||||||
if(checkInstrM) begin
|
if(checkInterruptM) begin
|
||||||
if((interruptInstrCount+1) == AttemptedInstructionCount) begin
|
if((interruptInstrCount+1) == AttemptedInstructionCount) begin
|
||||||
if(!NO_IE_MTIME_CHECKPOINT) begin
|
if(!NO_IE_MTIME_CHECKPOINT) begin
|
||||||
case (interruptCauseVal)
|
case (interruptCauseVal)
|
||||||
|
Loading…
Reference in New Issue
Block a user