From 8b5970fdc4442cfdfadca12bfffe8a303908a29f Mon Sep 17 00:00:00 2001 From: Rose Thompson Date: Mon, 5 Feb 2024 13:19:48 -0600 Subject: [PATCH] Buildroot now reports every 100K instructions as before. --- testbench/testbench.sv | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/testbench/testbench.sv b/testbench/testbench.sv index 33ffa8c61..b55d8e515 100644 --- a/testbench/testbench.sv +++ b/testbench/testbench.sv @@ -286,7 +286,6 @@ module testbench; bootmemfilename = {RISCV_DIR, "/linux-testvectors/bootmem.bin"}; end else memfilename = {pathname, tests[test], ".elf.memfile"}; - $display("!!!!!!!!!!!!!!!!!!!!!memfilename is %s \n", memfilename); if (riscofTest) begin ProgramAddrMapFile = {pathname, tests[test], "/ref/ref.elf.objdump.addr"}; ProgramLabelMapFile = {pathname, tests[test], "/ref/ref.elf.objdump.lab"}; @@ -540,6 +539,12 @@ module testbench; DCacheFlushFSM #(P) DCacheFlushFSM(.clk(clk), .reset(reset), .start(DCacheFlushStart), .done(DCacheFlushDone)); + logic [P.XLEN-1:0] Minstret; + assign Minstret = testbench.dut.core.priv.priv.csr.counters.counters.HPMCOUNTER_REGW[2]; + always @(negedge clk) begin + if((Minstret != 0) && (Minstret % 'd100000 == 0)) $display("Reached %d instructions", Minstret); + end + task automatic CheckSignature; // This task must be declared inside this module as it needs access to parameter P. There is // no way to pass P to the task unless we convert it to a module.