Table of Contents Previous page Next page Index

ModelSim Documentation Bookcase

Model Technology Inc.


write format

The write format command records the names and display options of the HDL items currently being displayed in the List or Wave window. The file created is primarily a list of add list, add wave, and configure commands, though a few other commands are included (see "Output" below). This file may be invoked with the do command to recreate the List or Wave window format on a subsequent simulation run.

When you load a wave or list format file, ModelSim verifies the existence of the datasets required by the format file. ModelSim displays an error message if the requisite datasets do not all exist. To force the execution of the wave or list format file even if all datasets are not present, use the -force switch with your do command. For example:

VSIM> do wave.do -force

Note that this will result in error messages for signals referencing nonexistent datasets. Also, -force is recognized by the format file not the do command.

Syntax

write format

list | wave <filename>

Arguments

list | wave

Specifies that the contents of either the List or the Wave window are to be recorded. Required.

<filename>

Specifies the name of the output file where the data is to be written. Required.

Examples

write format list alu_list.do

Saves the current data in the List window in a file named alu_list.do.

write format wave alu_wave.do

Saves the current data in the Wave window in a file named alu_wave.do.

Output

Below is an example of a saved Wave window format file.

onerror {resume}
quietly WaveActivateNextPane {} 0
add wave -noupdate -format Logic /cntr_struct/ld
add wave -noupdate -format Logic /cntr_struct/rst
add wave -noupdate -format Logic /cntr_struct/clk
add wave -noupdate -format Literal /cntr_struct/d
add wave -noupdate -format Literal /cntr_struct/q
TreeUpdate [SetDefaultTree]
quietly WaveActivateNextPane
add wave -noupdate -format Logic /cntr_struct/p1
add wave -noupdate -format Logic /cntr_struct/p2
add wave -noupdate -format Logic /cntr_struct/p3
TreeUpdate [SetDefaultTree]
WaveRestoreCursors {0 ns}
WaveRestoreZoom {0 ns} {1 us}
configure wave -namecolwidth 150
configure wave -valuecolwidth 100
configure wave -signalnamewidth 0
configure wave -justifyvalue left 

In the example above, five signals are added with the -noupdate argument to the default window pane. The TreeUpdate command then refreshes all five waveforms. The second WaveActivateNextPane command creates a second pane which contains three signals.The WaveRestoreCursors command restores any cursors you set during the original simulation, and the WaveRestoreZoom command restores the Zoom range you set. These four commands are used only in saved Wave format files; therefore, they are not documented elsewhere.

See also

add list, add wave


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