From 67ef47b25b33c5e922499b816b793e4ff981ac26 Mon Sep 17 00:00:00 2001 From: bbracker Date: Wed, 13 Apr 2022 00:49:37 -0700 Subject: [PATCH] whoops forgot to update AttemptedInstructionCount in interrupt spoofing --- pipelined/testbench/testbench-linux.sv | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pipelined/testbench/testbench-linux.sv b/pipelined/testbench/testbench-linux.sv index bc6bf2c17..8988bcae5 100644 --- a/pipelined/testbench/testbench-linux.sv +++ b/pipelined/testbench/testbench-linux.sv @@ -481,6 +481,9 @@ module testbench; if(`DEBUG_TRACE >= 5) $display("Time %t, line %x", $time, line``STAGE); \ // extract PC, Instr \ matchCount``STAGE = $sscanf(line``STAGE, "%x %x %s", ExpectedPC``STAGE, ExpectedInstr``STAGE, text``STAGE); \ + if (`"STAGE`"=="M") begin \ + AttemptedInstructionCount += 1; \ + end \ \ // for the life of me I cannot get any build in C or C++ string parsing functions/methods to work. \ // strtok was the best idea but it cannot be used correctly as system verilog does not have null \ @@ -493,9 +496,6 @@ module testbench; for(index``STAGE = 0; index``STAGE < line``STAGE.len(); index``STAGE++) begin \ //$display("char = %s", line``STAGE[index]); \ if (line``STAGE[index``STAGE] == " " | line``STAGE[index``STAGE] == "\n") begin \ - if (line``STAGE[index``STAGE] == "\n" & `"STAGE`"=="M") begin \ - AttemptedInstructionCount += 1; \ - end \ EndIndex``STAGE = index``STAGE; \ ExpectedTokens``STAGE[TokenIndex``STAGE] = line``STAGE.substr(StartIndex``STAGE, EndIndex``STAGE-1); \ //$display("In Tokenizer %s", line``STAGE.substr(StartIndex, EndIndex-1)); \ @@ -734,6 +734,7 @@ module testbench; `SCAN_NEW_INTERRUPT garbageInt = $fgets(garbageString,traceFileE); garbageInt = $fgets(garbageString,traceFileM); + AttemptedInstructionCount += 1; end end end