Verilog::VCD::Writer - VCD waveform File creation module.
version 0.001
use Verilog::VCD::Writer; my $writer=Verilog::VCD::Writer->new(timescale=>'1 ns',vcdfile=>"test.vcd"); $writer->addComment("Author:Vijayvithal"); my $top=$writer->addModule("top"); # Create toplevel module my $TX=$writer->addSignal("TX",7,0); #Add Signals to top my $RX=$writer->addSignal("RX",7,0); my $dut=$top->addModule("DUT"); Create SubModule $dut->dupSignal($TX,"TX",7,0); #Duplicate signals from Top in submodule $dut->dupSignal($RX,"RX",7,0); $writer->writeHeaders(); # Output the VCD Header. $writer->setTime(0); # Time 0 $writer->addValue($TX,0); # Record Transition $writer->addValue($RX,0); $writer->setTime(5); # Time 1ns $writer->addValue($TX,1); $writer->addValue($RX,0);
Adds a comment to the VCD file header. This method should be called before writeHeaders();
Flushes the output buffer.
This module provides an interface for creating a VCD (Value change Dump) file.
The constructor takes the following options
timescale: default is '1ps'
vcdfile: default is STDOUT, if a filename is given the VCD output will be written to it.
Date: a DateTime object, default is current date.
This method should be called after all the modules and signals are declared. This method outputs the header of the VCD file
This method takes the module name as an input string and returns the corresponding Verilog::VCD::Writer::Module object.
This module takes the time information as an integer value and writes it out to the VCD file.
This method takes two parameters, an Object of the type Verilog::VCD::Writer::Signal and the decimal value of the signal at the current time. This module prints the <Signal,Value> information as a formatted line to the VCD file
Vijayvithal Jahagirdar<jvs@cpan.org>
This software is copyright (c) 2017 by Vijayvithal.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Verilog::VCD::Writer, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Verilog::VCD::Writer
CPAN shell
perl -MCPAN -e shell install Verilog::VCD::Writer
For more information on module installation, please visit the detailed CPAN module installation guide.