From 6d7847c35f32159d121c427726cf38644ac98c69 Mon Sep 17 00:00:00 2001 From: Sean Anderson Date: Sat, 6 Aug 2022 15:55:51 -0400 Subject: [PATCH] common: Add levels parameter to DUMP This adds a levels parameter to DUMP, allowing dumping just the top-level signals, instead of the whole hierarchy. This is helpful for post-synthesis simulation, where all sub-modules are primitives (with their inputs and outputs already available at the top level). Signed-off-by: Sean Anderson --- rtl/common.vh | 6 +++--- rtl/pcs.v | 2 +- rtl/pmd.v | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/rtl/common.vh b/rtl/common.vh index 108bb58..161b4d0 100644 --- a/rtl/common.vh +++ b/rtl/common.vh @@ -7,14 +7,14 @@ `define COMMON_VH `ifdef SYNTHESIS -`define DUMP +`define DUMP(levels) `else -`define DUMP \ +`define DUMP(levels) \ reg [4096:0] vcdfile; \ initial begin \ if ($value$plusargs("vcd=%s", vcdfile)) begin \ $dumpfile(vcdfile); \ - $dumpvars; \ + $dumpvars(levels); \ end \ end `endif diff --git a/rtl/pcs.v b/rtl/pcs.v index edef284..216f6a1 100644 --- a/rtl/pcs.v +++ b/rtl/pcs.v @@ -92,7 +92,7 @@ module pcs ( assign col = transmitting && receiving; assign crs = transmitting || receiving; - `DUMP + `DUMP(0) endmodule diff --git a/rtl/pmd.v b/rtl/pmd.v index 244d1cc..28b98b1 100644 --- a/rtl/pmd.v +++ b/rtl/pmd.v @@ -225,6 +225,6 @@ module pmd ( end `endif - `DUMP + `DUMP(0) endmodule