User guide
7-21
VCD and VPD File Utilities
Notice that the stimulus from the testbench module named test
propagates through an instance of a module named passer before
it propagates to an instance of a module named adder. The vcat
utility can generate a testbench module to stimulate the instance of
adder in the same exact way but in a more concise and therefore
faster simulating module.
If we use the sample vgen.cfg configuration file in Example 7-1 and
enter the following command line:
vcat filename.vcd -vgen
The generated source file, testbench_top_ad1.v, is as follows:
module tbench_adder ;
wire [1:0] out ;
reg in2 ;
reg in1 ;
initial #131 $finish;
initial $dumpvars;
initial begin
#0 in2 = 1’bx;
#10 in2 = 1’b0;
#20 in2 = 1’b1;
#20 in2 = 1’b0;
#20 in2 = 1’b1;
#20 in2 = 1’b0;
#20 in2 = 1’b1;
#20 in2 = 1’b0;
end
initial begin
in1 = 1’b0;
forever #20 in1 = ~in1 ;
end
adder ad1 (out,in1,in2);
endmodule