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 <seanga2@gmail.com>
This commit is contained in:
parent
5e1dabf601
commit
6d7847c35f
|
@ -7,14 +7,14 @@
|
||||||
`define COMMON_VH
|
`define COMMON_VH
|
||||||
|
|
||||||
`ifdef SYNTHESIS
|
`ifdef SYNTHESIS
|
||||||
`define DUMP
|
`define DUMP(levels)
|
||||||
`else
|
`else
|
||||||
`define DUMP \
|
`define DUMP(levels) \
|
||||||
reg [4096:0] vcdfile; \
|
reg [4096:0] vcdfile; \
|
||||||
initial begin \
|
initial begin \
|
||||||
if ($value$plusargs("vcd=%s", vcdfile)) begin \
|
if ($value$plusargs("vcd=%s", vcdfile)) begin \
|
||||||
$dumpfile(vcdfile); \
|
$dumpfile(vcdfile); \
|
||||||
$dumpvars; \
|
$dumpvars(levels); \
|
||||||
end \
|
end \
|
||||||
end
|
end
|
||||||
`endif
|
`endif
|
||||||
|
|
|
@ -92,7 +92,7 @@ module pcs (
|
||||||
assign col = transmitting && receiving;
|
assign col = transmitting && receiving;
|
||||||
assign crs = transmitting || receiving;
|
assign crs = transmitting || receiving;
|
||||||
|
|
||||||
`DUMP
|
`DUMP(0)
|
||||||
|
|
||||||
endmodule
|
endmodule
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue