From 546f7fb4c2748eb1b3999f25a33dee14f4054f32 Mon Sep 17 00:00:00 2001 From: Skylar Litz Date: Fri, 3 Dec 2021 12:32:38 -0800 Subject: [PATCH] fix some interrupt timing bugs --- wally-pipelined/testbench/testbench-linux.sv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wally-pipelined/testbench/testbench-linux.sv b/wally-pipelined/testbench/testbench-linux.sv index 2aaacee8..50559b9d 100644 --- a/wally-pipelined/testbench/testbench-linux.sv +++ b/wally-pipelined/testbench/testbench-linux.sv @@ -430,7 +430,7 @@ module testbench(); NextMIPexpected = ExpectedCSRArrayValueE[NumCSRE]; \ end \ if(ExpectedCSRArrayE[NumCSRE].substr(0,3) == "mepc") begin \ - $display("hello! we are here."); \ + // $display("hello! we are here."); \ MepcExpected = ExpectedCSRArrayValueE[NumCSRE]; \ $display("%tns: MepcExpected: %x",$time,MepcExpected); \ end \ @@ -469,7 +469,7 @@ module testbench(); // $display("%tns: ExpectedPCM %x",$time,ExpectedPCM); // $display("%tns: ExpectedPCE %x",$time,ExpectedPCE); // $display("%tns: ExpectedPCW %x",$time,ExpectedPCW); - if((ExpectedPCE != MepcExpected) & ((MepcExpected - ExpectedPCE) * (MepcExpected - ExpectedPCE) <= 16)) begin + if((ExpectedPCE != MepcExpected) & ((MepcExpected - ExpectedPCE) * (MepcExpected - ExpectedPCE) <= 200) || ~dut.hart.ieu.c.InstrValidM) begin RequestDelayedMIP <= 1; $display("%tns: Requesting Delayed MIP. Current MEPC value is %x",$time,MepcExpected); end else begin // update MIP immediately