From 06089575a8624e6080094a02758dbf724b2fe819 Mon Sep 17 00:00:00 2001 From: Bobby Bingham Date: Sun, 8 Jan 2017 14:31:29 -0600 Subject: Define macro to simplify dumping of waves --- testbench.vh | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'testbench.vh') diff --git a/testbench.vh b/testbench.vh index 9838164..c60f66d 100644 --- a/testbench.vh +++ b/testbench.vh @@ -4,6 +4,12 @@ `define MAX_LINE_LENGTH 128 `define EOF 32'hFFFF_FFFF +`define STRINGIFY(x) `"x`" + +`define DUMPWAVE(m) \ + $dumpfile({`STRINGIFY(m), ".vcd"}); \ + $dumpvars(0, m); + task skip_comments(input integer file); integer c, r, quit; reg [8*`MAX_LINE_LENGTH:0] line; -- cgit v1.2.3