summaryrefslogtreecommitdiff
path: root/verilator_example_tracing/hello.v
diff options
context:
space:
mode:
Diffstat (limited to 'verilator_example_tracing/hello.v')
-rw-r--r--verilator_example_tracing/hello.v15
1 files changed, 15 insertions, 0 deletions
diff --git a/verilator_example_tracing/hello.v b/verilator_example_tracing/hello.v
new file mode 100644
index 0000000..a62addb
--- /dev/null
+++ b/verilator_example_tracing/hello.v
@@ -0,0 +1,15 @@
+module hello(input clk);
+ reg [31:0] i = 0;
+ initial begin
+ $display("start");
+ $dumpfile("dump.vcd");
+ $dumpvars();
+ end
+ always @(posedge clk) begin
+ if (i == 1000) begin
+ $display("stop");
+ $finish;
+ end
+ i <= i+1;
+ end
+endmodule