Commit 1329579e042995ecabcf7ee9905d63d1e751b0ae

Authored by zinsser
1 parent 0da65f785c

Report the number of instructions and the number of cycles at the end of a full simulation.

Showing 1 changed file with 2 additions and 0 deletions Side-by-side Diff

mips_cpu/testbench.sv View file @ 1329579
... ... @@ -94,6 +94,8 @@
94 94  
95 95 // Wait for the mips_core to report a fail or done MTC0 instruction
96 96 wait(DUT.pass_done.code == MTC0_FAIL || DUT.pass_done.code == MTC0_DONE);
  97 + $display("%m (%t) #Instructions = %d, #Cycles = %d",
  98 + $time, DUT.MIPS_CORE.num_instructions, DUT.MIPS_CORE.num_cycles);
97 99 $stop;
98 100 end
99 101 endmodule