To VCD File - Generate value change dump (VCD) file

Library

EDA Simulator Link DS

Description

The To VCD File block generates a VCD file that contains information about changes to signals connected to the block's input ports and names the file with the specified file name. VCD files can be useful during design verification. Some examples of how you might apply VCD files include the following cases:

In addition, VCD files include data that can be graphically displayed or analyzed with postprocessing tools. Examples of postprocessing include the extraction of data pertaining to a particular section of a design hierarchy or data generated during a specific time interval.

Using the Block Parameters dialog box, you can specify the following:

VCD files can grow very large for larger designs or smaller designs with longer simulation runs. However, the size of a VCD file generated by the To VCD File block is limited only by the maximum number of signals (and symbols) supported, which is 943 (830,584).

For a description of the VCD file format, see VCD File Format.

Dialog Box

VCD file name

The file name to be used for the generated VCD file. If you specify a file name only, Simulink places the file in your current MATLAB directory. Specify a complete path name to place the generated file in a different location. If you specify the same name for multiple To VCD File blocks, Simulink automatically adds a numeric postfix to identify each instance uniquely.

Number of input ports

The number of block input ports on which signal data is to be collected. The block can handle up to 943 (830,584) signals, each of which maps to a unique symbol in the VCD file.

In some cases, a single input port maps to multiple signals (and symbols). This occurs when the input port receives a multi-dimensional signal.

Because multi-dimensional signals are not part of the VCD specification, they are flattened to a 1D vector in the file.

Timescale

Choose an optimal timing relationship between Simulink and the HDL simulator.

The timescale options specify a correspondence between one second of Simulink time and some quantity of HDL simulator time. This quantity of HDL simulator time can be expressed in one of the following ways:

VCD File Format

The format of generated VCD files adheres to IEEE Std 1364-2001. The following table describes the format.

Generated VCD File Format

File ContentDescription
$date
23-Sep-2003 14:38:11
$end
Data and time the file was generated.
$version EDA Simulator Link™ DS version 
1.0 $ end
Version of the VCD block that generated the file.
$timescale 1 ns $ end
The time scale that was used during the simulation.
$scope module manchestermodel $end
The scope of the module being dumped.
$var wire 1 ! Original Data [0] $end
$var wire 1 " Recovered Clock [0] $end
$var wire 1 # Recovered Data [0] $end
$var wire 1 $ Data Validity [0] $end
Variable definitions. Each definition associates a signal with character identification code (symbol). The symbols are derived from printable characters in the ASCII character set from ! to ~. Variable definitions also include the variable type (wire) and size in bits.
$upscope $end
Marks a change to the next higher level in the HDL design hierarchy.
$enddefinitions $end
Marks the end of the header and definitions section.
#0
Simulation start time.
$dumpvars
 0!
 0"
 0#
 0$
$end
Lists the values of all defined variables at time equals 0.
#630
 1!
The starting point of logged value changes. Variable values are checked at each simulation time increment and are logged if a change occurs. This entry indicates that at 63 nanoseconds, the value of signal Original Data changed from 0 to 1.
.
.
.
#1160
 1#
 1$
At 116 nanoseconds the values of signals Recovered Data and Data Validity changed from 0 to 1.
$dumpoff
 x!
 x"
 x#
 x$
$end
Marks the end of the file by dumping the values of all variables as the value x.

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS