aboutsummaryrefslogtreecommitdiffstats
path: root/picosoc/testbench.v
diff options
context:
space:
mode:
Diffstat (limited to 'picosoc/testbench.v')
-rw-r--r--picosoc/testbench.v5
1 files changed, 5 insertions, 0 deletions
diff --git a/picosoc/testbench.v b/picosoc/testbench.v
index af5b121..a7e57de 100644
--- a/picosoc/testbench.v
+++ b/picosoc/testbench.v
@@ -24,6 +24,10 @@ module testbench;
always #5 clk = (clk === 1'b0);
reg resetn = 0;
+ integer cycles = 0;
+
+ always @(posedge clk)
+ cycles <= cycles + 1;
initial begin
$dumpfile("testbench.vcd");
@@ -92,6 +96,7 @@ module testbench;
$write("<GPIO:%02x>", gpio[7:0]);
if (gpio == 63) begin
$display("[OK]");
+ $display("Finished after %0d cycles.", cycles);
$finish;
end
if (gpio % 8 == 7) begin