📉 VCD – Value Change Dump #
VCD (Value Change Dump) is a standard waveform file format generated during Verilog simulation. It records signal transitions over time, which can be viewed in tools like GTKWave.
✅ How to Generate VCD: #
Inside your testbench:
initial begin
$dumpfile("wave.vcd"); // Output file name
$dumpvars(0, tb_top); // Dump all signals in tb_top hierarchy
end
$dumpfile
: sets the filename.$dumpvars(level, scope)
: sets how many levels of signals to record.
📊 View with GTKWave: #
gtkwave wave.vcd
💡 Additional VCD Tasks #
Task | Description |
---|---|
$dumpfile |
Sets the name of the output VCD file |
$dumpvars |
Starts recording value changes |
$dumpoff |
Temporarily disables dumping |
$dumpon |
Resumes dumping |
$dumpall |
Forces all current values to dump |
$dumpflush |
Flushes data to file immediately |
$dumpports |
Dumps only port-level signals |
✅ Summary #
Concept | Purpose | Used in |
---|---|---|
Namespace | Limits scope of identifiers | Modules |
VCD | Stores signal changes for waveform view | Testbenches |
$dumpfile |
Sets VCD output file | Simulation |
$dumpvars |
Starts signal recording | Simulation |