summaryrefslogtreecommitdiff
path: root/testbench.vh
diff options
context:
space:
mode:
authorBobby Bingham <koorogi@koorogi.info>2017-01-08 14:31:29 -0600
committerBobby Bingham <koorogi@koorogi.info>2017-01-08 22:02:28 -0600
commit06089575a8624e6080094a02758dbf724b2fe819 (patch)
tree255815bdc0d3c92e25d792cb9d3658d806a0ea29 /testbench.vh
parentf8d09347a43ddab462d94f716e0a6f249e2e6635 (diff)
Define macro to simplify dumping of waves
Diffstat (limited to 'testbench.vh')
-rw-r--r--testbench.vh6
1 files changed, 6 insertions, 0 deletions
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;