Table of Contents Previous page Next page Index

ModelSim Documentation Bookcase

Model Technology Inc.


wlf2log

The wlf2log command translates a ModelSim WLF file (vsim.wlf) to a QuickSim II logfile. The command reads the vsim.wlf WLF file generated by the add list, add wave, or log commands in the simulator and converts it to the QuickSim II logfile format.


Important: This command should be invoked only after you have stopped the simulation using quit -sim or dataset close sim.

Syntax

wlf2log

[-fullname] [-help] [-inout] [-input] [-internal] [-l <instance_path>]
[
-lower] [-o <outfile>] [-output] [-quiet] <wlffile>

Arguments

-fullname

Shows the full hierarchical pathname when displaying signal names. Optional.

-help

Displays a list of command options with a brief description for each. Optional.

-inout

Lists only the inout ports. Optional. This may be combined with the -input, -output, or internal switches.

-input

Lists only the input ports. Optional. This may be combined with the -output, -inout, or internal switches.

-internal

Lists only the internal signals. Optional. This may be combined with the -input, -output, or -inout switches.

-l <instance_path>

Lists the signals at or below the specified HDL instance path within the design hierarchy. Optional.

-lower

Shows all logged signals in the hierarchy. Optional. When invoked without the -lower switch, only the top level signals are displayed.

-o <outfile>

Directs the output to be written to the file specified by <outfile>. Optional. The default destination for the logfile is standard out.

-output

Lists only the output ports. Optional. This may be combined with the -input, -inout, or internal switches.

-quiet

Disables error message reporting. Optional.

<wlffile>

Specifies the ModelSim WLF file that you are converting. Required.

Additional information for QuickSim II users

In some cases your original QuickHDL/ModelSim simulation results (in your vsim.wlf file) may contain signal values that do not directly correspond to qsim_12state values. The resulting QuickSim II logfile generated by wlf2log may contain state values that are surrounded by single quotes, e.g. '0' and '1'. To make this logfile compatible with QuickSim models (that expect qsim_12state) you need to use a QuickSim II function named $convert_wdb().

This function was created to convert logfiles resulting from VHDL simulation that used std_logic and std_ulogic since these data types do not correlate to QuickSim's 12 simulation states. Other VHDL data types such as qsim_state or bit (2 state) do not require conversion as they are directly compatible with qsim_12state QuickSim II Waveform Databases (WDB).

The following procedure can be used to convert a wlf2log-generated logfile into a compatible QuickSim WDB. The procedure below shows how to convert the logfile while loaded into memory in QuickSim II.

  1. Load the logfile (the output from wlf2log) into a WDB other than "forces". "Forces" is the default WDB, so you need to choose a unique name for the WDB when loading the logfile (for example, "fred").
  2. Enter the following at the command prompt from within QuickSim:
$convert_wdb("fred",0)  

The first argument, which is "fred", is the name of the new WDB to be created. The second argument, which is 0, specifies the type of conversion. At this time only one type of conversion is supported. The value 0 specifies to convert std_logic or std_ulogic into qsim_12state.

  1. Do a connect_wdb (either through the pulldown menus, the "Connect WDB" palette icon under "Stimulus", or a function invocation). You specify the name of the WDB that you originally loaded the logfile into (in this case, "fred").

At this point you can issue the "run" command and the stimulus in the converted logfile will be applied. Before exiting the simulation you should save the new WDB ("fred") as a WDB or logfile so that it can be loaded again in the future. The new WDB or logfile will contain the correct qsim_12state values eliminating the need to re-use convert_wdb().


Model Technology Inc.
Model Technology Incorporated
Voice: (503) 641-1340
Fax: (503)526-5410
www.model.com
sales@model.com
Table of Contents Previous page Next page Index

ModelSim Documentation Bookcase