Only output instruction count when the csrs are implemented.

This commit is contained in:
Rose Thompson 2024-02-05 14:41:52 -06:00
parent 8b5970fdc4
commit 58580445ab

View File

@ -539,10 +539,12 @@ module testbench;
DCacheFlushFSM #(P) DCacheFlushFSM(.clk(clk), .reset(reset), .start(DCacheFlushStart), .done(DCacheFlushDone)); DCacheFlushFSM #(P) DCacheFlushFSM(.clk(clk), .reset(reset), .start(DCacheFlushStart), .done(DCacheFlushDone));
logic [P.XLEN-1:0] Minstret; if(P.ZICSR_SUPPORTED) begin
assign Minstret = testbench.dut.core.priv.priv.csr.counters.counters.HPMCOUNTER_REGW[2]; logic [P.XLEN-1:0] Minstret;
always @(negedge clk) begin assign Minstret = testbench.dut.core.priv.priv.csr.counters.counters.HPMCOUNTER_REGW[2];
if((Minstret != 0) && (Minstret % 'd100000 == 0)) $display("Reached %d instructions", Minstret); always @(negedge clk) begin
if((Minstret != 0) && (Minstret % 'd100000 == 0)) $display("Reached %d instructions", Minstret);
end
end end
task automatic CheckSignature; task automatic CheckSignature;