Xilinx v14.3-v14.7 ISim User Guide
Xilinx v14.3-v14.7 ISim User Guide
This document applies to the following software versions: ISE Design Suite 14.3 through 14.7
Xilinx is disclosing this user guide, manual, release note, and/or specification (the “Documentation”) to you solely for use in the development
of designs to operate with Xilinx hardware devices. You may not reproduce, distribute, republish, download, display, post, or transmit the
Documentation in any form or by any means including, but not limited to, electronic, mechanical, photocopying, recording, or otherwise,
without the prior written consent of Xilinx. Xilinx expressly disclaims any liability arising out of your use of the Documentation. Xilinx reserves
the right, at its sole discretion, to change the Documentation without notice at any time. Xilinx assumes no obligation to correct any errors
contained in the Documentation, or to advise you of any corrections or updates. Xilinx expressly disclaims any liability in connection with
technical support or assistance that may be provided to you in connection with the Information.
THE DOCUMENTATION IS DISCLOSED TO YOU “AS-IS” WITH NO WARRANTY OF ANY KIND. XILINX MAKES NO OTHER
WARRANTIES, WHETHER EXPRESS, IMPLIED, OR STATUTORY, REGARDING THE DOCUMENTATION, INCLUDING ANY
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NONINFRINGEMENT OF THIRD-PARTY
RIGHTS. IN NO EVENT WILL XILINX BE LIABLE FOR ANY CONSEQUENTIAL, INDIRECT, EXEMPLARY, SPECIAL, OR INCIDENTAL
DAMAGES, INCLUDING ANY LOSS OF DATA OR LOST PROFITS, ARISING FROM YOUR USE OF THE DOCUMENTATION.
© Copyright 2012 Xilinx, Inc. XILINX, the Xilinx logo, Virtex, Spartan, ISE, and other designated brands included herein are trademarks of
Xilinx in the United States and other countries. All other trademarks are the property of their respective owners. PCI, PCIe and PCI Express
are trademarks of PCI-SIG and used under license
Revision History
The following table shows the revision history for this document.
Chapter 1
Introduction to ISim
Xilinx® ISim is a Hardware Description Language (HDL) simulator that lets you perform
behavioral and timing simulations for VHDL, Verilog, and mixed VHDL/Verilog
language designs.
This document describes the ISim tool features, lists the HDL languages that ISim
supports, and explains the methods of interfacing with the tool. For easier navigation
through this document, in your PDF reader, turn on Previous View and Next View
buttons to navigate back and forth to linked information.
Simulation Libraries
ISim uses precompiled simulation device libraries and updates those libraries
automatically when updates are installed.
Note: Do not run the Simulation Library Compilation Wizard (Compxlib) to compile libraries for
use with ISim.
Language Support
ISim supports the following languages:
• VHDL IEEE-STD-1076-1993
• Verilog IEEE-STD-1364-2001
• Standard Delay Format (SDF) version 2.1
• VITAL-2000
Feature Support
The following features are supported:
• Incremental compilation
• Source code debugging
• SDF Annotation
• VCD Generation
• Power analysis and optimization using SAIF
• Native support for HardIP blocks (such as MGT, PPC, andPCIe®)
• Multi-threaded compilation
• Hardware Co-Simulation (HWCoSim)
• Mixed VHDL/Verilog
• Memory Editor for viewing and debugging memory elements
• Single-click simulation re-compile and re-launch
• Easy to use, one-click compilation and simulation
• Built-in Xilinx simulation libraries
You can specify -tclbatch <file_name> option to the simulation executable to run
a set of Tcl commands after simulation has been loaded. You must have quit as the last
Tcl command if you want the simulation to quit upon completion. For more
information, see Chapter 3, Compilation and Simulation.
Stimulus File
Include an HDL-based test bench as the stimulus file. You can create or edit your test bench
using any of the following:
• Text Editor:
Create or edit an HDL test bench in any text editor.
• Language Templates:
Use a template to populate the file correctly, such as those available with the ISE tool.
For more information, see “Using the Language Templates” in ISE Help.
• Third-party tool:
Create or edit an HDL test bench in any vendor-provided tool.
User Libraries
Depending upon how you launch ISim, there are different methods available to add user
libraries:
• When launching Project Navigator, define the user libraries in the ISE tool. See
“Working with VHDL Libraries” in ISE Help for details.
• When using ISim standalone, interactive command mode, or non-interactive mode,
set the library mapping file (see Appendix A, Library Mapping File (xilinxisim.ini) to
point to your logical or physical libraries.
• When launching ISim from the PlanAhead tool, define the user libraries in that tool.
See the PlanAhead User Guide (UG632) for more information. Appendix D, Additional
Resources, contains a link to the document.
GUI Mode
When you invoke ISim from either the ISE or the PlanAhead tool, the ISim GUI is
launched, the design is parsed, and design components are elaborated. For details, see
“Simulation from ISE” in Step 3: Simulating the Design, or the PlanAhead User Guide
(UG632). The design is parsed and elaborated manually at the command line, as described
in the next section. Then you can invoke the generated simulation executable with the
-gui mode to launch the GUI.
Provide this file to Xilinx® Technical Support for further assistance. This file also does not
disclose any design data, and is safe to share with Xilinx Technical Support if you report a
problem.
ISim Tutorials
See the following tutorials for more information:
• ISE Simulator (ISim) In-Depth Tutorial (UG682)
Demonstrates how to use ISim for design simulation and debugging.
• ISE Hardware Co-Simulation Tutorial: Accelerating Floating Point FFT Simulation (UG817)
Shows how to use the ISim Hardware Co-Simulation (HWCoSim) feature to
accelerate Floating Point FFT simulation.
Appendix D, Additional Resources, provides links to these documents.
Chapter 2
To close ISim, select File > Exit. ISim prompts you to save your waveform configuration
before closing.
Table 2-1 lists the ISim GUI components as idenfied in Figure 2-1, page 9, and links to the
GUI part description.
Note: In your PDF reader, turn on Previous View and Next View Buttons to navigate back and forth
to linked information.
Table 2-1: ISim GUI Components
GUI Part by # Description
1. Menus and Toolbar: Provides access to most operations available in the tool. Some
Commands and operations are available in context menu only.
Shortcuts
2. ISim Menu and Provides access to frequently used commands.
Toolbar
3. Instances and Displays the block (instance and process) hierarchy associated
Processes Panel with the current simulation.
4. Source Files Panel Displays the list of all the files associated with the design.
5. Console Panel Displays messages generated by the simulator. You can enter
simulation Tcl commands at the prompt.
6. Breakpoints Panel Displays a list of all breakpoints currently set in the design.
7. Find in Files Results Displays the results that match a text string in a set of files.
Panel
8. Search Results Panel Displays the results that match the criteria from a search
9. Objects Panel Displays the simulation objects associated with the block
selected in the Instances and Processes panel.
10. Wave Window Displays the wave configuration, which consists of a list of
signals and buses, their waveforms, and any wave objects,
such as dividers, cursor or markers. The Wave window can
display more than one wave configuration.
11. Text Editor Window Displays read-only Hardware Description Language (HDL)
files.
12. Status Bar Displays a brief description for a menu command or toolbar
button that your cursor is placed over, and the simulation
time.
The File menu and the Standard toolbar provide access to the following options:
• New
Use the New dialog box and to select the type of file you want to create. You can open
a new text file, schematic, or symbol.
• Open
Use this option to browse through your directories and select a file to open. The file
displays in the appropriate application or editor.
• Save
Use this option to save the active file to disk and overwrites the previously saved
version. If a file is not saved previously, the Save As dialog box opens and lets you
save the active file to disk.
• Save All
Use this option to save all files that require saving.
• Print
Use the Print dialog box to print an active file.
• Cut, Copy, Paste, Delete are available as well as Undo, Redo, Find, and Find in File.
Moves the main cursor to the nearest marker to the left of the current
position of the marker.
Moves the main cursor to the nearest marker to the right of the main
current position of the marker.
Adds a marker at the position of the main cursor to the Waveform area.
Relaunch Simulation.
The Window toolbar options are the standard options to cascade, tile, show side-by-side,
and bring to front.
Help Toolbar
The Help toolbar provides access to frequently used Help menu commands. Support and
Services displays the Xilinx® Support page in the default web browser.
What’s This? activates tooltips. After clicking this button, you can hover over a menu item
or button and get a brief description of its functionality.
Keyboard Shortcuts
Table 2-3 lists the ISim keyboard shortcuts.
VHDL Entity
VHDL Package
VHDL Block
VHDL Process
Verilog Module
Toggle Floating
Floats the panel. Re-click to restore to its former location.
Close
Closes the panel from view. To restore the panel, select View > Panels and
select the pane to restore to view.
Wave Window
The Wave window displays signals, buses, and their waveforms. Each tab in the Wave
window shows a wave configuration that contains a list of signals and buses, their
properties, and any added wave objects such as dividers, cursors, and markers.
In the GUI, the signals and buses in the wave configuration are traced during simulation,
and you use the wave configuration to examine the simulation results. The design
hierarchy and the signal transitions are not part of the wave configuration, and are stored
in a separate database .wdb file.
Active Window
When you invoke the simulator, the first active window is Default.wcfg. You can change
the active window by clicking the window tab or using the wave add command.
• In the GUI, select File > New or File > Open to change the active window to the
newly created waveform configuration window.
• In Tcl, the wcfg new and wcfg open commands change the active window to the
newly created window just like File > New and File > Open.
Input Port
Output Port
Internal Signal
Variable
Buffer Signal
Input Bus
Output Bus
Internal Bus
Variable Bus
Linkage Bus
Buffer Bus
Markers
A marker is used to mark a particular time for future reference. A marker is a vertical line
intersecting the waveform. A marker lets you display the signal value where the marker
intersects the waveform. The time of the marker displays at the top of the line. In addition,
a series of markers can be used to jump the cursor forward or back for quick analysis of
value change. See Markers in Chapter 4.
Zoom to Full View zooms out to display the entire view in the active window.
Zoom to Cursors displays the waveforms such that the two cursors are at the
left and right edge of the display. If the secondary is off, the command centers
the display around the main cursor without changing the magnification level.
Go To Latest Time moves the cursor and focus to the end of simulation.
Adds a marker at the position of the main cursor to the Waveform area.
Moves the main cursor to the nearest marker to the left of the current position.
Moves the main cursor to the nearest marker to the right of the current position.
Snap to Transition Mode moves the cursor to a transition when you place the
cursor close to the transition. This mode can be switched on or off.
Displays and hides the floating ruler that can be moved to the desired location
in the Wave window.
Objects Panel
The Objects panel displays all simulation objects (ports, signals, variables, constants,
parameters, and generics) associated with the selected instances and processes in the
Instances and Processes panel.
The top of the panel displays which instance or process is selected in the Instances and
Processes panel; those objects and their values are listed in the Objects panel.
The table columns are defined as follows:
• Object Name
Displays the name of the simulation object, accompanied by the symbol which
represents the type of object.
• Value
The value of the simulation object at the current simulation time or at the main cursor,
as determined by the Sync Time button.
• Data Type
Displays the data type of the corresponding simulation object, logic or an array.
Toggle buttons are available in the Objects panel, as described in Table 2-9.
Setting Breakpoints
You can set breakpoints in executable lines in your HDL file so you can run your code
continuously until the source code line with the breakpoint is reached, as described in
Using Breakpoints in Chapter 6.
Note: You can set breakpoints on lines with executable code only.
• Address Radix
Controls the radix of the address displayed in the Memory Editor.
• Value Radix
Controls the radix of the display value in the Memory Editor.
You can float the Memory Editor window and the Memory Editor retains the previous
state after the float operation.
You can navigate inside Memory Editor with the arrow keys, the current position of a
selected item displays on the status bar based on the current address radix.
Console Panel
The Console panel lets you view a log of commands generated by ISim, and enter standard
and ISim-specific Tcl commands at the command prompt. The Console panel shows:
Messages
Generated messages include errors, warnings, and informational messages. The Console
panel also echoes simulator commands that were invoked from the graphical controls in
the ISim GUI.
Simulation commands
The command prompt lets you enter simulation Tcl commands, and to view the command
dump (or print-out) in the Console panel. See Simulating the Design in Chapter 3.
A number of right-click menu commands are available to help manage the contents of the
Console panel.
Breakpoints Panel
A breakpoint is a user-determined stopping point in the source code used for debugging a
design with ISim. The Breakpoints panel displays a list of breakpoints that are set in the
design. See Using Breakpoints in Chapter 6.
For each breakpoint set in your source files, the list in the Breakpoints panel identifies the
file location, filename, and line number. You can delete a selection, delete all breakpoints,
and go to the source code from either the Breakpoint panel toolbar buttons or the context
menu.
To set a breakpoint, use one of the following options:
• Select View > Breakpoint > Toggle Breakpoint.
• Click the Toggle Breakpoint button.
• In the HDL file, click a line of code just to the right of the line number.
• Type bp <option> in the Tcl console.
Alternatively, you can right-click a line of code, and select Toggle Breakpoint.
After the procedure completes, a simulation breakpoint icon appears next to the line
of code.
A list of breakpoints is available in the Breakpoints panel. If you place a breakpoint on a
line of code that is not executable, the breakpoint is not added.
To remove the breakpoint click the breakpoint.
Deletes the selected line from the Breakpoint panel, and deletes the
breakpoint from the HDL source file.
Opens the HDL source file in the text editor with the breakpoint in focus.
Adds the signal associated with the selected search result to the wave
configuration in the Wave window.
Opens the HDL source file in the text editor at the line where the design unit
is defined.
Opens the HDL source file in the text editor at the line where the design unit
is instantiated.
To clear all results from the panel, click the Clear All button.
To open the file that contains the find result in the Workspace, select a find
result, and click the Show Current Result button
Alternatively, you can double-click the find result to open the file.
To view the next find result, click the Show Next Result button.
To view the previous find result, click the Show Previous Result button.
To stop the currently running Find in Files search, click the Stop Job
button.
Re-launching Simulation
The Re-launch button lets you re-launch the ISim simulation after making
a modification in an Hardware Description Language (HDL) file to fix an
identified issue. You also can recompile from the ISim GUI.
Recompile and Re-launch are fully automated features. The dialog box messages specify
where an issue is located. Re-launch keeps all the options as set at compile time, and
automatically runs simulation to the specified runtime when the flow was launched from
either the Project Navigator or the PlanAhead tool.
• When you successfully re-launch a simulation, your simulation completes without
errors.
• When you re-launch an unsuccessful simulation, a dialog box opens with the syntax
error failure to the compiled source code. The links go to the source code with errors
in the source window. It is recommended that you address the linked errors
sequentially to correct the issues and then recompile using the Re-launch button to
verify the fix.
Applying Stimulus
Use the Force Selected Signal dialog box to enter parameters to force a VHDL signal,
Verilog wire, or a Verilog reg to a constant value. This dialog box opens when you select a
signal then right-click the Force Constant option. After you assign a new constant force,
those values override the assignments made from within HDL code or any previously
applied constant or clock force. Click Apply to apply all changes. Figure 2-3 shows the
Force Selected Signal dialog box.
Waveform Window
Time format options apply to the GUI elements inside the waveform viewer window. The
time format options are:
• Link All Waveform Time Units To Ruler
Is on by default and keeps the Units setting of the Cursors/Markers and Measure
Bubble categories in sync with changes to the Ruler category.
• Rulers
Applies to the main ruler at the top of the waveform window as well as to the floating
ruler.
• Cursors/Markers
Applies to the time values displayed for the all cursors and markers.
• Measure Bubbles
Applies to the cursor value bubbles displayed at the bottom of the waveform window.
vlogcomp Command
The vlogcomp command parses Verilog source files and generates a binary
representation of the Verilog files. The binary representation generated by vlogcomp is
used by the fuse command to create a simulation executable.
You must specify either a project file or one or more Verilog source files to compile. If
neither the project file nor the Verilog file is specified, vlogcomp issues an error. See
Project File Syntax, page 43 for information about the project file.
vhpcomp Command
The vhpcomp command parses VHDL source files and stores a binary representation of
the HDL files. The binary representation generated by vhpcomp is used by the fuse
command to create a simulation executable.
Specify either a project file or one or more VHDL files. If neither project file nor VHDL
file are specified, vhpcomp issues an error. See Project File Syntax, page 43 for information
about the project file.
vhpcomp Syntax
To go to the command option, click the option link.
Note: In your PDF reader, turn on Previous View and Next View Buttons to navigate back and
forth.
The vhpcomp command syntax is:
vhpcomp
[-f <cmd_file>]
[-h]
[-i “<include_path>“]
[-intstyle [ise | xflow | silent |default]
[-initfile <sim_init_file>]
[[-L|-lib <search_lib>[=<lib_path>]]
[-prj <prj_file>.prj]
[-rangecheck]
[-v [-verbose] <value>]
[-version]
[<vhdl_files>...]
[-work [<work_library>[=<library_path>] ] <filenames>...
The options descriptions are in the fuse, vhpcomp, and vlogcomp Command Options
section.
Running fuse
The fuse command:
• Performs static elaboration of a design in terms of parsed nodes
• Generates object code for each unique module instance
• Links the generated object codes with the simulation engine library to create a
simulation executable
The fuse command generates object code and data files for each design unit comprising
the design, and puts them in the isim/<simulation_executable>.sim directory.
Note: Do not remove the isim/<simulation_executable>.sim directory; otherwise the
design cannot be simulated.
`uselib Syntax
<uselib compiler directive> ::= `uselib [<Verilog-XL uselib
directives>|<lib directive>]
<Verilog-XL uselib directives> :== dir = <library_directory> | file
= <library_file> | libext = <file_extension>
<lib directive>::= <library reference> { <library reference>}
<library reference> ::= lib = <logical library name>
`uselib Examples
File half_adder.v compiled into File full_adder.v compiled into logical library
logical library named adder_lib named work
module module
half_adder(a,b,c,s); full_adder(c_in, c_out, a, b, sum)
input a,b; input c_in,a,b;
output c,s; output c_out,sum;
s = a ^ b; wire carry1,carry2,sum1;
c = a & b; `uselib lib = adder_lib
endmodule half_adder
adder1(.a(a),.b(b),.
c(carry1),.s(sum1));
half_adder
adder1(.a(sum1),.b(c_in),.c
(carry2),.s(sum));
c_out = carry1 | carry2;
endmodule
Running Simulation
You can run simulation using any of the following methods:
• Using the Command Line
• Using the GUI
Port Mapping
The following rules and limitations for port mapping are used in mixed language projects.
Table 3-2 shows the supported VHDL and Verilog data types for ports on the mixed
language design boundary.
Note: Verilog output port of type reg is supported on the mixed language boundary. On the
boundary, an output reg port is treated as if it were an output net (wire) port.
Note: Any other type found on mixed language boundary is considered an error.
Table 3-5 lists the VHDL type std_logic mappings to Verilog states.
Because Verilog is case sensitive, named associations and the local port names that you use
in the component declaration must match the case of the corresponding Verilog port
names.
-f <cmd_file> Lets you save command options in a text file for future use. This
option reads and executes the saved options that are specified in
<cmd_file>.
-generic_top "<parameter>=<value>" Overrides generic or parameter of a top-level design unit with the
specified value. For example, -generic_top “P=10” applies the
value of 10 on the top-level parameter before elaboration.
Pausing a Simulation
While running a simulation for any length of time, you can pause a simulation using the
Break command, which leaves the simulation session open.
To pause a running simulation, do one of the following:
• Select Simulation > Break.
• Click the Break button.
• Type Ctrl+C at the command line only.
The simulator stops at the next executable HDL line. The line at which the simulation
stopped is displayed in the text editor.
Note: This behavior applies to designs that are not compiled with the -nodebug switch.
The simulation can be resumed at any time by using the Run All, Run, or Step commands.
See Stepping Through a Simulation, page 77.
Closing Simulation
You can terminate a simulation with one of the following commands.
• Select File > Exit.
• Type the quit -f command in the Console at the prompt.
• Click the X at the top-right corner of the main window.
Chapter 4
Waveform Analysis
Before starting the waveform analysis, you need to open the ISim GUI, using one of the
following methods:
• In read-only mode to view or analyze the data from a previous simulation, see
Opening a Static Simulation, page 74.
• From the ISE® or the PlanAhead™ tools, a wave configuration with top-level signals
displays. You can then proceed to add additional signals, or run the simulation. See
Running Simulation in Chapter 3.
• From the command line, run the simulation executable with the -gui switch, and an
empty wave configuration displays. You must add signals to the wave configuration
before you run simulation. See Running Simulation in Chapter 3.
ISim populates design data in other areas of the GUI, such as the Objects , and the Instances
and Processes panel.
Cursors
Cursors are used primarily for temporary indicators of time and are expected to be moved
frequently, as in the case when you are measuring the time between two waveform edges.
For more permanent indicators, used in situations such as establishing a time-base for
multiple measurements, add markers to the Wave window instead. See Markers, page 62
for more information.
Moving a Cursor
To move a cursor, hover over the cursor until you see the grab symbol, and click and drag
the cursor to the new location.
As you drag the cursor in the Wave window, you see a hollow or filled-in circle if the Snap
to Transition button is selected, which is the default behavior.
• A hollow circle indicates that you are between transitions in the waveform of the
selected signal.
• A filled-in circle indicates that you are hovering over the waveform transition of
the selected signal.
A secondary cursor can be hidden by clicking anywhere in the Wave window where there
is no cursor, marker, or floating ruler.
Markers
You can add, move, and delete markers.
Adding a Marker
You add markers to the wave configuration at the location of the main cursor.
1. Place the main cursor at the time where you want to add the marker by clicking in the
Wave window at the time or on the transition.
2. Select Edit > Markers > Add Marker, or click the Add Marker button.
A marker is placed at the cursor, or slightly offset if a marker already exists at the
location of the cursor. The time of the marker displays at the top of the line.
Moving a Marker
After you add a marker, you can move the marker to another location in the waveform
using the drag and drop method.
1. Click the marker label (at the top of the marker) and drag it to the location.
• The drag symbol indicates that the marker can be moved. As you drag the
marker in the Wave window, you see a hollow or filled-in circle if the Snap
to Transition button is selected, which is the default behavior.
• A filled-in circle indicates that you are hovering over a transition of the
waveform for the selected signal or over another marker.
• For markers, the filled-in circle is white.
• A hollow circle indicates that you between transitions in the waveform of
the selected signal.
2. Release the mouse key to drop the marker to the new location.
Deleting a Marker
You can delete one or all markers with one command.
1. Right-click over a marker.
2. Perform one of the following functions:
• Select Delete Marker from the context menu to delete a single marker.
• Select Delete All Markers from the context menu to delete all markers.
Note: You can also use the Delete key to delete a selected marker.
Use Edit > Undo to reverse a marker deletion.
Dividers
Dividers create a visual separator between signals.
Adding Dividers
You can add a divider to your wave configuration to create a visual separator of signals.
1. In a Name column of the Wave window, click a signal to add a divider below that
signal.
2. From the context menu, select Edit > New Divider, or right-click and select New
Divider.
The change is visual and nothing is added to the HDL code. The new divider is saved with
the wave configuration file when you save the file.
Changing Dividers
The following changes can be made to a divider:
• Dividers can be renamed. See Renaming Objects, page 65.
• Dividers can be moved to another location in the waveform by dragging and
dropping the divider name.
Deleting Dividers
To delete a divider, highlight the divider, and click the Delete key, or right-click and select
Delete from the context menu.
Groups
A Group is a collection of expandable and collapsible categories, to which signals and
buses can be added in the wave configuration to organize related sets of signals. The group
itself displays no waveform data but can be expanded to show its contents or collapsed to
hide them.
Adding a Group
To add a Group:
1. In a wave configuration, select one or more signals or buses to add to a group.
Note: A group can also comprise dividers, virtual buses, and other groups.
2. Select Edit > New Group, or right-click and select New Group from the context menu.
A group that contains the selected signal or bus is added to the wave configuration.
A group is represented with the group icon. The change is visual and nothing is
added to the HDL code.
You can move other signals or buses to the group by dragging and dropping the signal or
bus name.
The new group and its nested signals or buses is saved when you save the wave
configuration file.
Changing Groups
You can change groups as follows:
• You can rename Groups. See Renaming Objects, page 65.
• You can move Groups to another location in the Name column by dragging and
dropping the group name.
Removing a Group
To remove a group, highlight it and select Edit > Wave Objects > Ungroup, or right-click
and select Ungroup from the context menu. Signals or buses formerly in the group are
placed at the top-level hierarchy in the wave configuration.
Caution! Pressing the Delete key removes the group and its nested signals and buses from
the wave configuration.
Virtual Buses
You can add a virtual bus to your wave configuration, which is a grouping to which you
can add logic scalars and arrays. The virtual bus displays a bus waveform, which shows
the signal waveforms in the vertical order that they appear under the virtual bus, flattened
to a one-dimensional array
Renaming Objects
You can rename any object in the Wave window, such as signals, dividers, groups, and
virtual buses.
1. Select the object name in the Name column.
2. Right-click, and select Rename from the context menu.
3. Replace the name with a new one.
4. Press Enter or click outside the name to make the name change take effect.
You can also double-click the object name and then type a new name.
The change is effective immediately. Object name changes in the wave configuration do
not affect those in the design source code.
Display Names
You can display the full hierarchical name (long name), the simple signal or bus name
(short name), or a custom name for each signal. The signal or bus name displays in the
Name column of the wave configuration. If the name is hidden:
• Expand the Name column until you see the entire signal name.
• Use the scroll bar in the Name column to view the name.
Radixes
The default radix controls the bus radix displayed in the wave configuration, the Objects
panel, and the Console panel.
To change the radix of an individual signal (HDL object) in the Wave window, use the Wave
window context menu. To change the radix in the Console panel, use the Tcl command, isim
set radix.
4. Select Edit > Markers > Previous Marker, or click the Previous Marker button.
The cursor moves backward through markers in the wave configuration.
5. Observe the values in the Value column at each marker.
Using Go To Time
The Go To Time function lets you jump the main cursor to a particular time in the wave
configuration.
Printing Preview
1. Select File > Print Preview.
2. In the Print Preview dialog box, make sure the wave configuration looks as expected.
3. Select Print or Setup to further customize the print options and layout, and to print.
4. Select Close to close the Print Preview dialog box.
Print preview displays the wave configuration in black and white or color as determined
by your default printer. You can select another printer, if available, just prior to printing.
Printing
1. Select File > Print.
2. In the Print Setup dialog box, specify the Page Orientation, Time Range, Fit Time
Range To, and other display settings.
Note: Time Range is populated with the time range of the main and secondary cursor if both
are placed in the wave configuration.
3. Click OK.
4. In the Print dialog box, select a printer, and click Print.
The wave configuration prints according to the print settings.
Chapter 5
The GUI opens with a new database (a live simulation). If simulation objects from the
WCFG correspond to those in the database, the wave configuration is pre-populated with
data from the database.
For information about creating a new wave configuration, see Working with the Wave
Configuration in Chapter 4.
Chapter 6
As each line is executed, you can see the yellow arrow moving down the code. If the
simulator is executing lines in another file, the new file opens, and the yellow arrow steps
through the code. It is common in most simulations for multiple files to be opened when
running the Step command. The Console panel also indicates how far along the HDL code
the step command has progressed.
Using Breakpoints
A breakpoint is a user-determined stopping point in the source code used for debugging
the design. Breakpoints are particularly helpful when debugging larger designs for which
debugging with the Step command (stopping the simulation for every line of code) might
be too cumbersome and time consuming.
You can set breakpoints in executable lines in your HDL file so you can run your code
continuously until the source code line with the breakpoint is reached.
Note: You can set breakpoints on lines with executable code only. If you place a breakpoint on a line
of code that is not executable, the breakpoint is not added.
Setting a Breakpoint
To set a breakpoint, do the following:
1. Select View > Breakpoint > Toggle Breakpoint, or click the Toggle Breakpoint
button.
2. In the HDL file, click a line of code just to the right of the line number. The
breakpoint icon displays next to the line..
Note: Alternatively, you can right-click a line of code, and select Toggle Breakpoint.
After the procedure completes, a simulation breakpoint icon opens next to the line of
code, and a list of breakpoints is available in the Breakpoints panel.
Deleting Breakpoints
You can delete a single breakpoint or all breakpoints from your HDL source code.
Chapter 8
Prerequisites
Hardware co-simulation has the following requirements:
• Xilinx® ISE® Design Suite 14.x (any edition)
• 32-bit or 64-bit Windows or Linux
• An FPGA board with a JTAG header
Supported FPGA devices are:
• Virtex®-4, Virtex-5, Virtex-6, Virtex-7
• Spartan®-3, Spartan-3E, Spartan-3A, Spartan-3AN, Spartan-3A DSP, Spartan-6
• Artix™-7 and Kintex™-7
• A Xilinx Parallel Cable IV or Platform Cable USB
Use Models
HWCoSim supports two use models: one for pure logic-based designs and another for
hybrid designs.
Hybrid Designs
The pure logic-based design use model is simple and trivial to set up, but is not suitable for
designs that require hard IPs, external I/Os, and specific clock frequencies. ISim
HWCoSim provides a hybrid co-simulation flow that supports designs with the following
characteristics:
• Composed of hard IP blocks, DCMs/PLLs, and MGTs.
• Some clocks are in lockstep with the tool simulation using emulated clock sources,
and other clocks are free-running using external clock sources.
• Some ports can be mapped to external I/Os, which are neither controlled by ISim nor
accessible from tool test bench.
The hybrid co-simulation flow offers the following advantages:
• Accelerates simulation
• Verifies functionality in hardware
• Allows customized or complicated software and hardware interactions beyond a
typical co-simulation setup.
Limitations
HWCoSim has the following limitations:
• Only one instance in a design can be selected for hardware co-simulation, and it
cannot be the top-level test bench itself.
• The selected instance for hardware co-simulation must be able to be synthesized
using XST, and must be able to be implemented on the target FPGA device of the
selected board.
The lockstep hardware co-simulation has additional restrictions on clocking and I/Os:
• The co-simulation instance in hardware is clocked with an emulated clock source that
ISim controls, and is asynchronous to the simulation. Thus, the co-simulation does not
exactly model the design scenario running in hardware, or serve as a timing
simulation.
• The instance under co-simulation cannot have access to external I/Os or
Multi-Gigabit Transceivers (MGTs), nor can it instantiate primitives (such as DCMs/
PLLs) that require a continuous clock or a clock at a specific frequency.
• All ports of the instance under co-simulation must be routable to a slice register or
LUT. Certain resources on the FPGA require dedicated routes, such as to an IOB or to
certain port of a primitive, and thus cannot be wired to any port of the instance under
co-simulation.
Tools Flow
1. Ensure you have ISim selected as the simulator for the project. Switch to the
Simulation view.
2. From the Hierarchy pane, select the instance to co-simulate in hardware and right-click
to show the context menu.
3. From the context menu, select Source Properties to open the Source Properties dialog
box.
4. In the Source Properties dialog box, select Hardware Co-Simulation from the
category list.
Because only one instance can be enabled for hardware co-simulation, enabling a
instance for hardware co-simulation disables any other instance that has been
previously enabled for hardware co-simulation.
• In the Clock Port field, specify the name of the clock port on the instance. For an
instance with multiple clocks, specify the name of the fastest clock port.
• From the Target Board for Hardware Co-Simulation drop down list, select a
board. The list shows only the boards with an FPGA of same project device
family.
• If a previous hardware co-simulation bitstream is available and the instance
under co-simulation remains unchanged, check the Reuse Last Bitstream File
check box to skip the implementation flow for hardware co-simulation.
• Click OK.
Notice that the instance enabled for hardware co-simulation is now marked
with a special icon.
Select the test bench module in the hierarchy pane to the start the simulation.
Hardware Co-Simulation must be started at a level above the instance that is selected
for co-simulation.
6. In the Instances and Processes panel of the test bench, double-click
Simulate Behavior Model to start the compilation and simulation process.
7. Open the Process Properties for the Simulate Behavior Model to specify any
additional options for ISim before starting the compilation and simulation process.
Figure 8-1 through Figure 8-3, page 88 display steps 1 through 8:
2. Copy the original design constraints file and use it as the basis for the custom
constraints file.
3. Modify the custom constraints file to comment out the LOC constraints for those pins
that are controlled by ISim. Other pins with LOC constraints are assumed to be
external.
4. As an example, for a FIFO design that you want to single-step the write side and
free-run the read side, such as:
module FIFO (WCLK, WDATA, WE, RCLK, RDATA, RE);
The isim_hwcosim.ucf would be:
# The following pin LOCs commented out as they are driven by ISim
# NET "WCLK" PERIOD = 5 ns HIGH 50%;
# NET "WCLK" LOC = "A1"; # <--- this becomes single-step clock
# NET "WDATA" LOC = "A2"; # <--- these are accessible from ISim
testbench
# NET "WE" LOC = "A3";
NET "RCLK" PERIOD = 10 ns HIGH 50%;
NET "RCLK" LOC = "B1"; # <-- this becomes free-running clock
NET "RDATA" LOC = "B2"; # <-- these go to external IOBs
NET "RE" LOC = "B3";
Hardware Co-Simulation
Unlike the executable for tool simulation, the executable for HWCoSim communicates
with a hardware board and offloads the simulation of the selected portion of a design into
the hardware. It is invoked in the same way as in the tool simulation flow:
• Invoking the executable launches a Tcl shell interface for controlling the simulation.
• Invoking the executable with the -gui option launches the GUI front end with
waveform display.
Before the simulation starts and each time the simulation is restarted, the executable
configures the FPGA with the hardware co-simulation bitstream. The configuration
process can take a few seconds or longer, depending on the speed of the JTAG cable. ISim
prints a message to the Console panel when the configuration is complete.
• ethernetInterfaceID
Default is an empty string. This property is only available for Ethernet-based
co-simulation interfaces.
If you have multiple Ethernet cards available on your host machine, you need to select
the Ethernet card that is connected to your FPGA board. You can select an Ethernet
card by setting the value of this property to the MAC address (in the format of
xx:xx:xx:xx:xx:xx) of the Ethernet card. For more information, see Determining
the Ethernet, page 94.
Board Support
To support a new FPGA board for hardware co-simulation in ISim, the board must have a
JTAG header. Provide a board support file that records the following information of the
board:
• FPGA part information
• Period and pin location of the system clock
• JTAG boundary scan chain information
After you enter the board information into a board support file, you can use that board for
HWCoSim. There is no GUI option to generate the board support file.
To support additional boards, you can either modify the default board support file or
provide your own board support file, named hwcosim.bsp, in the directory where fuse
is invoked. The board support file contains board specifications in a specific format.
In the following example, ml402-jtag is the board identifier that is provided to the fuse
command to compile the design for the given board.
‘ml402-jtag’ => {
‘Description’ => ‘ML402 (JTAG)’,
‘Vendor’ => ‘Xilinx’,
‘Type’ => ‘jtag’,
‘Part’ => ‘xc4vsx35-10ff668’,
‘Clock’ => {
‘Period’ => 10,
‘Pin’ => ‘AE14’,
},
‘BoundaryScanPosition’ => 3,
},
Where the board identifier includes the following list of properties:
• Description is the description of the board.
• Vendor is the the board vendor.
• Type is the type of co-simulation interface to be used. Allowed values are as
follows:
- jtag
- ppethernet (for Point-To-Point Ethernet-based HWCoSim).
• Part is the part name of the FPGA on the board.
• Clock is the system clock information, where: Period (and VariablePeriods)
specifies the supported clock period(s) in nanoseconds.
• Pin is the clock pin location. For differential clock sources, provide both Positive
and Negative clock pin locations.
• BoundaryScanPosition is the position of the FPGA on the JTAG boundary
scan chain, beginning with 1. This information can be determined by running the
Xilinx iMPACT tool.
Note: For P2P Ethernet HWCoSim, additional fields must be specified. See the setup for the
ml605-ppethernet entry in the $XILINX/sysgen/hwcosim/data/hwcosim.bsp file as an
example.
c. Locate the physical address of the Ethernet port connected to the co-simulation
board.
d. Convert the physical address delimiter from a dash (-) to a colon (:). For example:
00:19:B9:75:E5:95
2. Set and verify the correct Ethernet port, as follows:
a. Open the GUI.
b. Select the Design under Test (DUT).
c. Go to the Tcl Console panel.
d. In the Tcl Console panel, type the following commands:
i. Set the Ethernet address:
hwcosim set
ethernetInterfaceID <##:##:L#:##:L#:##> <physical address>
ii. Verify the Ethernet address:
hwcosim get ethernetInterfaceID
iii. Verify that the simulation runs:
run 10us
General
1. Q: Does HWCoSim support any kind of designs?
A: Certain limitations, described in Limitations, page 84, apply.
2. Q: Is IHWCoSim a functional simulation or a timing simulation?
A: It is a functional simulation assisted with hardware, which is bit-and-cycle accurate
with respect to the pure tool simulation.
3. Q: How do I use my own board?
A: You can add your own board in the board support file as described in Board
Support, page 92.
Compilation
1. Q: Can I co-simulate multiple instances in the design in hardware?
A: No. Only one instance can be selected for hardware co-simulation. You can
co-simulate the parent instance of the multiple instances or group the multiple
instances into one instance.
2. Q: What happens if the DUT already instantiates a BSCAN primitive (such as the
ChipScope debugging tool ICON)?
A: The hardware co-simulation interface uses a BSCAN primitive at location 1, which
could result in an error in MAP if the DUT also instantiates another BSCAN primitive
at location 1.
You might need to change the ChipScope ICON to use a different location for the
BSCAN primitive. Some device families, such as Spartan-3, have only one BSCAN
primitive, where the hardware co-simulation interface cannot coexist with a
ChipScope ICON module.
To share the JTAG cable with ChipScope Analyzer or the XMD, run the Tcl command:
hwcosim set shareCable 1.
Simulation
1. Q: Can I skip the FPGA configuration and reuse the last downloaded bitstream for
multiple co-simulation runs?
A: There is no command line or GUI option for that; however, you can run this Tcl
command: -hwcosim set skipConfig 1. Be aware that, by skipping the bitstream
configuration, the design running in the FPGA maintains its previous states across
simulation runs. You might need to appropriately reset the design in the test bench
when a new simulation run starts.
2. Q: Can I probe a signal inside the DUT that is co-simulated in hardware?
A: No. Only the port interface of the DUT can be accessed from ISim through the
hardware co-simulation interface. To debug an internal signal, you need to route the
signal to a port of the DUT.
Tcl Commands
Engine Commands
bp
The bp command controls the setting and removal of breakpoints in the HDL source code
that you are simulating. A breakpoint is used to interrupt the simulation during
debugging.
bp Command Syntax
bp add <file_name> <line_number> clear
del <index> [<index>... ]list
remove <file_name> <line_number>
bp Command Options
Table 9-3: bp Command Options
Option Description
add <file_name> Adds a breakpoint at the given line in the HDL file.
<line_number> The <file_name> is the name of the HDL source file that you
are simulating where you want to put a breakpoint.
<line_number> is the number of the line of HDL code where
you want the simulation to stop.
clear Deletes all breakpoints for all loaded HDL files. If you have
breakpoints in multiple files, all breakpoints are deleted.
del <index> Deletes individual breakpoints from your HDL code. Before
[<index>... ] using this command, run the bp list command to obtain the
index numbers for your breakpoints. See the list option for
details.
<index> is the index number assigned to the breakpoint you
want to delete. Each breakpoint in your design is assigned a
unique index number.
Note: This index is not the line number of the breakpoint in the
source file.
bp Command Examples
Set a breakpoint at line 2 for the file statmach.vhd:
bp add statmach.vhd 2
describe
The describe command displays information about the given HDL data or block object.
dump
The dump command displays values for all VHDL signals and generics, and Verilog wires,
non-subprogram regs, and parameters in the current scope.
To navigate the design hierarchy, use the scope command. The dump command uses the
default radix set using the isim set radix command.
help
The help command displays a description with usage and syntax of the specified ISim Tcl
command. With no command specified, the help command displays descriptions, usage
and syntax for ISim Tcl commands.
help
For a description of the bp command:
help bp
isim condition
The isim condition command adds, removes, or generates a list of conditional actions.
A conditional action is equivalent to a VHDL process or a Verilog always block. When
added, it starts monitoring signals (those that appear in the isim condition
expression) continually during simulation. The condition expression is evaluated anytime
a signal change is detected. When a specified condition expression is met, the specified
command runs.
• isim condition remove stops monitoring signals.
• isim condition list lists all active conditional actions added and their labels and
IDs.
isim force
The isim force command forces a VHDL signal, Verilog wire, or Verilog reg to a constant
value or a repeating pattern over time. The value applied by the isim force command
overrides any value assigned from within the HDL code, or any value applied by a
previous force. The force remains active until cancel time, if a cancel time is specified, or
until an explicit isim force remove command is issued.
• For a VHDL signal or a Verilog wire, removal of a force restores the value of the signal
or the wire to the current driven value.
• For a Verilog reg, the forced value is retained even after the applied force has been
removed until the time one of the HDL processes that write into the Verilog reg gets to
assign a new value to the reg.
Assigning a Value
Force signal rst to 0 starting at the current simulation time:
isim force rst 0
Force signal rst to 1 starting at 10 ns from the current simulation time and cancel forcing
after 50 ns from the current simulation time:
isim force rst 1 -time 10 ns -cancel 50 ns
Apply a clock to the signal clk such that clk goes to 1 at current simulation time, goes back
to 0 at 20 ns later, and then repeats this every 40 ns until 1us from the current simulation
time (for example, to generate a clock with 50% duty cycle and 40 ns period for a duration
of 1 us):
isim force clk 1 -value 0 -time 20 ns -repeat 40 ns -cancel 1 us
To:
• Force signal data_in to 1 at current simulation time
• Set data_in to 0 at current simulation time + 50 ns
• Set data_in back to 1 at current simulation time + 75 ns
• Repeat this 101 pattern every 100 ns for a duration of 5000 ns:
force add data_in 1 -value 0 -time 50 ns -value 1 -time 75 ns -repeat
100 ns -cancel 5000 ns
Removing a Value
Remove the values on signals s, s1, and s2:
isim force remove s s1 s2
The isim get userunit command displays the current unit of measurement for all time
values where unit is unspecified. The unit of measurement can be set with the isim set
userunit command.
isim ltrace
The isim ltrace command lets you turn line tracing on or off. When line tracing is
turned on, you can do a line-by-line analysis for debugging. Executed HDL lines print to
the screen with the following information: simulation time, filepath, filename, and line
number.
Note: isim ltrace on can slow the simulation.
isim ltrace on
run
The output lists the simulation_time, filename, line number, as follows:
1005 ns “C:/Data/ISE_Projects/freqm/watchver/
stopwatch_tb.v”:261005 ns “C:/Data/ISE_Projects/freqm/watchver/
stopwatch_tb.v”:271005 ns(3) “C:/Data/ISE_Projects/freqm/watchver/
statmach.v”:631005 ns(3) “C:/Data/ISE_Projects/freqm/watchver/
statmach.v”:64
isim ptrace
The isim ptrace command lets you turn process tracing on or off. When turned on, the
command also displays the name of the currently executing VHDL or Verilog process in
the Simulation Console panel. This is useful if the simulator is stuck in an infinite loop, in
which case the command points out the exact process where the simulator is stuck.
The isim set userunit command let you set the default unit of measurement for all
time values where unit is unspecified. The default time unit is the same as the time-unit of
the engine as set in the fuse command -timescale or -override_timeunit options.
In the absence of these fuse options, the timescale is determined by:
• The default time unit, which is 1ps.
• As defined by the ‘timescale simulator directive in Verilog.
Example
Set the simulator timescale to 1 ps:
isim set userunit 1 ps
onerror
The onerror command lets you control the behavior immediately following a failed Tcl
simulation command. See examples for various applications, such as printing the error and
resuming the next command. This command can be used to debug simulation command
errors, and is particularly useful when running a Tcl script in which an error is
encountered.
Note: This command is not intended for users who type one Tcl command at a time at the Tcl
prompt.
put
The put command lets you modify values of signals or buses during simulation. The put
command can be used to assign:
• Aspecified signal or bus
• An array of signals or buses
• A record or array of records containing signals or buses
• A value with the specified radix is put to an object
To use the put command, the signal or bus must be declared as a signal in your Hardware
Description Language (HDL) source code.
You cannot use the put command to assign a value to a VHDL variable, a VHDL generic,
or a Verilog parameter. You can assign values to the whole signal, a bit of a signal or a slice
of a signal. You can also access the signal hierarchically. This command can be overridden.
The stimulus from your design can override the put command; consequently, the
command is temporary.
Assign a value to an array of records which in turn contain an array of standard logic
vectors that is declared as follows:
type ram_3d_vector is array(0 to 10, 7 downto 0, 0 to 2) of
std_logic_vector(1 to 4);
type rectype is record
a: integer;
b: string(1 to 7);
c: std_logic_vector(0 to 3);
d: ram_3d_vector;
end record;
type recarray is array(0 to 3, 4 downto 1) of rectype;
signal recarrsig: recarray;
signal recsig: rectype;
Set the second element (b) of the record recsig to the string abc:
put recsig.b(2:4)abc
Set the four bit wide vector represented by the coordinates 2,3,1 in the three dimensional
array d in the record recsig to 0110:
put recsig.d(2,3,1) 0110
Set the first two bits of the four bit wide vector represented by the coordinates 2,3,1 in the
three dimensional array d in the record recsig to 01:
put recsig.d(2,3,1)(1:2) 01
Set the four bit wide vector represented by the coordinates 2,3,1 in the three dimensional
array d in the record recsig represented by the coordinates 2,2 in the two dimensional
array recarrsig to 0011:
put recarrsig(2,2).d(2,3,1)0011
quit
The quit command exits either the simulation or the tool, depending on the command
options. With no options, the quit command closes the ISim tool after being prompted to
do so (for graphic user interface (GUI) mode) or simply closes ISim (in command-line
mode).
restart
The restart command stops simulation and sets simulation time back to 0. This lets you
start simulation over again within the same simulation run without reloading the design.
The equivalent GUI command is Simulation > Restart.
resume
The resume command is used with the onerror command to continue executing
commands after an error is encountered.
Note: This command has no effect when entered alone.
run
The run command starts simulation. With no options, the run command runs simulation
for 100 ns. The equivalent GUI commands are:
• Simulation > Run All
• Simulation > Run
saif
The saif command lets you create a Switching Activity Interchange format (SAIF) file
and record port and signal switching rates. See Chapter 7, Writing Activity Data for Power
Consumption.
scope
The scope command lets you navigate the design hierarchy. With no options, the scope
command displays the current module information.
sdfanno
The sdfanno command back-annotates VITAL delays from a Verilog Standard Delay
Format (SDF) file to a VHDL design that is made of VITAL-compliant VHDL models. The
sdfanno command also back-annotates to the timing specified in specify blocks of Verilog
modules.
show
The show command displays selected aspects of the design.
show child
If you are located at the top level of the hierarchy in a design called fifo_controller
and type show child, the following hierarchy information displays:
Block Name: <fifo_controller>
Type show child -r for the same level of the design, and the current and recursive
hierarchy information displays.
show driver
If you are located at the top-level of the hierarchy in a design called fifo_count and type
show driver fifocount, the following information displays for the signal fifocount:
<Driver for fifocount>
fifoctlr_cc_v2.v:221
The number 221 at the end of the lines refers to the code line in the source file.
show load
If you are located at the top-level of the hierarchy in a design called fifo_count and type
show load fifocount, the following information displays for the signal fifocount:
<Load for fifocount>
Signal <Hex(0)> (Block: fifo_count/Lsbled/)
Signal <Hex(1)> (Block: fifo_count/Lsbled/)
Signal <Hex(2)> (Block: fifo_count/Lsbled/)
Signal <Hex(3)> (Block: fifo_count/Lsbled/)
show scope
If you are located at the top level of the hierarchy in a design called fifo_count and type
show scope, the following information displays:
<Block> /tb_cc_func/
step
The step command advances to the next line of executable code in the Verilog or VHDL
file. The equivalent GUI command is Simulation > Step.
test
The test command compares the actual value of a VHDL signal, Verilog wire, Verilog reg,
VHDL generic, Verilog parameter or VHDL process variable in the current scope with a
supplied value.
If the two values match, nothing is displayed. Otherwise the current correct value is
displayed, and ISim reports an error. You can test one bit, a slice of a vector element or a
whole value.
Compare the four bit wide vector represented by the coordinates 2,3,1 in the three
dimensional array d in the record recsig to 0110:
test recsig.d(2,3,1) 0110
Compare the first two bits of the four bit wide vector represented by the coordinates 2,3,1
in the three dimensional array d in the record recsig to 01:
test recsig.d(2,3,1)(1:2) 01
Compare the four bit wide vector represented by the coordinates 2,3,1 in the three
dimensional array d in the record recsig represented by the coordinates 2,2 in the two
dimensional array recarrsig to 0011:
test recarrsig(2,2).d(2,3,1)0011
vcd
The vcd command generates simulation results in Value Change Dump (VCD) format.
This command lets you:
• Dump specified instances to a VCD file
• Name the VCD file
• Start and stop the dump process
and other functions. See Chapter 7, Writing Activity Data for Power Consumption.
wave log
The wave log command logs simulation output of HDL object(s) to a waveform database
(wdb) file. VHDL signal, Verilog wire, and Verilog reg type HDL objects can be logged.
Logging of VHDL variables is not supported.
(for example: /tb/UUT) of a block in which case all HDL objects within the given
block are logged.
Wild characters such as * are not supported in the <object_name>.
To add all HDL objects inside instance of a block, the instance name of the block
can be used (for example: wave add /UUT is the same as wave add /UUT/* if *
were supported).
wcfg open
The wcfg open command opens a wave configuration from a file into a new window.
wcfg save
The wcfg save command saves the active wave configuration to a file.
wcfg select
The wcfg select command makes the specified wave configuration the active window.
wave add
The wave add command adds HDL object(s) to the currently active wave configuration in
the ISim graphical user interface and logs simulation output of the HDL object(s) to a
waveform database (wdb) file. The waveform database file is named as isim.wdb by
default and can be changed using the -wdb switch with the simulation executable. The
wave configuration displays in the Wave window.
The equivalent GUI command is to right-click in the wave window for the context menu
and select the Add to Wave Window option.
divider add
The divider add command adds a new divider.
group add
The group add command adds a new group.
virtualbus add
The virtualbus add command adds a new virtual bus to the currently active waveform
configuration. The bus is empty when it is created. Subsequently, HDL objects can be
added to populate the virtual bus as desired.
Option Description
<name> Name of the virtual bus.
-into <ID> Specifies the object ID of an existing virtual bus into which to add the
new virtual bus.
-reverse Reverses the bus order.
-radix <radix> Uses the specified radix when displaying signal values.
The value of <radix> is one of bin, oct, hex, signed, dec, or
ascii.
-color <color> Sets the virtual bus color as specified. The value of is defined in RGB
format. For example:
#0000FF is blue, #FF0000 is red, and #00FF00 is green.
You can also specify the textual name of a color for some of the popular
colors. The following color names are accepted: black, red,
darkred, green, darkgreen, blue, darkblue, cyan,
darkcyan, magenta, darkmagenta, darkyellow, gray,
darkgray, lightgray. The RGB values for these colors are defined
in the RGB table.
Create a virtual bus that adds two simulation objects, sigA and sigB, to the virtual bus:
set vbusId [virtualbus add mybus -radix hex]
wave add sigA -into $vbusId
wave add sigB -into $vbusId
marker add
Appendix B
Appendix C
About ModelSim XE
ModelSim XE stands for ModelSim Xilinx Edition, which is an OEM product from Mentor
Graphics. ModelSim XE provides a complete HDL simulation environment that lets you
verify the functional and timing models of your design, and your HDL source code.
ModelSim XE was discontinued in the Xilinx ISE® Design Suite 12.4 tool release. See the
Product Discontinuance Notice at:
http://www.xilinx.com/support/documentation/customer_notices/xcn10028.pdf
ModelSim XE was shipped with each major Xilinx ISE Design Suite release through
version 12.3. There were two versions:
• ModelSim XE Starter - a free version that can be downloaded from the Xilinx website.
A starter license is required for using this product.
• ModelSim XE Full - an OEM version from Mentor Graphics, based on their PE
product line.
About ISim
ISim is a Xilinx simulation product that provides a complete, full-featured HDL simulator
integrated within the ISE tool and the PlanAhead™ tool, Embedded Development Kit
(EDK), and System Generator.
ISim is available with all major Xilinx tools releases and comes in two versions:
• ISim Lite: A limited version of the ISE Simulator. In this version, when your design
plus test bench exceeds 50,000 lines of HDL code, the simulator begins to derate the
performance of the simulator for that invocation.
• ISim Full: The full version of ISE Simulator.
Feature Comparison
Table C-1: ModelSim and ISim Feature Comparison
Feature ModelSim XE Starter ModelSim XE Full ISim Lite ISim Full
Line Limit (Statements) 10,000 40,000 50,000 None
Performance 30% of ModelSim PE 40% of ModelSim PE Same as Same as
or ModelSim DE or ModelSim DE ModelSim XE ModelSim XE
Mixed Language No No Yes Yes
VHDL Yes Yes Yes Yes
Verilog Yes Yes Yes Yes
System Verilog for
No No No No
Design
System Verilog for
No No No No
Verification
Debugging
Yes Yes Yes Yes
Environment
Standalone Waveform
Yes Yes Yes Yes
Viewer
Memory Viewer/Editor Yes Yes Yes Yes
Verilog PLI/VPI Yes Yes No No
VHDL FLI/VHPI No No No No
Code Coverage No No No No
SecureIP/HardIP
No No Yes Yes
Support
EDK Support No No Yes Yes
System Generator
No No Yes Yes
Support
CORE Generator
Yes Yes Yes Yes
Support
MIG Support No No Yes Yes
Simulation Process
This section describes the different modes of simulation and the steps involved in
simulation. Each sub-section explains the differences between the two simulators.
Figure C-1 shows the different steps in simulation and the process for each step.
-ODEL3IM 8% )3%
3EPARATE DOWNLOD ,IBRARIES PRE
'ATHERING FILES
OF LATEST LIBRARIES COMPILED AND
MAPPING LIBRARIES
FROM LOUNGE PRE
MAPPED IN )3%
VHPCOMP
VCOM VLOG 0ARSING
VLOGCOMP
ELABORATING
AND FUSE
XEXE OR XEXE
GUI
VSIM 3IMULATING %8% CAN BE
RENAMED IN FUSE
4CL CONSOLE
4CL CONSOLE
WAVEFORM VIEWER
%XAMINING WAVE CONFIGURATION
LIST WINDOW
DEBUGGING MEMORY VIEWER
MEMORY VIEWER
OBJECTS WINDOW
OBJECTS WINDOW