Thursday, 26 September 2013

VCD Description - Export VCD in Xilinx Modelsim - Example

         VCD means Value Change Dump. VCD is an ASCII-based format for dumpfiles generated by EDA logic simulation tools. The standard, four-value VCD format was defined along with the Verilog hardware description language by the IEEE Standard 1364-1995 in 1995. An Extended VCD format defined six years later in the IEEE Standard 1364-2001 supports the logging of signal strength and directionality. The simple and yet compact structure of the VCD format has allowed its use to become ubiquitous and to spread into non-Verilog tools such as the VHDL simulator GHDL and various kernel tracers. A limitation of the format is that it is unable to record the values in memories.



         VCD is in common use for Verilog designs, and is controlled by VCD system task calls in the Verilog source code. ModelSim provides command equivalents for these system tasks and extends VCD support to SystemC and VHDL designs. The ModelSim commands can be used on VHDL, Verilog, SystemC, or mixed designs.
        Extended VCD supports VHDL and Verilog ports in a mixed-language design containing SystemC, however Extended VCD does not support SystemC ports in these desings.
 
 
VCD FILE CREATION IN XILINX ISIM:
Enter the following script in ISIM Command Prompt at the end of simulation
Syntax:
         vcd dumpfile adder_dump.vcd
         vcd dumpvars –m adder

 Example for an adder,
        vcd dumpfile adder_dump.vcd
        vcd dumpvars –m adder

VCD FILE CREATION IN MODELSIM:
There are two flows in ModelSim for creating a VCD file.
·         One flow produces a four-state VCD file with variable changes in 0, 1, x, and z with no strength information.
·         The other flow produces an extended VCD file with variable changes in all states and strength information and port driver data.
Both flows will also capture port driver changes unless filtered out with optional command-line arguments.

        Enter the following script in VSIM Command Line at the end of simulation
Syntax four-state VCD export:
vcd file <filename>
vcd add <signals>
run

Syntax Extended VCD export:
vcd dumpports -file <filename> <signals>
run

Example for an adder,
vcd file addr.vcd
vcd add Test_Bench/UUT/*
run
vcd dumpports -file addr2.vcd Test_Bench/UUT/*
run



0 comments:

Post a Comment

Search Here...