0% found this document useful (0 votes)
135 views

ISM User Guide

user guide

Uploaded by

Naveen Kota
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
135 views

ISM User Guide

user guide

Uploaded by

Naveen Kota
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 201
ISim User Guide UG6EO (v13.4) January 27, 2012 © XILINX. & XILINX. %ilinx is disclosing this user guide, manual, release note, and/or specification (the “Documentation”) to you solely for usein the development of designs to operate with Xilirxc hardware devices. You may not reproduce, distribute, republish, download, display, post, or transmit the Documentation in any form or by any means induding but not limited to, electronic, mechanical, photocopying, recording, or otherwise, without the prior mitten consent of Xilinx, Xilinx exprestly disclaims any liability arising out of your use of the Documentation. Yilinx reserves the night, atits sole discretion, to change the Documentation without notice at any time Xilinx ‘assumes no obligation to correct any errors contained in theDocumentation, orto advise you of any corrections or updates. Xilinx expressly disclaims any liability mi 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 2002-2012 Xilinx Inc. All Rights Reserved. XILINX, the Xilinx logo, the Brand Window and other designated brands induded herein are trademarks of Xilinx, Inc. All other trademarks are the property of their respective owners. The Power? Cname and logo areregistered trademarks of IBM Corp., and used under license. All other trademarks are the property of their respective owners, Revision History ‘The following table chovws the revision history for this document Date Version Description ronson 133 Updated with modifications to match releave Added ‘Revision History (this topic) * Adastional Resources Appendix © Determining the Ethemet Port Tutorial References: Tatorials Updated, # Claniéied wefg and wdb in Saving the Remulte * Ted throughout the document + Removed supported boards from Fuse command, Added:Board Support with new supported boards listed 15am GUI desanption: GUI Overview Peron) 133 ‘Added: Supported prop erties selection options, and new Type value toBoard Supp or. Removed: References to O5 Support. ans ‘(134 No Content changes. Formatting changes only apo ‘(134 Fixing formatting avers ISim User Guide 2 wwwxilinx.com ce60 (v13.4) January 27, 2012 Table of Contents Revision History ... Chapter 1 Getting Started ISim Overview . ISim Operating System Support . Steps in Simulation... Tutorial Chapter 2 Exploring the ISim Graphical User Interface. Graphical User Interface Overview Design Objects and Icons... Arranging the Main Window Wave Window .. Instances and Processes Pane! Objects Panel.. Source Files Panel Text Editor Window Memory Editor Window. Console Panel.... Breakpoints Panel Search Results Panel Find in Files Results Panel Toolbar Commands and Shortcut Applying Stimulus. Applying Clock Stimulus. ISim Preferences ... Chapter 3 VHDL Simulation. VHDL Simulation Overview. Running a Functional Simulation of a VHDL. Design From the Command ine ... Running a Timing Simulation From the Command Line With a VHDL Design Library Mapping File.. Interactive Simulation in Command Line Mode Chapter 4 Verilog Simulation. Verilog Simulation Overview. Sim User Guide UGEEO (v13.4) January 27, 2012 £ XILINX: Running a Functional Simulation of a Verilog Design From the Command Line Running a Timing Simulation of a Verilog Design From the Command Line Search Order for Instance of Verilog Design Units Supporting Source Libraries Library Mapping File.. Predefined XILINX_SIM Macro for Verilog Simulation .. Interactive Simulation in Command Line Mode ... Chapter 5 Mixed Language Simulation .. Mixed Language Simulation Overview. Instantiating Mixed Language Components... Mixed Language Binding and Searching . Mixed Language Boundary and Mapping Rules Chapter 6 Waveform Analysis. Before Analysis Customizing the Wave Configuration. Navigating the Wave Configuration. Using Show Drivers... Printing Wave Configurations... Using Custom Colors. Chapter 7 Saving and Opening Simulation Result Saving the Results. Opening a Live Simulation Opening a Static Simulation Chapter 8 Debugging Source Level Debugging Overview... Stepping... Using Breakpoints. Chapter 9 Writing Activity Data for Power Consumption Writing Activity Data of the Design Chapter 10 Using Tcl Simulation Commands. Simulation Command Overview Entering Simulation Commands. Aliasing Simulation Commands .. ISim Wave Viewer Tel Commands Overview .. ISim User Guide wwwxilinx.com Uce60 (v1.4) January 27, 2012 £ XILINX: Chapter 11 ISim Hardware Co-Simulation. Appendix A Reference. Appendix B_ Migrating from ModelSim XE to ISim.. Appendix © Additional Resources. Command Line Conventions. Tel Commands. 131 Introduction. 131 131 131 Limitations.. 132 Usage for Compilation. 132 fuse Command Line Flow. 133 Project Navigator Flow .. 133 Hybrid Co-Simulation Flow. Hardware Board Usage .. 136 137 Hardware Co-Simulation. 137 ISim Hardware Co-Simulation Tel Commands. 138 Board Support... 139 147 147 160 163 Simulation Executable Commands .. Third-Party Command Equivalency... HDL Language Support. 191 191 192 194 Migration Overview... Simulation Process.. Step 1: Gathering Files and Mapping Libraries... Step 2: Parsing and Elaborating the Design. 194 Step 3: Simulating the Design. 194 Step 4: Examining and Debugging the Design... 195 201 Sim User Guide UGEEO (v13.4) January 27, 2012 ISim User Guide wwwxilinx.com UGsEO (v13.4) January 27, 2012 £ XILINX. Chapter 1 Getting Started ISim Overview %ilirwe® ISimis aH ardw are Description Language HDL) simulator that lets you perform. behavioral and timing simulations for VHDL, Verilog, and mixed VHDL/Venlog, language designs Simulation Libraries ‘The Xilinx simulation device libraries are precompiled, and updated automatically when updates are installed. Note Do not run the Simulation Library Compilation Wizard (Compzdib) to compile Libraries for use with ISim. Language Support Isim supports the following languages. Language ‘Support VHDL TEEE-STD-1076-2000 Verilog TEEE-STD-1364-2001 ‘DF [NetGen] generated Standard Delay Format (DF) Fle: VATAL ‘VETAL-2000 ‘Mixed VHDL /Venlog Yes “VHDL FLIVHPI Ne ‘Verilog PLE Ne System Verilog, Ne Other Assertion Based Languages Ne Sim User Guide UGEEO (v13.4) January 27, 2012 inx.com 7 Chapter 1: Getting Started £ XILINX: Feature Support sim supports the following features, Feature Support Incremental Compilation Yer ‘Source Code Debugging Yer ‘SDF Annotation Yer VED Generation Yer ‘SAIF Support Yer Hard IP - MGT, PPC, PCIe®, ete Yer Multithreading Yer ISim Operating System Support ‘You can run ISim as specified in the ISE Design Suite: Installation and Licensing Guide (UGI98), ISim User Guide 8 wwwxilinx.com Uce60 (v1.4) January 27, 2012 € XILINX. Chapter 1: Getting Started Steps in Simulation ISim Modes of Operation ‘There are three modes of operation available in [Sim © Graphical User Interface (GUD) ‘+ Interactive Command Line ‘+ Non-Interactive Batch ‘Mode of Operation | Features How ISim Is Invoked Graphical User ‘Graphical view of samulation [+ From ISE®- [Rena amulation Interface data, Menu commands, process on your design, such as, context commands, and Simulate Behavioral Model, toolbar buttons are used to run simulation, and examine | * rom PlanAhead™* software — ini debug laa Ae Td Rana simulation process on your ‘commands entered at Console | 488. prompt are used fo run + From the Command Prompt simulation, and eamineand |" Run the simulation executable debug data with -gui switch, for example For information about Sesame ‘working with the GUI, + From the Command Prompt ee Graphical User Interface Ran the simulation executable Overview, with -gui switch and ~view {< ha} verileg|vhdl (.v|.vhd verilog|vhdl {< ha} where + verilog|vhdl indicates that the source is a Verilog or VHDL file Inelude + indicates the library that apatticular source on the given line should be compiled. work is the default bray. + fle name> is the source file or files associated with the library. More than one Verilog source can be specified on a given line. One VHDL source can be specified on a given line Using fuse - Use the fuse command to parse the design using thePRY, elaborate the design, and generate the simulation executable For example fuse -prj my_project.prj work.top work.glbl -o my_sim.exe Formore information about the fuse command syntax and available switches, see fuse Overview ‘Make sure that this step was run successfully. Ifnot, see "Examining Error Messages and "Examining Log Files” in Step 5. Debugging the Design, Step 3: Simulating the Design ‘After design compilation and elaboration, the next step is to run the simulation executable, and simulate the design. For information about running the [Sim in read-only mode, see Opening a Static Simulation. Graphical User Interface Mode Sirmlation at the Command Line From the last step, a simulation executable was generated (x. exe (default) or my_sim. exe (user specified). Run the simulation executable with the ~gui switch, for example my_sim.exe -gui. This command launches the [Sim GUI The simulation executable command does not start the simulation. To start the simulation, use one of therun simulation commands described in Running a Simulation in [Sim. You must also add signals to the Wave configuration. See Launching the ISim GUI for details, Sim User Guide UGEEO (v13.4) January 27, 2012 inx.com " Chapter 1: Getting Started € XILINX: Optionally, you can also invoke the simulation executable, launch the GUI, and run simulation with aTool Command Language (Tel) file by leveraging the -tclbatch option, for example my_sim.exe -gui -tclbatch my_sim.tel. ‘You can use the wave aid command (example wave add / to add all signa at top level) m your ny_sim.tcl file to antomatically trace the signals and display the signals in the GUI upon launch. Simulation from the ISE software Parsing elaboration, and running the simulation executable command are all run in the background when you run one of the following processes in the ISE® software or the PlanAhead™ application ‘+ Sinmlate Behavioral Model ‘+ Sinmlate Post-Place & Route Model ‘These processes launch the [Sim GUI with the top-level signals being traced by default. Optionally, you can specify custom Td files to control the signals that would get traced upon launch of [Sim GUL The simulator run for the time specified under the [SE simulation process property ’ Simulation Run Time’ See “ Simulation Properties" in ISE Help for details ‘To run for an additional time, use one of therm simulation commands described in Running a Simulation in [Sim For more information, see Launching the [Sim GUL Interactive Command Line Mode Run the simulation executable, for example my_sim.exe. When the Td prompt displays, typein the run command. Optionally, you can also invoke the simulation executable with ad file by leveraging the-tolbatch option, for example my_sim.exe -telbatch my_sim.tcl. ‘Make sure that this step runs successfully. If not, see “Examining Error Messages” and “Examining Log Files” in Step 5: Debugging the Design. Step 4: Examining the Design After the design is simulated, you debug the design to ensure that it meets the design specification, ‘You can examine the sinmuilation results in two ways: 1. Viewing the signal interactions in the Wave window. 2. Viewing or querying the results in the Console pandl or the Tel prompt. See Simulation Command Overview. ‘You can save the results; see Saving the Results. ‘You can also view and ecamine simulation results in aread-only static simulator: For more information, see Opening a Static Simulation. ISim User Guide 2 wwwxilinx.com Uce60 (v1.4) January 27, 2012 € XILINX. Chapter 1: Getting Started Step 5: Debugging the Design Ifproblems are encountered, debugging is necessary to identify the root cause and resolution for the problems. ISim provides avaniety of ways to debug the design. Examining Error Messages First, look at the error messages to seeif there are any errors in the design. Exror messages appearin the ISE® software Console (GUI mode) and the log files discussed in thenext section. Look for messages with one of the following prefixes + HDL Compiler - Indicates an aor during the parsing or static elaboration step, If an error occurs during parsing and elaboration, and this step was not run successfully, the problem can be an HDL compiler issue Enter fuse -v 1 to dump information that might help identify the problem. Also, a fuse . Loc file contans alist of error messages, and errors also appearin the ISE software Console (in ISE Integration Mode) © Sinmlator - Indicates an error during executable code generation or simulation See Step 3: Simulating the Design. Use the file name and line number in the message to locate the problem. Examining Log Files Examining the available logfiles can provide helpful dues about design rors © faselog - Log file containing output produced by the fuse command during the parsing and dlaboration step. * isimlog - Log file containing output produced by simulation executable during the simulation step. This file does not disclose any design data and is safe to share with Xalirxe® Technical Support if you report a problem. + isimerashlog - Log file generated when the tool encounters an uneqpected eror or condition. This is generated inside isim/ .sim directory. 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 aproblem. Using Tcl Simulation Commands Several simulation commands are available to assist you with debugging These commands can berun at the command line Td prompt, or in the Console panal of the ISim interface © isimptrace on © isimltrace on. © dump © show © isim force + bp For more commands, see Simulation Command Overview. Debugging in the Graphical User Interface For the debug strategies when using the GUI, see Source Level Debugging Overniew Sim User Guide UGEEO (v13.4) January 27, 2012 inx.com 8 Chapter 1: Getting Started £ XILINX: Tutorials For tutorials on how to use ISim, see the following table TSE Sinudator (Sin) bu Depth Tutorial “This tutorial demonstrates how to use [Sun for dengn simulation and debugging TSE Hevivore Co-Sinalaton Tutorial ecalertieg Floating Pour FFT Sinaiation "This tutorial shows hovw to wze the Sun Hlardveare Co-Simulation to accelerate Floating Point FFT anvulation TSE Hevdivore Co-Sinnalation Tutorial Fuferactng with Spartar6 Memory Centroler inud Ox Board DDIZ Manory, (UG3IS) “This tutorial chows to-use the [Sim Hardware Co-Simulation feature to interact with the Spartan®-6 device Memory Controller and the on-board DDR? memory ISE Hevduvare Co-Sinoulation Tutorial Frocessing Live Bret Trae tlrough iexS Boibeded Bharat 9) “This tutorial chows to-use the [Sim Hardware Co-Simulation feature to process ive Ethemet ‘rafficthrough the Embedded Ethernet MAC on the Virtex®-5 device 4 ISim User Guide Uce60 (v1.4) January 27, 2012 £ XILINX. Chapter 2 Exploring the ISim Graphical User Interface Graphical User Interface Overview ‘The ISim Graphical User Interface (GUI) consists of the main window, which contains pandls the Workspace toolbars, and the status bar In themain window, you can + View the parts of the design that can be simulated + Add and view signdsin the wave configuration + Use commands to run simulation + Examine the design, and debug as necessary Launching the GUI ‘The [Sim GUI launches when you run the simulation executable from the ISE® software, from the command line, or from the PlanAhead™ application. For details, see Step 3 Simulating the Design To close the ISim software, select File > Exit. [Sim prompt you to save your waveform configuration before dosing. Sim User Guide UGEEO (v13.4) January 27, 2012 www xilinx.com 415 Chapter 2: Exploring the ISim Graphical User Interface £ XILINX: Parts of the GUI eB Fe Eat yew Dea retanaes se Proce ulsiaicla\~| cr ay Pro g SeLbge. tet 5 3 0 gaint oT og stLbge. ms “str pnc texto 9 sclegewrsore ‘8 eengerents Gig crm contin 0 trstares and Feces. Sauce H emis [reagents | Frdnfks Reais | Seuch Ress ‘sin Tne: 23 995595 0005 # [Part of the GUI Description T [Mews Commands Provider access tomort op erations availablein the saftoare Some operation? are avilablein content ment only 2__| JS Tealbar Commands | Prowdes access tofrequently ured commands 3 [instances and Processes | Displays the block Gastance and process) hierarchy Panel azrocated with the current smolation 4 _ | Source Files Panel ‘Displays the list ofall the les acroaated wath the derign 5 | Consale Panel Displays messages gmerated by the simulator You can enter amvulation Te commands at the prompt 6 | BreakpointsPand ‘Displays a lst ofall breakpoints currently se in the design 7 | Find in Files Revalts Panel | Displays the revults that match a text string ina set of les See Using Find sn Files Search Renalts Panel | Displays the renults that match the aiteria from a search Objects Panel Displays the amulation objects assoaated wath the blodk selected in the Instances and Processes Panel, ISim User Guide 16 wwwxilinx.com Uce60 (v1.4) January 27, 2012 £ XILINX: Chapter 2: Exploring the ISim Graphical User Interface # | Part of the GUI Description 10_| Wave Window Displays the wave configuration, which consists ofa list of signals and buses, their waveforms, and any vrave objects, intchas dividers, cursor or markers. The Wave window can, dieplay more than one wave configuration. Ti | Text Béttor Window ‘Displays read-only Hardware Deraription Language HDL) sles 12 | SaturBar Displays a brief description for amenu command ortoolbar Dutton that your cursor is placed over, and Simulation Time Design Objects and Icons Design Hierarchy Icons Design entities (Verilog) and modules (VHDL) display in a design hierarchy in the Instances and Processes Panel. Q VHDL Ennty Q Wirdage VHDL Block VHDL Process $B Verlog Module F(a Verilog Task or Function, ‘Verilog Block G_ Verilog Process Design Object Icons ‘The following design objects are displayed in the Objects Panel and in the Wave window. Input Port Output Port Intemal Signal Variable Buffer Signal SG 666R S&S Signals InOut, Bidirectional Port Constants, parameters, and generics Linkage Signal (VHDL only) Sim User Guide UGEEO (v13.4) January 27, 2012 inx.com 7 Chapter 2: Exploring the ISim Graphical User Interface £ XILINX: Buses Input Bus Output Bus InOut, Bidirectional Bus Inteal Bus Constant, Parameter and Generics Bus Variable Bas Linkage Bus Buffer Bus ERAKRAKRAR Arranging the Main Window Arranging Windows ‘You can move windows, panels and the toolbar around in the interface using one of the following techniques, Using Window Commands ‘The Window menu commands are available for the Wave window and Tect Editor vandow only Hh, Cascade overlaps all the windows with the active window on top f]_ MeHorizontally arranges the windows horizontally as non-overlapping tes. ‘Tile Vertically arranges the windows vertically as non-overlapping tle Flost flats the active window Dock restores the floated window to its former location in the interface. For floating. window only Using Drag and Drop For other patts of theinterface like panels and themain window toolbar, drag and drop lets you move the object to anew location. 1. Click and hold the header for the Panel to move 2. Move the panel to anew location. A gray box indicates where the pand is placed 3. Release the mouse button to place the pandl to the new location. Hiding and Restoring Windows Many of the parts of the main window can be hidden from view, and restored again. Note To restore windows to their default locations, select View > Restore Default Layout ISim User Guide 8 wwwxilinx.com Uce60 (v1.4) January 27, 2012 € XILINX. Chapter 2 Exploring the ISim Graphical User Interface Menu Commands ‘The View menu commands enable you to hide the main window pands, toolbar, and status bar + View > Panels - hides and restores the ISim panels: = Console = Search Results = Source Files - Breakpoints = Objects = Instances and Processes, - Find in Files Results + View > Toolbar - hides and restores the [sim toolbars: - Standard - Edit - View - [Sim - Window - Help ‘+ View > Status Bar - hides and restores the status bar located at the bottom of the main window, Standard minimize, madmize and dose commands apply to the Wave window and Text Editor window using the upper right-hand icons, Toggle Icons ‘The toggle icons are available at the top right of the ISun window panes for example the Instances and Processes panel and the Objects panel Instances and Processes “Dax tnotance and Process Narre @® testbench é if > Instances and Processes | Source Files With these commands, you can hide restore float, and dock thepandl Sim User Guide UGEEO (v13.4) January 27, 2012 inx.com 19 Chapter 2: Exploring the ISim Graphical User Interface £ XILINX: ‘es Toggle Slide Out - minimizes the panel. Alsoused torrestore the pane byhovering over the pane’s name at the edge of the window and dicking the minimize button 1 Toggle Maximized - maximizes the panel Click again to restore the panel size Toggle Floating - oats the panel Click again to restore the floated window toits former location. x Close closes the panel from view. ‘Torestore the panel, elect View > Panels and select the pane to restore to view, Expanding and Collapsing a Hierarchy ‘You can expand and collapse ahierarchy in any window orpanel with objectsin nested groups using one of the following methods. Clicking the Arrow - Click the arow to expand thehierarchy, Onelevel can be expanded at atime ~ Click the arrow to collapse the hierarchy. Menu Command 1. Select an object. 2. Select Edit > Wave Objects > + Expand - Expands the hierarchy object that is selected. One level can be expanded at atime + Collapse - Collapses the hierarchy of the object selected. Using the Context Menu 1. Select an object 2. Right-click and select the applicable command from the context ment, + Expand - Expands the hierarchy object that is selected. One level can be expanded at atime + Collapse - Collapses the hierarchy of the selected object. ISim User Guide 20 wwwxilinx.com Uce60 (v1.4) January 27, 2012 € XILINX, Chapter 2 Exploring the ISim Graphical User Interface Wave Window Wave Window Overview ‘The Wave window displays signals, buses, and ther waveforms. Each tab in the Wave window shows awave configuration, which consists of alist of signals and buses, ther propatties, and any added wave objects; such as dividers, cursors, and markers. Inthe GUL the signals and busesin the wave configuration are traced during simulation, and therefore, the wave configuration is used to ecamine the simulation results. The design hierarchy and the signal transitions are not part of the wave configuration but rather are stored in a separate database (. was) file Wave Configuration File (.wcfg) ‘A wave configuration comprises alist of signals, their propatties, such as color and radix value, and other wave objects; such as dividers, groups, markers and cursors. You can completely customize awave configuration: you can add or remove signals and other ‘wave objects at any time when the simulation is not actively running. The initial file Default -wctg, isnot saved until you save the file The wave configuration file stores the list of signals, their properties, and wave objects ‘You can create and simulate multiple wave configurations, and the wave configurations can be saved separately. For information about saving the Wave Configuration, see Saving the Results, Default.wefg Details ‘When you ISim from any mode it creates the Default .wefg file You must supply a filename to save awave configuration file to the disk as a wef file + Inthe GUImode, when ISim exts it prompts you to enter afilename in the Save As dialog box InBatch mode typewefg save to savethe contents of the Default .woeg before eating [Sim. Otherwise, the content of Default .wofs isnot saved on disk Active Window ‘When [Sim starts, the first active window is De#auit .we£s. You can change the active window by clicking thewindow tab orusingwave select command + Inthe GUI select File > New and File > Open to change the active window to the nevily created waveform configuration window. + nT, thewefg new andwefg open commands change the active window to the newly created window just ike File > New and File > Open Signals/Buses the Wave Configuration ‘The signals and buses in the Wave window can be one of the following design objects vith the corresponding icon. Sim User Guide UGEEO (v13.4) January 27, 2012 www xilinx.com a Chapter 2: Exploring the ISim Graphical User Interface £ XILINX. Signals Input Part Output Part InOut, Bidirectional Port Intemal Signal Constants, parameters, and generics Variable Linkage Signal (VHDL only) SG S666R FS Buffer Signal Buses Input Bus Output Bus InQut, Bidirectional Bus Intemal Bus Constant, Parameter and Generics Bus Variable Bus Linkage Bus Buffer Bus ERERRKRRR Objects (Cursors - The main cursor and secondary cursor in the wave configuration are used to pinpoint atime (main cursor) and to measure time (man and secondary cursors together). The cursors form the focal point for various navigation activities. See Placing Cursors, ‘+ Main Cursor - The main cursor is a solid line that intersects the waveform, and the value at that intersection is displayed in the Value column for each waveform. ‘The cursor is the current simulation time while simulation is running with the time displayed directly above the cursor. ‘+ Secondary Cursor - The secondary cursors a dotted line used with the main cursor to identify atime range. The time range can be used with zoom and print to focus on the area. the Wave Configuration ISim User Guide 22 wwwxilinx.com Uce60 (v1.4) January 27, 2012 £ XILINX. Chapter 2: Exploring the ISim Graphical User Interface Markers - A makeris used to mark apaticular time for futurereference A maker is avertical lneintersecting 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 Adding Markers and Displaying Waveform ‘Values With Markers. Hollow fFilled-in Circle - When placing or moving cursors and markers, the Snap to ‘Transition button assists with placing the cursor/maker more precisely on a signal transition. = When placing or moving a cursor or marker, the mouse displays ahollow circle O when hovering between transitions. — Themouse displays afilled in circle when hovering over atransition of asignal @, Dividers - A divider is a visual separator of signals in the wave configuration. See Adding Dividers. Groups - A group is avistua collection to which signals and buses canbe added in the wave configuration as ameans of organizing aset of related signals. A group displays the’ icon and group name. The group itself displays no waveform data but can be expanded to show its contents or collapsed to hide them. See Adding Groups Virtual Buses - A virtual busis a grouping to which logic scalars and arays can be added. A virtual bus displays the © icon and virtual bus name. The vistual bus displays abus waveform, which is comprised of the signal waveforms in the vertical order that they appear under the virtual bus, flattened to a one-dimensional array. See Adding Vita Buses. Wave Window Toolbar Icons ‘The toolbar icons available with the Wave window provide access to frequently-used commands, Zoom Out decreases the size ofthe viwwed objects Zoom In ncreaser the sie of the viewed objects Zoom to Full View zooms out to display the entte view in the achive windorw Zoom to Cursors displays the waveforms such that the two cursors area the left and right edge ofthe display Ifthe secondary off, the command centers the display around ‘the main cursor without changing the magnification level GoTo Time 0 moves the cursor and fomsto 0 time GoTo Latest Time mover the cursor and focus tothe end of simulation GoTo Next Transition moves the main cursor tones transition GoTo Previous Transition mover the main cursor to the previous transition ‘Adds a marker at the position ofthe main cursor to the Waveform area y- hf R OO %®B wD ‘Moves the main cursor to the nearest marker to the left of the main cursar's current position Moves themain cursor to the nearest marker to the ight of the main cursor’s current position Sim User Guide UGEEO (v13.4) January 27, 2012 inx.com 23 Chapter 2: Exploring the ISim Graphical User Interface £ XILINX: ‘Swaps the main and secondary cursors, sf both are set ‘Shap to Transition Mode moves the cursor to transition when you place the cursor dose tothe transition. This mode can be sunitched om or off Sf Displays and hides the floating ruler that can be moved to the desired location in the Wave window. Working With Wave Configurations Creating New Wave Configurations ‘You can create any number of Wave Configurations in the current session. The Wave Configuration stores the list of signals, their properties and any wave objects that were added To Create a Wave Configuration 1. Select File > New. The New dialog box opens. 2. Select Wave Configuration from the list. 3. Click OK Anew untitled wave configuration opens. Thenew wave configuration is empty until you add signals. If more than one wave configuration is open: ‘© Use the wave configuration tab to locate aparticular wave configuration, or ‘+ select Window > Next or Window > Previous to navigate through open wave configurations Adding Signals to the Wave Configuration ‘You can populate the Wave window with the signals from your design using menu commands or drag and drop cap abilities in the GUI, or using Tools Commend Language (Tc) commands in the Console panel Note Changes to the wave configuration, including creating the wave configuration or adding signals, do not become permanent until you save the wefg file For more information, see Saving the Results. In the GUI 1. Inthe Instances and Processes panel, expand the design hierarchy, and select an. item ‘The objects that correspond to the selected instance or process displays in the Objects panel In the Objects panel, select one or more objects 3. Use one of the following methods to add objects to the Wave Configuration: + Right-click, and select Add to Wave Window from the context manu. + Drag and drop the objects from the Objects panel to the Name column of the ‘Wave window. + Inthe Console, use the wave add command as described in the following subsections ISim User Guide 24 wwwxilinx.com Uce60 (v1.4) January 27, 2012 £ XILINX: Chapter 2: Exploring the ISim Graphical User Interface Opening and Clo: Using Tel 1. Optionally, you can first identify the objects you want to add by e~ploring the design hierarchy mn the Instances and Processes panel and the Objects panel, as desaibed above, or by entering the scope command in the Console panel 2. Inthe Consolepand,, enter the wave add command to enter an individual object or a group of objects, Wave configurations and .wefg files ‘Though both awave configuration and a wefg file refertto the customization of lists of waveforms, thereis a conceptual difference between them. ‘+ The wave configuration is an object that is loaded into memory with which you can work. + The . wets fileis the saved form of awave configuration on disk Wave configuration names and .wefg file names A.wave configuration can have aname or be “Untitled.” The name appears on the tab of the wave configuration window. © When saving awave configuration to a. wea fileusing a GUITd command, the weég file takes the name supplied as a conunand argument. In savingto the ile, the wave configuration nameis changed to match the . wo#a filename + When loading awave configuration from a . wees file, the wave configuration uses thename of the . wea file Saving Wave Configurations ‘The current wave configuration can be saved. If you have multiple wave configurations open, each can be saved to auniquename for later viewing, To Save a Wave Configuration Select File > Save, press Cetl*S, or click the Save button El ‘The curent simulation wave configuration is saved. Note UseFile > Save As to assign a different name to the wave configuration, 1g Wave Configurations To Open a Wave Configuration File ‘There are anumber of ways to open awave configuration file Go to © Opening aLive Sumulation * Opening a Static Simulation To Close a Wave Configuration File To close the wave configuration and allits windows, select File > Close Sim User Guide UGEEO (v13.4) January 27, 2012 inx.com 25 Chapter 2: Exploring the ISim Graphical User Interface £ XILINX: Instances and Processes Panel Instances and Processes Panel Overview ‘The Instances and Processes panel displays the block (instance and process) hierarchy associated with the wave configuration open in the Wave window. Instantiated and elaborated entities/modules are displayed in atree structure, with entity components being entities, processes, tasks and blocks. ‘Three columns display in this pand,, as follows: + Thefirst column displays the instance, process, and static tasks or functions in atree structure showing the block hierarchy of the design, ‘© The second column displays the names of the design units (Verilog module or VHDL entity (architecture) corresponding to the instance, static task/funetion, or process from the first column. + Thethird column displays the type of the instance, static task/function, or process. ‘The following describes the icons used for the items displayed in this panel vein Q Wirdage VHDL Block VHDL Process GQ Verlog Module foxy Verilog Task or Function Variog Block G_ Verilog Process To expand ahierarchy to display its components, click the arows or use the Expand context menu commands, See Expanding and Collapsing aHierarchy. To sort the information in this panel according to the datain one of the columns, click the column title, such as Design Unit. To hide orrestore the pand,, select View > Panel > Instances and Processes Searching For Objects ‘You can search for objects in the design using the Search command, which is available in the Instances and Processes panel and the Objects panel. Search criteriaincludes atect string, and/or an object-type filter To Search For Objects 1. Place the cursor in the Objects panel or the Instances and Processes pane, 2. Right-click and select Search from the context manu. 3. Inthe Search dialog box, enter atext string. You can use an asterisk () as a wildcard symbol. Select the object type for which you are searching. Click Match case if applicable. ISim User Guide 26 wwwxilinx.com Uce60 (v1.4) January 27, 2012 € XILINX. Chapter 2 Exploring the ISim Graphical User Interface 6. Click OK Objects that match the search criteria display in the Search Results Panel. Opening HDL Source Files In ISim, you can open Hardware Description Language (HDL) source file for viewing only in the text editor Files open in read-only mode. Opening HDL Source Files in Read Mode 1. Inthe Instances and Processes panel, the Objects pandl, or the Source Files panel, select an item. 2. Double-click theitem, or right-click and select Go To Source from the context ‘The HDL source file associated with that object opens in the text editor in read-only mode Opening HDL Source Files in Write Mode ‘You can also open afile using the File > Open menu command. In the Open didog. box, change Files of type file to Verilog or VHDL, select the file, and click Open. This method opens the files in write mode Objects Panel Objects Panel Overview ‘The Objects panel displays all simulation objects (ports, signals, variables, constants, parameters, and generics) associated with the sdlected instances and processes in the Instances and Processes pane, ‘The top of the panel displays which instance or processis selected in the Instances and Processes panal; those objects and ther values are listed in the Objects pana. ‘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 toolbar icon, ‘+ Data Type - Displays the datatype of the corresponding simulation object, logic or maray. Sim User Guide UGEEO (v13.4) January 27, 2012 inx.com 2 Chapter 2: Exploring the ISim Graphical User Interface £ XILINX: Objects Panel Toolbar Icons Hides/displays input p rts ee Hides/aisplays output ports. Hides/displays imout, bidirectional ports Hides/displays internal gna “Hides/displays constants, parameters, and generics Hides/displays variables ‘Toggles the Syne Time feature on and off. When toggled on, Objects panel values are based on main cursor in the Wave window. When toggled off, values are the values at ‘he Sim Time displayed in the Status Bar (simulation end time) HReerek Searching For Objects ‘You can search for objects in the design using the Search command, which is available in the Instances and Processes panel and the Objects panel. Search criteriaincludes atect string, and/or an object-type filter To Search For Objects 1. Place the cursor in the Objects panel or the Instances and Processes pane, 2. Right-click and select Search from the context manu. 3. Inthe Search dialog box, enter atext string. You can use an asterisk () as a wildcard symbol. 4. Select the object type for which you are searching, 5. Click Match case if applicable 6. Click OK Objects that match the search criteria display in the Search Results Panel. Using Show Drivers ‘You can use the Show Driver command to display the driver for a change in signal, or object value. This command is used to determine the cause of avalue change, which helps determineif circuit connections are correct. ISim displays the signal, or object, and its one or more drivers in the Console panel. ‘The Show Driver command is available for probing objects in the following areas © Objects pand © Wave window © Console pandl (show driver command) To Show Drivers 1. Sdlect an object, or signal 2. Select Edit > Wave Objects > Show Drivers, or select Show Drivers from the right-click menu, ‘The Console lists the drivers for the object or signal. When there isno driver, amessage in the Console indicates that there is no driver. ISim User Guide 28 wwwxilinx.com Uce60 (v1.4) January 27, 2012 € XILINX. Chapter 2 Exploring the ISim Graphical User Interface Note Running this commands the same as running show driver at the Console prompt. Showing Display Elements Inthe Objectspand, you can control whether or noto limut apreset madmum number of child elements dieplayed for every composite object. You can change the preset ‘maamum number wang the Preferences dialog box To Display all Child Elements 1. Right-click anyosherein the object list in the Objects panel 2. Right dick, and select Show All Elements ‘Themumber of children in the object hierarchy display To Li the Display of Child Elements 1. Rightctick anyosherein the object list in the Objects panel 2. Select Limit Elements To Change the Preset Maximum Number of Child Elements Set the preference settings as follows: 1. Select Edit > Preferences In the Preferences dialog box, select ISim Simulator. Select Limit the maximum number of elements displayed to. Enter anumber Click Apply, and OK ‘Thenumber of children displayed in the object hierarchy updates immediately Selecting an Object in the Wave Window Follow this procedure to highlight signals for an object in the Objects panel, To Select an Object in the Wave Window 1. Select an object in the Objects panel 2. Right-click, and select Select in Wave Window ‘The signa associated with the object highlights. Source Files Panel Source Files Panel Overview ‘The Source Files pandl displays the list of files associated with the design. The list of files is provided by the fuse command during design parsing and elaboration, which isrunin the background for GUI users. The HDL source files are available for quick access to the read-only source code. Opening the Source Code 1. Select afilein the list 2. Click the Go To Source Code button Sim User Guide UGEEO (v13.4) January 27, 2012 inx.com 29 Chapter 2: Exploring the ISim Graphical User Interface £ XILINX: Note You can also use the Go To Source Code command from the context menu, or doubledick afile. ‘The selected file opens in read-only mode in the Text Editor window. Text Editor Window Text Editor Window Overview In ISim the text editor window is available for access to the underlying HDL source files. Basic steps available are © Opening HDL source files © Viewing HDL source files ‘+ Setting breakpoints to source files for debugging, Do Not edit your Hardware Description Language HDL) filesin the ISim text editor Editing files could result in a conflict with the files in your ISE® software project. Modifying Source Files Follow these steps to modify source files. Note HDL files must be edited outside of ISimto avoid design conflicts 1. InISE, openthe source file in ISE Text Editor 2. Make the appropriate edits 3. Run the design through ISE tools to update the design 4. Simulate the deagn Opening HDL Source Files In ISim, you can open Hardware Description Language (HDL) source file for viewing only in the text editor Files open in read-only mode. Opening HDL Source Files in Read Mode 1. Inthe Instances and Processes panel, the Objects pandl, or the Source Files panel, select an item 2. Double-click theitem, or right-click and select Go To Source from the context ‘The HDL source file associated with that object opens in the text editor in read-only mode Opening HDL Source Files in Write Mode ‘You can also open afile using the File > Open menu command. In the Open dialog. box, change Files of type file to Verilog or VHDL, select the file, and click Open. This method opens the files in write mode Viewing HDL Source Files In ISim, you can view the underlying HDL source files in the Text Editor window for ‘verification of the design. Standard text editor operations are available to assist you with viewing your Hardware Description Language (HDL) files, such as Zoom, and Find. ISim User Guide 30 wwwxilinx.com Uce60 (v1.4) January 27, 2012 € XILINX. Chapter 2 Exploring the ISim Graphical User Interface Information about specific operationsis available in the ISE Text Editor Help. Never edit your HDL files in the ISim text editor. Editing files could result in a conflict with the files in your ISE® software project. To View Source File Contents 1. Open HDL source file. 2. Use available features, such as scrolling, find, layout preferences, to assist you with viewing the file contents Note If edits aremade to HDL filesin ISim, do not save the changes. Setting Breakpoints In ISim, you can set breakpoints in executable linesin 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 to Debug Your Design, Note You can set breakpoints on lines with executable code only. Setting and Removing Breakpoints 1. Select View > Brealkpoint > Toggle Brealpoint, or clic the Toggle Breakpoint toolbar button 2. IntheHDL file dick aline of code just to the night ofthe line number Note Altematively, you can right-dick aline of code, and select Togele Breakpoint To remove abreakpoint, click the breakpoint to remove it After the procedure completes, a simulation breakpoint icon @ appears next to the line of code Note If you place a breakpoint on aline of code that isnot executable, the breakpoint isnot added. A list of breakpoints is available in the Breakp ints pane. Memory Editor Window Memory Editor Window Overview ‘The Memory Editor lets you find and change contents of two-dimensional memory araysin a design during simulation (without recompiling or re-elaborating the design), ‘There are three places where memory objects could be listed: Memory Pandl, Object Panal, and Search ResultPand. To open the Memory E ditor, follow one of thesemethods. ‘© Onthe Memory Tab which contains al the two-dimensional arrays of logic types ima design, double cick a displayed memory object + Right-dick a two-dimensional aray of logic typein Objects Panel, and select Memory Editor from the context menu + Rum asearch on amemory name in the Instance and Processes panel. After the searched memory displays on the Search Results Panel, night-click thememory and select Memory Editor from the context menu, Note For objects that arenot two-dimensional aay of alogic type the Memory Editor choice in the Conte Menu is grayed out. ‘The Memory Editor corresponding to the two-dimensional aray shows up in themain window as atab along with the Wavefonn Viewer or Text Editor. Sim User Guide UGEEO (v13.4) January 27, 2012 inx.com 3 Chapter 2: Exploring the ISim Graphical User Interface £ XILINX: ISim Memory Editor GUI Desaiiptions - © Address - The Address is used for going to apaticular location in the Memory Editor © Columns - The Columns combo box is to control the display of the number of dements perrow. The auto column displays the madmum of 2 to power N of ements, + Address Radix - The address Radix combo box controls the radix of the address displayed in the Memory Editor + Value Radix - The Value Radix combo box controls theradix 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 arow Keys, the current position of a selected item displays on the status bar based on the current address radix. Console Panel Console Panel Overview ‘The Console panel lets you view alog of commands generated by ISim and enter standard and ISim-specific Tools Command Language (Tel) commands at the command prompt + Messages - Messages that are generated by the [Sim include evors, warnings, and informational messages, and display in the Console pana. The Console pana lso echoes simulator commands that were invoked from the graphical controlsin the ISum GUL ‘+ Simulation commands - The command prompt lets you enter simulation Tel commands, and to view the command dump (or print-out) in the Console panel. See Entering Stimulation Commands for more information. A number of right-lick menu commands are available to help manage the contents of, the Console panel Breakp its Panel Breakpoints Panel Overview A breakpoint is auser-determined stopping point in the source code used for debugging ‘design with ISim. The Breakpoints pane displays alist of breakpoints that are set in the design. See Debugging Your Design Using Breakpoints, See also Setting Breakpoints and Deleting Breakpoints For each breakpoint tin your source files, thelistin the Breakpoints pandl identifiesthe file location filename, andlinenumber You can delete selection, delete all breakpoints, and go to the source code from the Breakpoint panel toolbar icons or contest ments Breakpoint Toolbar Icons Dx, Deletes the selected line from the Breakpcint panel, and deletes the breakpoint from the HDL source fle. 3A Deletes all breakpoints from the HDL source ies [Epes the HDL source ein the text editor withthe breakp cit in focus ISim User Guide 32 wwwxilinx.com Uce60 (v1.4) January 27, 2012 € XILINX. Chapter 2 Exploring the ISim Graphical User Interface Search Results Panel Search Results Panel Overview ‘The Seach Rents panel displays therenilts that match the search aitetafrom the Search command. The results display the icon for the object type beng displayed, and the location of the object in the design, Search Results Toolbar Commands ‘The following functions are available in the Search Results panel Clears the contents of the Search Results panel ‘Adds the signal assouated with the selected search result tothe wave configuration im ‘the Wave windovr (Opens the HDL source file in the text editor atthe line where the design unit is defined. (Opens the HDL source le in the text editor atthe line where the design unit is instantiated Stop: the search ea ea Find in Files Results Panel Using Find in Files ‘You can find atext string in a set of files as follows, To Use Find in Files 1. Select Edit > Find in Files, or click the Find Text in Files toolbar button Ia. 2. IntheFind in Files dialog box, specify the text to find, set the parameters for your search, and click Find. 3. IntheFind in Files Results pand, do any of the following + To clear all results from the pand,, click the Clear All toolbar button [id + Toopenthe Ale hatcontansthefindreadtin the Worapace ede afind res and ck the Show Cavent Rent toolbar button = Note Altematively, you can double-click the find result to open thefile + To view thenext find result, lick the Show Next Result toolbar button | ‘+ To view the previous find result, click the Show Previous Result toolbar button I ‘© To stop the currently running Find in Files search, click the Stop Job toolbar button @, + To save your Find in Files search results to a Comma Separated Value (CSV) file, dick the Save Results as a Text File toolbar button [Ed Sim User Guide UGEEO (v13.4) January 27, 2012 inx.com 33 Chapter 2: Exploring the ISim Graphical User Interface £ XILINX: Toolbar Commands and Shortcuts ISim Toolbar Commands ‘The toolbars available in the ISum main window consists of functionally different toolbars. The main window toolbaricons are located near the top of the user interface. Standard Toolbar ‘The Standard toolbar provides access to frequently-used File menu commands. To show/hide the Standard toolbar, select View > Toolbars > Standard. ()—_ News Opens the New dialog box and lets you sect the ype of le you want [Open — Opens the Open dialog box and lets you brovse through your directories and select fle to open. The Sle display in the appropriate application or editor. []__ Save — Saves the active file to disk and overwrites the previously saved version. Ifa leis not saved previously, the Save As dialog box opens and lets you save the active Sle to dick Paint — Opens the Paint dialog box and lets you print the active fle Edit Toolbar ‘The Editor toolbar provides access to frequently-used Edit menu commands. To show/hide the Editor toolbar, select View > Toolbars > Edit Cut removes the selected text or object from the Workspace and placer itn the dip board Copy copies the selected text or object from the Workspace and places it inthe cipbosrd Paste nserts the text or an object from the dip oard int the acive windove Delete deletes the stem in focus in the Workspace window Unselect All — Unselects everything in the active window. Undo — Reverses your latest operation. This button works only when theres something toundo Redo — Reverses your latest “undone” op eration Find — Searches for a text string in the active window, S25S@exas® Help Toolbar ‘The Hap toolbar provides convenient access to frequently used Help menu commands, To show/hide the Help toolbar, select View > Toolbars > Help (f& Sapport and Services displays the Xilins® Supp ort pagein the default Web browser. Deg What's This activates tooltips After clicking this butten, you can hover over a menu item, ? ortoolbar button and get a brief dereription of its functionality ISim User Guide 34 wwwxilinx.com Uce60 (v1.4) January 27, 2012 € XILINX, Chapter 2 Exploring the ISim Graphical User Interface Window Toolbar ‘The Window toolbar provides access to frequently-used Window menu commands. To show/hide the Window toolbar, select View > Toolbars > Window. {Hy Cascade overlaps all the windows withthe active window on top [Me Horizontally arranges the windows horizontally as non-overlapping tiles “Tle Vertically arranges the wind ors vertically as non-overlapping tiles Float dlosts the active window. :w Toolbar ‘The View toolbar provides access to frequently-used View menu commands. To show/hide the View toolbar, select View > Toolbars > View. Zoom In increases the size of the viewed objects Zoom Out decreases the size ofthe viewed objects Zoom to Full View zooms out to display the entire view in the active window. right edge of the display Ifthe secondary off, the command centers the display around the main cursor without changing the magnification level (P _Zoom to Cursors displays the waveforms such thatthe two cursors area theleft and [BS] Refresh — Cleans up the display ofthe file in fomus ISim Toolbar ‘The ISim toolbar provides access to frequently-used ISim commands. To show/hide the ISim toolbar, select View > Toolbars > ISim. oa GoTo Previous Transition moves the main cursor tothe previous transition, oes Go To Next Transition mover the main cursor toned transition ¥ Addsa marker at the position of themain cursor tothe Wavefonn area, i ‘Moves the main cursor to the nearest marker to the left ofthe main cursor's v csurrent position. 4 ‘Moves the main cursor tothe nearest marker to the right of the main cursor's csurrent position. [Resets the simulation time to zero. > [Rung simulation until there are nomore events, a stop command is issued or a breakpoint is encountered = [Runs simulation forthe amount of ime specified Run Fer). Ficoug w) SPésler the amount of time the simulation runs when you dick the Run For ioous vac Sim User Guide UGEEO (v13.4) January 27, 2012 Chapter 2: Exploring the ISim Graphical User Interface £ XILINX: Keyboard Shortcuts Step through the simulation to the next line of HDL code. Forces a ninning simulation to stop immediately Simulation can be restarted ‘using one of the ran commands Ends the current simulation, lenving the simulation data open. Shorteut ‘Menu Command FL Help Topics (Help menu) B Find Next Edit menu) FS Run All (View mena) Fe ‘Zoom Full View (View menu) FF ‘Zoom Out (View menu) re Zoom In (View ment) Fr ‘Sep Delete Delete Edit menu) Cul ‘New File menu) Calo Open File menu) Cals ‘Seve ile menu) Cab? Print (File menu) CaleZ Undo Eait menu) cal Redo Edit menu) cabx Cat Edit mena) Cuiec Copy Eait menu) cay Paste Edit menu) Cab Find Edit menu) cake GoTo Gait menu) cua Select All Edit menu) cal, ‘Ada To Wave Configuration CuhFs Close (Window menu) CuleTab ‘Next (Window menu) ChlShatteTab Previous (Window menu) ChlHome GoTo Tume0 ChlEnd GoTo Latest Time Chl ShatteFS Restart Cit Mouse Wheel Zooms in and cut ‘Shift+ Mouse Wheel Zooms left and right Mouse Wheel ‘Serclls up and down Left Previous Transition 36 ISim User Guide wwwxilinx.com Uce60 (v1.4) January 27, 2012 € XILINX. Chapter 2 Exploring the ISim Graphical User Interface Right Next Tranation Pause Break Re-launching ISim Simulation Re-launching Simulation in the [Sim GUI retin TheRedamnd btn a you relanchthe San sive ation ser tnsting aed rae mivaeDacitinla ian Co acter enien amedfeaten in m Henin eet a Recanpile and Reta erly atenaed festive. The dog bec nesage RE ee eee ee ae Fe ete ctr eccitinine nie interne lance Fy ln ett ae What to Expect Successful Simmlation Relaunch ‘When you Re-launch a simulation in the ISim GUI successfully your simulation is complete without errors Unsuccessful Simulation Relaunch ‘When you Re-laumch an unsuccessful simulation in the ISim GUI a dialog box opens with the ayntac error failure to compile source code. The links take you directiy to the source code with errors in the source window. Itis recommended that you address the linked errors sequentially to correct the issues and then recompile using the Relaunch ‘button to verify the fix. Applying Stimulus Force Selected Signal Dialog Box Use the Farce Selected Signal dialog box to enter parameters to force a VHDL signal, ‘Verilog wire, or a Verilog reg to a constant value. Assignments made from within HDL code or any previously applied constant or dock force are overidden by thenewly applied constant force lick Apply to apply all changes. Signal Name Displays the default signa name, The default signal nameis the full path name of theitem selected in the Object Window or waveform. You can change the signal name in the edit box. When you enter an invalid signal name in the edit box, the edit box will tum red. ‘Value Radix Displays the current radix setting of the selected signal. You can choose one of the supported radix types: Binary, Hexadecimal, Unsigned Decimal, Signed Decima, Octal, and ASCIL Force to Value ‘You can specify aforce constant value. The Force to Value uses theradix defined in Value Radix Sim User Guide UGEEO (v13.4) January 27, 2012 inx.com 37 Chapter 2: Exploring the ISim Graphical User Interface £ XILINX: Starting at Time Offset ‘The force command stats after the specified time The default starting timeis 0 Time can be astring, such as 10 or 10 ns. When anumber is entered without anit, the default simulation time unit is used. Cancel after Time Offset The force command cancels after the specified time. Time can be a string such as 10 or 10 ns. When anumber entered without aunit, the default simulation time unit is used. Applying Clock Stimulus Define Clock Dialog Box Use the Define Clock dialog box to enter parameters to force a VHDL signal, Verilog wire, or a Verilogreg to an alternating pattem (clock). Assignments made from within HDL code or any previously applied constant or clock force are overridden by the newly applied clock pattem. Click Apply to apply changes. ‘Signal Name Displays the default signa name. The default signal nameis the full path name of the item selected in the Objects panel or waveform. You can change the signal namein the edit box. When you enter an invalid signal namein the edit box, the edit box tums red. Note Running the restatt command cancels all the effective isim force commands, ‘Value Radix Displays the current radix setting of the selected signal. You can choose one of the supported radix types: Binary, Hecadecima,, Unsigned Decimal, Signed Decimal, Octal, and ASCII Leading Edge Value ‘You can specify the first edge of the clock pattem. The Leading Edge Value uses the radix defined in Value Radix ‘Trailing Edge Value ‘You can specify the second edge of the clock pattern. The Trailing Edge Value uses the radix defined in Value Radix Starting at Time Offset ‘The force command starts after the specified time from the current simulation, The default starting time is0_ Time can be astring such as 10 or 10 ns. If anumberis entered without aunit, [Sim uses the default User unit as retumed by Tal command isim get userunit Cancel after Time Offset ‘The force command cancels after the specified time from the current simulation time, Time can be astring such as10 or 10 ns. When anumberis entered without a unit, ISim uses the default simulation time unit Duty Cycle (%) ‘The percentage of time that the lock pulseis in an active state. The acceptable value ranges from 0 to 100 Period The length of the clock pulse, defined as atime value Time can be a string, such 2810 or 10 ns ISim User Guide 38 wwwxilinx.com Uce60 (v1.4) January 27, 2012 £ XILINX: Chapter 2: Exploring the ISim Graphical User Interface Exampl ‘To assign apermanent clock to a signal (100 MHz clock), set the following fields: Leading Edge Value 1 ‘Trailing Bdge Value 0 Starting at Time Offset: 0 Cancel after Time Offset: Duty Cycle (%): 50 Period: 10 ns ‘To assign a clock to a signal for a specific period of time (start toggling at 100 ns, stop togeling after 1 ms), set the following fields: Leading Edge Value: 1 ‘Trailing Bdge Value 0 Starting at Time Offset: 100 ns Cancel after Time Offset: 1 ms Duty Cycle (%): 50 Period: Preferences 2. Intheleft pane of the Preferences dialog box, click acategory to view. + ISE Text Editor + [Sum Simulator 3. Make thenecessary setting changes 4. Click the Apply button after changes aremade 5. When done viewing and editing the preferences, cick OK ‘The Preference settings are saved and ave effective immediately in your ISim session. ISE Text Editor Preferences ‘The preference setting associated with ISE Text Editor controls the behavior of Hardware Description Language (HDL) files open in ISum only. For more information about the preference settings, see the ISE Text Editor Help 1Sim Simulator Preferences Use the ISim Simulator page in the Preferences dialog box. To access this page, select Edit > Preferences, and select [Sim Simulator in the left pane. Draw Waveform Shadow Show s/hides the shadow background for signals in the Wave window. Limit the maximum number of elements display to. Sets limit for number of children elements to display for objects in the Object window. See Showing Display Elements. Default Radix Sets the default radix value displayed in the wave configuration, the Objects panel, and the Console panel. See Changing the Radix. Console text font ‘The window to the right of the field shows example text for the specified font. Clicking the Change button 208° _Jopens a dialog box in which you can specify the font used in the Console tab. ISim Color Preferences Usethe Colors page to set your color preferences for displaying the waveform. For more information about changing colors, see Creating a Custom Color Scheme Click Apply to apply changes (Cumrent Color Scheme Displays the default color scheme and any custom schemes you have created New Click this button to create anew scheme. Enter the new namein the Current Color Scheme field and edit the colors in the scheme table. ISim User Guide 40 wwwxilinx.com Uce60 (v1.4) January 27, 2012 € XILINX. Chapter 2 Exploring the ISim Graphical User Interface Deete Deletes the custom scheme that you have selected. ‘You can edit the color of this scheme Contains the color selection for each item in the ISim main window that can be customized. Click Apply to apply changes. Time Format Preferences Usetthe Time Format Preferences to customize the appearance of displayed time values in the [Sim GUL To access this page, select Edit > Preferences >Time Format, option in the left pane ‘There are two categories of time formats presented: Waveform Window and Other GUI Hements Waveform Window Time format options under this category apply to the GUI elements inside the waveform viewer window. There are three time format options under this category: Link All Waveform Time Units To Ruler ‘This option 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 ‘This option applies to the main ruler at the top of the waveform window as well as, to the floating ruler. Most users will need to deal with this option only. (Cursors/Markers ‘This option applies to the time values displayed for the all cursors and markers. Measure Bubbles This option applies to the cursor value bubbles displayed at the bottom of the waveform window. Other GUI Elements ‘The time format options under this category apply to the GUI elements outside the Waveform window. All Time Values ‘This option applies to the current simulation time shown at the bottom right of the main window and time values shown in the Objects panel ‘The above time formats allow setting of time units and precision of display of values using following fields: Units Lets you set the units for time values. The default setting for the Other GUI dlements is Default and for the Waveform Window it is Auto. Decimal Places Lets you set the number of decimal places to be used in displaying time values, The default setting for all categories that have a setting is Maxirmum. Following button applies to the entire time format preference setting: Reset To Defaults ‘This setting resets the values to the factory default settings Sim User Guide UGEEO (v13.4) January 27, 2012 inx.com a ISim User Guide UGsEO (v13.4) January 27, 2012 £ XILINX. Chapter 3 VHDL Simulation VHDL Simulation Overview Running a simulation from the command line involves three basic steps 1. Parsing the design files. 2. Generating the [Sim simulation executable 3. Simulating the design. Go to the appropriate simulation topic for details © Running aFunctiona Simulation at the Command Line © Running a Timing Simulation at the Command Line Running a Functional Command Line mulation of a VHDL Design From the Method 1: Using a Project File - Recommended Parsing the Design Files Create afile called .vhd name_2>.vhd vhdl <1ib vhd where: # library_name> specifies the library into which the source on the given line should be compiled. is optional and is only needed when using a different brary than the default work + fle nane_1>vhdisthe sourcefile Each line can contan only one VHDL source file Example vhdl work top.vad vhdl mylib for testbench testbench.vhd Note Thetop-level file test bench. vhd contains the entity named testbench. Generating the ISim Simulation Executable - Running fuse ‘The HDL linker, fuse, performs static elaboration of a design in terms of parsed nodes, generates object code for each unique module instance, and links the generated object codes with the [Sim simulation engine library to create an ISum simulation executable Sim User Guide UGEEO (v13.4) January 27, 2012 inx.com 43 Chapter 3: VHDL Simulation £ XILINX. Method 2: Syntax: fuse {(.] |-pk} .prj where: © (( .) ) is one or more libraries and top-level design unit names. is optional and is only needed when using a different library than the default work. If specified, the HDL file that contams the top level must be compiled in therelated library name as referred in the project file. For example, design unit name of the testbench file ‘+ -0 switch is optional for defining the executablename. Without -o, the default executablename is x. xe Example fuse command with project fle fuse mylib_for_testbench.testbench -prj proj_name.prj See fuse Overview and Syntax for more information about the fuse command, Parsing the Files Using vhpcomp Parsing the Design Files Syntac vhpcomp [-work} <£ile_name>.vhd ‘+ -work is optional and is necessary on ly when trying to specify a different brary than the default work + specifies the brary into which the source specified byefile_nane> should be compiled. There can be multiple VHDL filenames per line Example vhpcomp suba.vhd subb.vhd See vhpcomp Overview and Syntax for more information about the command Generation of the ISim Sirmlation Executable - Running fuse Syntax: fuse {(.)} -© I} is one or more libraries and top level design unit nanes. is optional and is only necessary when using a different brary than the default work. If specified, the HDL file that contans the top level must be compiled in the related library name as referred in the project file. For example, design unit name of the testbench file Note Using gib1 as is mandatory if behavioral design instantiates, UNISIM primitives. ‘+ -0 switch lets you define the simulation executable name (for example, my_sim.exe) Without -o, the defaultnane for the simulation executableis x. exe Example fuse work.topunit work.glbl -o my_sim.exe See fuse Overview and Syntax for more information about the fuse command, 44 ISim User Guide wwwxilinx.com Uce60 (v1.4) January 27, 2012 £ XILINX: Chapter 3: VHDL Simulation Simulation After the compilation and the [Sim simulation executable generation, the final stageis simulation. To run the simulation, run the executable file generated by fuse. ‘Command Behavior x.exe (default name) or user-defined ececutable, such asmy_sim.exe Derign is mulated, when complete, Ta prompt opens for Ta command entry. xexe ~gui crmy_sim.exe gui ‘Design i sanulated, when complete, San GUL launched, GUI Commands and Ta commands can be used toanalyze design, and rerun simulation. x.exe —telbatch cr my_sim.exe ~telbatch ‘ Derign is mulated, and Td commands speaiied in Td fle are run, with the final command being quit command See ISim Simulation Executable Overview and Syntax for mere information about the commend Running a Timing Simulation From the Command Line With a VHDL Design Generating Method 1: ing Simulation Model Before launching atiming simulation, a timing simulation modal and delay file for back-annotation are required. Use the NetGen tool to generate these files. See ‘Generating GateLevel Netlist (Running NetGen)” in the Synthesis aud Stimulation Design Guide (LIG626), Using a Project File - Recommended File Compilation - Create afile called .vhd vhdl .vhd vhdl <£ile_name_n> .vhd ‘© indicates the library that the source on the given line should be compiled. The default library name is work, ‘© vhd is the stimulus file ‘© vhd is the timing simulation model generated by NetGen (see “ Generafing Timing Simulation Model.”) © ofle_name_y> vid are any additional source files required by the testbench (such as avdliary testbench files) Generation of the ISim Sinmlation Executable - Running fuse - ‘The HDL linker, fuse, performs static elaboration of a design in terms of parsed nodes, generates object code for each unique module instance, and links the generated object codes with the simulation engine library to create an ISum simulation executable. Syntax: Sim User Guide UGEEO (v13.4) January 27, 2012 Chapter 3: VHDL Simulation £ XILINX. Method 2: Simulation fuse {(.])-pr} .prj -0 where: © {Kelibrary_name> Jetop_nane>} is one or more libraries and top-level design unit names. The library nameis optional and if not specified it is defaulted to work. If ecified, the HDL file that contains the top level must be compiled in therelated brary name as referred in the project file. For example, design unit name of the testbench file Note Using gib! as fop_name is necessary. ‘© pr} pris optional in fuse during timing simulation. ‘+ -o switch is optional. Without -o, the default name for the simulation executable fuse topunit work.glbl -prj mydesign.pr} -o my_sim.exe See fuse Overview and Syntax for more information about the fuse command, Using vhpcomp File Parsing - Syntac vhpcomp [-Wwork vhpeomp -work <1 ) name> indicates the library into which the source specified by¢fle_nane> should be compiled. There can bemultiple VHDL filenames per line See vhpcomp Overview and Syntax for more information about the command. Generating the ISim Simulation Executable - Running fuse - Syntax: fuse {(. ]) -© < put. where: + Ulcibrary name> I} is one or more libraries and top level design unit nanes. For example, design unit name of the testbench file. Include alibrary name is optional. The default name work is assumed when brary nameis not specified Examples work. abl, mylib.g ‘+ 0 switch is optional. Without -o, the default name for the simulation executable See fuse Overview and Syntax for more information about the fuse command, After compiling and generating the ISim executable, the final stage is simulation, ‘You run the [Sim simulation executable generated by the fuse command to perform, simulation. To execute Tal commands in afile after the simulation has begun, use the -telbatch switch. 46 ISim User Guide wwwxilinx.com Uce60 (v1.4) January 27, 2012 £ XILINX. Chapter 3: VHDL Simulation Itis also possible to instruct the simulator to use the correct timing delays from the Standard Delay Format (SDF) fle Syntax: .exe -telbateh < e_na -sdfmin|-sdftyp|-sdfmax [=) where © .cxe is the simulation executable called x. exe unless otherwise specified with the fuse -o switch, + -sdfmin|-sdftyp |-sdfmaxis the type of delay (mninimum, typical, ormadmum) that [Sim should use. ‘© is the hierarchical path name of theinstance at which SDF back annotation needs to be done. + is the filename of the SDF you want to annotate. See ISim Simulation Executable Overview and Syntax for more information about the command Library Mapping File Note The following information is intended for advanced users. ‘The [Sim HDL compile programs, vhpcomp, vlogcomp and fuse, use the xilinxsim. ini configuration file to find the definitions and physical locations of VHDL and Varilog logical libraries. Search Order ‘The compilers attempt to read si linxsim. ini from these locations in the following order 1. SXILINX/vhal /hap/ yaical_dir_patl yaical_dir pat Slogical_libraryn> = Example ‘The followings an ecample of axilinxsim. ini file VHDL stdeC: /1ibs/vhdl /hap, tdieee=C:/1ibs/vhdl/hdp/iece t/work Sim User Guide UGEEO (v13.4) January 27, 2012 inx.com a7 Chapter 3: VHDL Simulation £ XILINX. Verilog unisims_ver=$XILINX/rt f/verilog/hdp/nt /unisims xilinxcorel ib_ver=C:/libs/verilog/hdp/nt /xilinxcorelib_ver =/my Lib Pfwork Features/Limitations The xit nxsim. ini filehas the following features and limitations: + Theremust beno more than one library path perlineinside the «i 1inxsim.ini file ‘+ the directory comesponding to the physical path does not east, vapeomp or vlogcomp creates it when the compiler first tres to wnite to it © You can describe the physical path in teams of environment variables. The environment variable must start with § character © The default physical directory for a logical library is isim/ + All comments in this file must start with ’~ Interactive Simulation in Command Line Mode ‘When a simulation is run in comunand line mode, aTools Command Language (Tel) prompt opens and you can enter simulation Tel commands, that let you run simulation, analyze the design, and debug the design. For more information about Simulation Commands, see Simulation Command Gvarview. For tips on how to enter commands, see Entering Simulation Commands. 48 ISim User Guide wwwxilinx.com Uce60 (v1.4) January 27, 2012 £ XILINX. Chapter 4 Verilog Simulation Verilog Simulation Overview Running a simulation from the command line involves three basic steps: 1. Parsing the design files 2. Generating the ISim simulation executable 3. Simulating the design Go to the appropriate simulation topic for details + Running aFunctional Simulation at the Command Line + Running a Timing Simulation at the Comunand Line Running a Functional Simulation of a Verilog Design From the Command Line In afunctional (behavioral) simulation of a Verilog design, the steps must be followed Af UNISIM primitives are used: + Compile sx1LINX/verilog/sre/gib1.v tolibray work + Specify work. glbl as one of the . in fuse © Specify -L unisims_verin fuse. Method 1: Using a Project File - Recommended Parsing the Design Files Create afile called < file or j and use the following syntax inside the project e.name_1>.v) ({-d ) (-£ tid o>] [ni {[-d ) [-£ Sim User Guide UGEEO (v13.4) January 27, 2012 Chapter 4: Verilog Simulation £ XILINX. Method 2: where: + verilog indicates that the sourceis a Verilog file. © indicates the library into which the source on the given line should be compiled. More than one Venlog source can be specified on a given line + -d } defines one or more macro located in the location specified in [4 sinelude_patlo] Example verilog work top.v testbench.v Generating the ISim Sinmlation Executable - Running fuse ‘The HDL linker, fuse, performs static elaboration of a design in terms of parsed nodes, generates object code for each unique module instance, and links the generated object codes with the [Sim simulation engine library to create an ISum simulation executable Syntax: fuse {(iprj bra: >.) |-pr} whee + (letbrary name> Jtey nano} se one or more ibrartes and top level design unit names ‘The library names optional and if ot epecied itis defaulted to work. specified the LDL fle that contains the top levd has to be compiled in the related ibrary name as refered in the projec ile. For example design unit name of the teatbench fle Note Using o1b1 a8 tyne is mandatory if behavioral design instaniates UNISIM primutives + -Lettrlog itrery> must indude undsims_ver if behavioral suletion ries on UNISIM primatves, n addition fo other ‘ne libraries tht apply tothe design, such asuninacro, ver and xilinxcorelib_ver + -o switch is optional. Without -o, the default name for the simulation executable Example fuse work.test_bench work.glbl -prj mydesign.prj -L unisims_ver “L unimacro_ver -L xilinxcorelib ver -o test _bench.exe See fuse Overview and Syntax for more information about the fuse command, Parsing the Files Using vlogcomp Parsing the Design Files Syntac vlogeomp [-work | .v {(-d ) (-i | where ‘+ work is optional and is necessary only when you must specify a different library than the default work * indicates the library into which the source specified by¢file_jane>should be compiled. More than one Verilog source can be specified on. agiven line ‘© ~demacro> defines one or more macro located in the location specified in ainelude_pati 50 ISim User Guide wwwxilinx.com Uce60 (v1.4) January 27, 2012 € XILINX. Chapter 4: Verilog Simulation Example vlogeomp suba.v subb.v See viogcomp Overview and Syntax for more information about the vlogcomp commend. Generation of the ISim Sirmlation Executable - Running fuse Syntax: fuse {( > where: + Ucibrary name> I} is one or more top level of design unit names can be specified. For example, design unit name ofthe testibench file. One top name must be gibi. Induding alibrary nameis optional. The default brary name work is assumed when abibrary names not specified Note For more information about the global module, see "Global Set/Reset (GSR) and Global Tristate (GTS) in Verilog” in the Synthesis aud Simulation Design Guide. © -L must indude unisimin addition to other Xilirxc libraries that apply to the design, such as unimacro and xilinxcorelib. + -o switch is optional. Without -o, the default name for the simulation executable Example fuse work.test_bench work.glbl -L unisims ver -L unimacro_ver -L xilinxcorelib ver -o test _bench.exe See fuse Overview and Syntax for more information about the fuse command, Simulation After the compilation and the [Sim simulation executable generation, the final stageis ‘simulation. To run the simulation, run the executable file generated by fuse ‘Command. Behavior x.exe (default name) or user-defined Derign is mulated, when complete, Ta eecutable, such asmy_sim.exe prompt opens for Ta command entry. xuexe —gui ormy_sim.exe gui Design is mulated, when complete, [Sim GUL launched. GUI Commands and Td commands can be weed to analyze design, rerun simulation, ete xuexe —telbatch or Derign is mulated, and Td commands my_sim.exe —telbatch elle name> | speciied in Td file are run, with the final command being quit command See ISim Simulation Executable Overview and Syntax for more information about the commend Sim User Guide UGEEO (v13.4) January 27, 2012 inx.com 5 Chapter 4: Verilog Simulation £ XILINX: Running a g Simulation of a Verilog Design From the Command Line Generating Method 1: Generation of the ISim In atiming simulation of a Verilog design, the following rules apply: © Compile $xILINX/verilog/sre/gibl.v to library work + Specify work. gibi as one of the . in fuse. + Specify-L simprims_ver in fuse. ing Simulation Model Before launching atiming simulation, a timing simulation modal and delay file for back-annotation are required. Use the NetGen tool to generate these files. See “Generating Gate Level Netlist (Running NetGen)” in the Synthesis ud Sinuulation Design Guide (LIG626), Using a Project File - Recommended Compilation of the Files Create afile called .v) { is the project filename. ‘+ verilog indicates that the sourceis a Verilog file. More than one Verilog source can be specified on a given line © is the target library into which the source(s) on that particular line should be compiled. + [d-] allows you to define one or more macro of the path specified by [+ .) ) is one ormore top level of design unit names can be specified. For example, design unit name of the testbench file. One top name must be g1b1. Including alibrary nameis optional. The default library name work is assumed when alibrary name is not specified, © -L must indude simsprims_ver in addition to other Xilix® Ubraries that apply to the design. + -0 switch is optional. Without -o, the default name for the simulation executable Example fuse work.testbench work.glbl -prj design.prj -L simprims_ver See fuse Overview and Syntax for more information about the fuse command, Parsing the Files Using vlogcomp Parsing the Files Syntac vlogcomp [-work ] .v where ‘+ -work is optional and is only needed when trying to specify a different library than the default work = indicates the library into which the source specified bysfile_nane should be compiled. More than one Verilog source can be specified on agiven line Example vlogcomp top_testbench.v top_timesim.v See viogcomp Overview and Syntax for more information about the vlogcomp command Generation of the ISim Sirmlation Executable - Running fuse Syntax: Jog_library>) -0 fuse {(. ]) {-L where: + Ucibrary name> I} is one or more top level of design unit names can be specified. For example. design unit name ofthe testiench file. One top name must be gibi. induding alibrary nameis optional. The default brary name work is assumed when alibrary names not specified © -L must indude simsprims_ver in addition to other Xilinx Ubraries that apply to the design. + -o switch is optional. Without -o, the default name for the simulation executable Example fuse work.textbench work.glbl -L simprims_ver -o timesim.exe See fuse Overview and Syntax for more information about the fuse command, Sim User Guide UGEEO (v13.4) January 27, 2012 inx.com 53 Chapter 4: Verilog Simulation £ XILINX: Simulation After the compilation and ISim simulation executable gmeration, the final stage is sumulation. The ISun executable generated by the fuse command runs to effect simulation. If you would like Td commands contained in afile to be executed after the simulation has begun, use the -telbatch switch Itis also possible to instruct the simulator to use the correct timing delays from the SDF file Syntax: .exe -telbateh -sdfmin|-sdftyp|-sdfmax [.exe is the simulation executable called x. exe unless otherwise specified with the fuse -o switch, + -sdfmin|-sattyp |-sdfmaxis the type of delay (mninimum, typical, rmadmum) that [Sim should use. ‘© is the hierarchical path name of the instance at which the Standard Day File (SDF) back annotation needs to be done, ‘+ is the filename of the SDF file you want to annotate See ISim Simulation Executable Overview and Syntax for more information about the commend Search Order for Instance of Verilog Design Units ‘The HDL linker fuse, uses the following search order in orvler to search and bind instantiafed Verilog Design Units in a design 1. Library specified by *uselsb directive 2. Libraries speatfied on the command line with -14bI-L switch, 3. Library of the parent design unit. 4. Logical work library. Supporting Source Libraries ‘The compiler arguments listed below support source libraries in the same manner as, Verilog-XL. See the viogcomp Options or the fuse Options for a description of each argument, ‘To use this feature, the following conmnand options must be passed to the vLogco: Verilog compiler Library Location (-sourcelibdir) Note -sourcelibdir provides functionality that is similar to the-y switch in Verilog XL. ISim User Guide 54 wwwxilinx.com Uce60 (v1.4) January 27, 2012 £ XILINX. Chapter 4: Verilog Simulation ‘After the source files on the command line are compiled f there ave any unresolved references to modules, the compiler searches the source ibranes for resolution, During this search, the compiler attempts to match the name of any unresolved intentisted deagn unt with afle of thesare nave in the spedied -sourcelibdir directory if uch a fle edete, the compiler analyzes thet fle Note By default, the compiler ignores any files with extensions such as .v or .h, unless -sourcelibext is also used -sourcelibdir -sourcelibdir Source File Extension (-sourcelibext) Note -sourcelibext provides functionality that is similar to the “libext* switch in Verilog XL. ‘This command line argument may be used in conjunction with -sourcelibdir when the source library files have extensions. “sourcelibext .v Source File (-sourcelibfile) Note -sourcelibfile provides functionality similar to the -v switch in Verilog XL. Isim also enables you to provide a source Verilog library file that contains definitions of all the unresolved modules. -sourcelibfile ./library/1ib_abe.v Examples ‘The following examples demonstrate the use of these command options ‘vlogcamp vlogcomp -work myworkl filel.v -sourcelibdir mydir/cells ‘The compiler searches for unresolved cells inside directory mydlic/ca11s. For example, if fi.1e1.v instantates DFF and DMUX, which are unresolved, then the compiler ‘would look for files with names DFF and DMUX inside directory mydir/ce11s. Files DFF and DMUX should define modules DFF and DMUX. fase fuse -prj test.prj test -sourcelibfile ./mylibl/1ib_abc.v -sourcelibfile ./imylibl/1ib_cde.v where t. prj contains verilog work test.v ‘The compiler uses files from the -sourcelibfile options for modules used in test .v. It andyzes the modules and elaborates the test design. prj fuse -prj test.prj test where t. prj contains verilog w ~sourcelil k test.v -sourcelibdir ./mylibl ~sourcelibdir ./mylib2 xt av For every unresolved module with name modulename instantiated in file test .v, the compiler looks up files with namemodulename.v inside the directories . /myiib1 and ny1Liba, in that order Sim User Guide UGEEO (v13.4) January 27, 2012 www. inx.com 55 Chapter 4: Verilog Simulation £ XILINX. Library Mapping File Note The following information is intended for advanced users. ‘The [Sim HDL compile programs, vapcomp, vlogcomp and fuse, use the xilinxsim. ini configuration file to find the definitions and physical locations of VHDL and Varilog logical libraries. Search Order ‘The compilers attempt to read si linxsim. ini from these locations in the following order 1. SXILINX/vhal /hap/ Stegical_librarya> = Example ‘The followings an ecample of axilinxsim. ini file VHDL /vhd Mad, 1/ Libs/vhdl /hdp/ieee T/work Verilog unisims_ver=$XILINX/rt £/veri leg/hdp/nt /ani.sim xilinxcarelib_ver=C:/Libs, hdp/nt /xilinxeorelib_ver v/my Lib iwork Features/Limitations 56 The xilinxs im. ini filehas the following features and limitations + Theremust beno more than one library path perline inside the «i 1inxsim.ini file ‘+ the directory comesponding to the physical path does not edst, vapeomp or vlogcomp creates it when the compiler first tres to wnite to it, = You can describe the physical path in tams of environment variables. The environment variable must stat with § character © The default physical directory for a logical library is isim/ +All comments in this file must start with ’~ ISim User Guide wwwxilinx.com Uce60 (v1.4) January 27, 2012 Chapter 4: Verilog Simulation £ XILINX. Predefined XILINX_SIM Macro for Verilog Simulation XILINX_ISIMis a Verilog predefined macro specific to [Sim, and the value of this macro is'1’. These predefined macros are used to perform tool specific functions or sometimes just to identify which tool to usein a design flow. isim predefined_macro; ‘ifdef XILINX_ISIM Sdi splay ("XILINX_! fp = $fopen ("ISIN sedi: end endmedule Interactive Simulation in Command Line Mode ‘When a simulation is run in comunand line mode, aTools Command Language (Tel) prompt opens and you can enter simulation Tel commands, that let you run simulation, analyze the design, and debug the design. For more information about Simulation Commands, see Simulation Command Gvarview. For tips on how to enter commands, see Entering Simulation Commands. Sim User Guide UGEEO (v13.4) January 27, 2012 inx.com ‘7 ISim User Guide UGsEO (v13.4) January 27, 2012 £ XILINX. Chapter 5 Mixed Language Simulation Mixed Language Simulation Overview Note The following information is intended for advanced users. Isim supports mixed Language projectiles and mixed language simulation. Thislets you induge Varlog modulesin a VEDL design, and vice versa. Some resricions do apply Restrictions on Mixed Language in Simulation ‘+ Mang VHDL and Veilogis restricted to the moduleinstance or component only. A. VHDL design can instantiate Verilog modules and a Venlog design can instantiate VHDL components. Any other mix use of VHDL and Verilog is not supported. + A Verilog hierarchical reference cannot refer to a VHDL unit nor can a VHDL expanded/selected name refer to a Verilog unit + Only asmall subset of VHDL types, generics and ports are allowed on the boundary to aVerilogmodule Similarly, a small subset of Verilog types, parameters and ports are allowed on the boundary to VHDL design unit + Component instantiation-based default binding is used for binding a Verilog module to a VHDL design unit. Specifically, configuration specification, direct instantiation and component configurations are not supported for a Verilog module instantiated inside a VHDL design unt, [Nere Info Key Steps in a Mixed Language Simulation ‘+ Instantiate mixed language components. See Instantiating a Verilog Modulein a VHDL Design Unit or Instantiating a VHDL Module in a Verilog Design Unit = Optionally, specify the search order for VHDL entity or Verilog modules in the design libraries of amixed language project. Use the fuse —L option to specify the binding order of a VHDL entity or a Verilog modulein the design libraries of amixed language project. Note Thelibrary search order specified by ~Lis used for binding Verilog modules to other Verilog modules as well. [More Info + Run the simulation. Sim User Guide UGEEO (v13.4) January 27, 2012 inx.com 59 Chapter 5: Mixed Language Simulation € XILINX. Instantiating Mixed Language Components Instantiating a Verilog Modul a VHDL De: In amixed language design, you can instantiate a Verlogmodulein a VHDL design unit To Instantiate a Verilog Module in a VHDL Design Unit 1. Dedare a VHDL component with the same name as the Verilog module (respecting, case smativity) that you want to instantiate For example, COMPONENT MY_VHDL_UNIT PORT ( Q + out sTD_uLe Diin sTD_UL Cian sTD_UL END COMPONENT; 2. Usenamed association to instantiate the Verilog module For example, OUT : MY_VHDL_UNIT PORT MAP ( To ensure that you are correctly matching port types, see port mapping rules in Mixed Language Boundary and Mapping Rules. Since 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. Instantiating a VHDL Module in a Verilog Design Unit In amixed language design you can instantiate a VHDL modulein a Vesilog design unit, To Instantiate a VHDL Module in a Verilog Design Unit Instantiate the VHDL entity as if it were a Verilog module. For example, 2 out; D ED1( o(@our), ISim User Guide 60 wwwxilinx.com Uce60 (v1.4) January 27, 2012 € XILINX. Chapter 5:Mixed Language Simulation Mixed Language ding and Searching Note The following information is intended for advanced users. ‘When you instantiate a VHDL component or a Verilog module, the fuse linker first searches for aunit of the same language as that of the instantiaing design unit If aunit of the same language is not found, fuse searches for a cross language design unit in the libraries specified in the-1ib option. The search orderis the same as the order of appearance of libraries on fuse command line For more information about Veilog brary search order, see Search Order for Instance of Verilog Design Units. Note When using the ISE® software, thelibrary search orderis speafied automatically. No user intervention is necessary or possible VHDL Instantiation Unit ‘When a VHDL design instantiates a component, the fuse linker treats the component name as a VHDL unit and searches for it in logical library ‘work”. If a VHDL unit is found, fuse binds it and the search stops. If fuse cannot find a VHDL unit, it treats the case preserved component name as a Verilog module name and continues to search as follows + Performs a case sensitive search for a Verilog module in the user specified list of unified logical libraies in the user specified search order. The first one matching the names picked and the search stops, IE case sensitive search is not successful, performs a case insensitive search for a Verilog module in the user specified list of unified logical libraries in the user specified search order. If aunique binding is found for any one library, the search stops Verilog Instantiation Unit ‘When a Verilog design instantiates a component, the fuse linker treats the component name as a Verilog unit and searches for a Verilog module in the user specified list of unified logical librartesin the user specified order If found, fuse binds it and the search stops. If fuse cannot find a Verilog unit, it treats the name of the instantiated module as a ‘VHDL entity name and continues the search as follows ‘Performs a case insensitive search for an entity with the same name as the instantiated module namein the user sp ecified list of unified logical libraries in the user specified order. The first onematching thenameis picked and the search stops. + Performs a case senstive search for aVHDL design unit name constructed as an tctended identifier in the user specified et of unified loge ibrartesin the user spected order If aunigue bindingis found for any one lbrary thename's picked aha the earch stops Note For amixed language design, the port names used in anamed association to a VHDL entity instantiated by a Verllog module are always treated as case insensitive Also note that you cannot use a defparam statement to modify a VHDL generic Sim User Guide UGEEO (v13.4) January 27, 2012 inx.com 6 Chapter 5: Mixed Language Simulation £ XILINX: Mixed Language Boundary and Mapping Rules Note The following information is intended for advanced users. ‘The following restrictions apply to the boundaries between VHDL and Verilog design units/modules + Theboundary between VHDL and Verilog is enforced at design unit level, ‘+ AVHDL designis allowed to instantiate one or more Verilog modules ‘+ Instantiation of a Verilog UDP inside a VHDL design isnot supported. ‘+A Verilog design can instantiate a VHDL component corresponding to a VHDL entity only. instantiation of a VHDL configuration in a Verilog design is not supported. Port Mapping ‘The following rules and limitations for port mapping are used in mixed language projects, ‘+ Supported VHDL port types: - IN - our - INOUT Note Buffer and linkage ports of VHDL arenot supported + Supported Verilog port types: - INPUT - OUTPUT - INOUT Note Connection to bi-directional pass switches in Verilog arenot supported. + Unnamed Vailog ports arenot allowed on mixed design boundary. ‘+ Thefollowing table shows supported VHDL and Verilog data types for ports on the mixed language design boundary. VHDL Port Verilog Port bit net std_slogie net wa logic net it vector ester net wa slope vector vector net sd logic vector ester net Note Verilog output port of type reg is supported on the mixed language bounday. On the boundary, an output reg portis treated asif it were an output net (wire) port Note Any other type found on mixed language boundary is considered an error. ISim User Guide wwwxilinx.com Uce60 (v1.4) January 27, 2012 £ XILINX: Chapter 5: Mixed Language Simulation Generics (Parameters) Mapping VHDL/Veril Following VHDL generic types (and their Verilog equivalents) are supported, + integer + real + sting + boolean Note Any other generic type found on mixed language boundary is considered an error jog Values Mapping ‘Verilog states are mapped to std_logic and bit as shown in the following table. Verilog std_logic bit Zz z 0 0 v ‘0 1 7 7 x x 0 Note Verilog strength is ignored. There is no corresponding mapping to strength in VHDL. ‘VHDL type bit ismapped to Verilog states in the following table. bit Verilog a 0 ¥ T VHDL type std_logic ismapped to Verilog states in the following table std_logic Verilog v x x x a 0 T T z Zz we x E 0 # 1 x Sim User Guide UGEEO (v13.4) January 27, 2012 inx.com 63 ISim User Guide wwwxilinx.com UGsEO (v13.4) January 27, 2012 © XILINX. Chapter 6 Waveform Analysis Before Analysis Launching the ISim GUI To launch the ISim GUI in read-only mode to view or analyze the data from aprevious simulation, see Opening a Static Simulation What to Expect Simulation from ISE or PlanAhead software ‘When you launch [Sim from the ISE® or thePlanAhead™ software, awave configuration with top-level signals displays. Design datais populated in other areas of the GUI, such asthe Objects pana, and the Instances and Processes pana. You can then proceed to add additional signals, or run the simulation in ISim. Simulation at the Command Line ‘When you launch ISim from the command line by running the simulation executable with the -gui switch (Graphical User Interface Mode), an empty wave configuration displays, Design datais populated in other areas of the GUI, such as the Objects Panel, and the Instances and Processes pand.. You must add signals to the wave configuration before you run the sumulation in ISim. Adding Signals to the Wave Configuration ‘You can populate the Wave window with the signals from your design using menu commands or drag and drop capabilities in the GUI, or using Tools Command Language (Td) commands in the Console panel Note Changes to the wave configuration, including creating the wave configuration or adding signals, do not become pamanent until you savethe wefg file For more information, see Saving the Results. Sim User Guide UGEEO (v13.4) January 27, 2012 inx.com 65 Chapter 6: Waveform Analysis £ XILINX: In the GUI 1. Inthe Instances and Processes panel, expand the design hierarchy, and select an. item ‘The objects that correspond to the selected instance or process displays in the Objects panel 2. Inthe Objects panel, select one or more objects, 3. Use one of the following methods to add objects to the Wave Configuration: + Right-click, and select Add to Wave Window from the context manu. + Drag and drop the objects from the Objects panel to the Name column of the ‘Wave window. + Inthe Console, use the wave add command as described in the following subsections Using Tel 1. Optionally, you can first identify the objects you want to add by eploring the design hierarchy in the Instances and Processes panel and the Objects panel, as desaibed above, or by entering the scope command in the Console panel 2. Inthe Consolepand,, enter the wave add command to enter an individual object or a group of objects, Wave configurations and .wetg files ‘Though both awave configuration and a wefg file refertto the customization of lists of waveforms, thereis a conceptual difference between them. ‘+ The wave configuration is an object that is loaded into memory with which you can work. + The . wets fileis the saved form of awave configuration on disk Wave configuration names and .wefg file names A wave configuration can have aname or be “Untitled.” Thename appears on the ‘tab of the wave configuration window. © When saving awave configuration to a. wea fileusing a GUITd command, the wefg file takes thename supplied as a conunand argument. In saving to the file, the wave configuration nameis changed to match the . wots filename + When loading awave configuration from a . wea file, the wave configuration uses thename of the . wef Ale Adding Copies of Signals or Buses ‘You can add copies of the same signal/bus in a wave configuration for comparing ‘waveforms. Copies of the same signal /bus can be placed anywhere in the wave configuration, such asin groups, or virtual buses To Add a Copy of a Signal or Bus 1. Sect asignal or busin the wave configuration inthe Wave window. 2. Select Edit > Copy, or press Cal+C ‘The signal nameis copied to the dipboard 3. Select Paste command, or press Ctil+V ISim User Guide 6s wwwxilinx.com Uce60 (v1.4) January 27, 2012 £ XILINX: Chapter 6: Waveform Analysis The signal/busis now copied to the wave configuration. You can move the signal/ous using drag and drop as needed. Running a Simulation in ISim Simul ation, the process of verifying the logic and timing of a design, can berun from Sim using functions in the interface or at the command line. To Run a Simulation From the ISim GUI ‘The following GUI menu commands can be used to run simulation. ‘+ Sinmlation > Restart Gi - stops simulation and sets simulation time back to 0. Use the Run All, Run For or Step command to run the simulation over agan without reloading the design. See restart Tel command. + Simulation > Run All > - Runs simulation until all events are executed. You can also use the run Td command with the all option. ‘+ Sinmlation > Run > - Runs simulation for 100ns or for specified amount of time in the toolbar. Time and time unut are entered in the Value box in the toolbar. You can also use the run Tol command with alength and unit specified. ‘+ Sinmlation > Step “2 - Runs simulation for one executable HDL instruction at a time. See Stepping a Simulation. See also step Tel command. In addition, you can run simulation until a specific point in your HDL source code isreached. To do so, use breakpoints and the Run All command. See Source Level Debugging Overview. Note The current simulation timeis displayed on the status barin thelowerright comer Pausing a Simulation ‘Whilerunning a simulation for any length of time, you cen pause a simulation using the Break command, which leaves the simulation session open. To close the session of ISim, see Closing ISim. To Pause a Running Simulation ‘You can pause arunning simul tion using the Break command as follows: ‘+ Select Sinmlation > Break, © Click the Break toolbar button Il © Enter Cl+C at the command line oly. ‘The simulator stops at the net executable HDL line. The line at which the simulation stopped is displayed in the text editor. Note This behavior applies to designs that have not been compiled with the -nodebug switch. ‘The simulation can beresumed at any time by using the Run All, Run for the time specified on the toolbar (Toolbar), or Step commande, See tunning a Simulation in Sim for detals Closing ISim ‘You can terminate a simulation and close the ISim session. Sim User Guide UGEEO (v13.4) January 27, 2012 inx.com 67 Chapter 6: Waveform Analysis £ XILINX: To Close ISim Select File > Exit + Enterthe quit —f command in the Console panel at the prompt. This will prevent an “are you sure” dialog box from opening. ‘Click theX at the top-right comer of the main window. ‘The simulation terminates and the session of ISim closes. Customizing the Wave Configuration Placing Cursors ‘Theman cursor and secondary cursorin the Wave window enable you to display and rmeanure time, and they form the focal point for various navigetion activities. Note Cursors are used primarily for temporary indicators of time and are expected to ‘bemoved frequently, such as when measuring the time between two waveform edges. For more pamanent indicators, used in situations such as establishing atime-base formultiple measurements, add markers to the Wave window instead. See Adding Marker for more information. To Place the Main Cursor ‘With a single click in the Wave window, the main cursor is placed at the location of the mouse dick. To Place the Secondary Cursor Place the secondary cursor as follows + Click and hold the waveform, and drag either left or right. This sets the secondary cursor, with the initial click, and themain cursor, when you finish dragging. ‘+ Select Shift and click the mouse in the waveform. If the secondary cursor is not already on, this action sets the secondary cursor to the present location of the main cursor and places the main cursor at the location of the mouse dick. Note To preserve the location of the secondary cursor while positioning themain cursor, hold the Shift key while clicking Note When placing the secondary cursor by dragging you must drag minimum distance before the secondary cursor will appear To Move a Cursor To move a cursor hovering over the cursor until you see the grab eyibol and dick and drag the cursor to the new locaton Asyou drag the cursor in the Wave window, you see ahollow or filled-in cirdeif the Snap to Tranattion toolbar button is selected, which is the default behavior. + Afilled-in arcle @ indicates that you are hovering over the waveform transition of the selected signal. + Ahollow circle O indicates that you are hovering between transitions in the waveform of the selected signal ISim User Guide 63 wwwxilinx.com Uce60 (v1.4) January 27, 2012 £ XILINX: Chapter 6: Waveform Analysis To Hide the Secondary Cursor A secondary cursor can be hidden by clicking anywhere in the Wave window where there isno cursor, marker, or floating ruler Setting Markers Adding a Marker ‘You can add one or more markers to navigate through the waveform, and to display the waveform value at apatticular time. Markers are added to the wave configuration at the location of the main cursor. To Add a Marker 1. Place the main cursor at the time where you want to add the marker by clickingin the Wave window at the desired time or on the desired transition. 2. Select Edit > Markers > Add Marker, or click the Add Makkertoolbar button ‘A makkeris placed at the cursor, or slightly offset if amarker already exist atthe ication of the cursor. The time of themarkeris displayed at thetop of the line Moving a Marker After you add amarker, you can move the marker to another location in the waveform using the drag and drop method. To Move a Marker 1. Click markerlabel (atthe top of themarke) and dragit to the desired location The drag symbol BMindicates that the marker can be moved around ‘As you drag the matkerin the Wave window, you will see ahollow or filled-in cirdeif the Snap to Transition toolbar button is selected, which is the default behavior + A filled.in circle @ indicates that you are hovering over a transition of the selected signal's waveform or over another maker For markers, the filled-in arde is white ‘+ Ahollow circle O indicates that you are hovering between transitions in the selected signa’s waveform. 2. Release the mouse key to drop the marker to thenew location, ‘The marker is moved to thenew location, Deleting a Marker ‘You can delete one or all markers with one command To Delete Markers 1. Right-click over amarker 2. Perform one of the following functions ‘+ Select Delete Marker from the context menu to delete a singlemarker, ‘+ Select Delete All Markers from the context menu to delete all markers Note TheDelete key can also be used to delete a selected maker ‘The maker or markers are removed from the waveform. Sim User Guide UGEEO (v13.4) January 27, 2012 inx.com 69 Chapter 6: Waveform Analysis € XILINX: ‘The undo command (Edit > Undo) can be used to reverse amarker deletion, Adding Dividers ‘You can add a divider to your wave configuration to create avisual sep arator of signals, To Add a Divider 1. InaName columm of the Wave window, click a signal below which you wish toad a divider 2. Select Edit > New Divider, or right-click and select New Divider from the conte ‘A divideris added to the wave configuration. The changeis visual and nothingis added to the HDL code. ‘The new divider will be saved with the wave configuration file when the fileis saved net. Following changes can be made to a divider: Dividers can benamed. See Renaming Objects. ‘+ Dividers can be moved to another location in the waveform, by dragging and dropping the divider name To delete a divider, highlight the divider, and click the Delete key, or right-click and select Delete from the context menu. Adding Groups ‘You can add a group to your wave configuration, which is a collection, or “folder”, to which signals and buses can be added in the wave configuration as ameans of organizing a set of related signals. The group itself displays no waveform data but can be expanded to show its contents or collapsed to hide them. To Add a Group 1. In awave configuration, select one or more signals or buses you wish to add to agoup 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 A group that contains the selected signal or busis added to the wave configuration. A. group is represented with the.ill icon. The changeis visual and nothings added to the HDL code ‘You can move other signals or buses to the group by dragging and dropping the sgna/busnane ‘The new group and its nested signals/buses will be saved the next time you save the wave configuration file. Following changes can be made to a group ‘© Groups can berenamed. See Renaming Objects ‘© Groups can be moved to another location in the Name column by dragging and dropping the group name. ISim User Guide 70 wwwxilinx.com Uce60 (v1.4) January 27, 2012 © XILINX: Chapter 6: Waveform Analysis To remove a group, highlight a group and select Edit > Wave Objects > Ungroup, or right-click and select Ungroup from the context menu. Signals/buses formerly in the group will be placed at the top level in the wave configuration hierarchy. Caution! The Delete key will remove the group audits nested signals and buses from the wave configuration. Adding Virtual Buses ‘You can add a virtua bus to your wave configuration, which is a grouping or “folder”, to which logic scalars and arrays can be added. The virtual bus displays abus waveform, ‘which is comprised of the signal waveforms in the vertical order that they appear under the virtual bus, flattened to a one-dimensional array. To Add a Virtual Bus 1. In awave configuration, select one or more signals or buses you wish to add to avurtua bus 2. Select Edit > New Vintual Bus, or right-click and select New Virtual Bus from the context menu, A virtual bus, which contains the selected signal(s) or bus(es), is added to the wave configuration, A virtual busis represented with the icon. The changeis visual and nothing is added to the HDL code ‘You can move other signals or buses to the virtual bus by dragging and dropping the sgna/busnane ‘Thenew virtual bus and its nested signals/buses will be saved thenext time you save the wave configuration fle. Following changes can be made to avitual bus ‘© Virtual buses can berenamed. See Renaming Objects. ‘+ Move the virtual bus to another location in the waveform by dragging and dropping the vutual bus name To remove a virtual bus, and ungroup its contents, highlight the virtual bus, and select Edit > Wave Objects > Ungroup, or right-click and select Ungroup from the context Caution! The Delete key will remove the virtual bus ad its nested signals and buses from the wave configuration. Renaming Objects ‘You can rename any object in the Wave window, such as signals, dividers, groups, and virtual buses, To Rename an Object 1. Select the object name in the Name column 2. Right click, and select Rename from the context ment 3. Replace thename with anew one 4. Press Enter or cick outside thename to make thename change take eect ‘You can also double-dick the object name and then enter anew name ‘The changeis effective immediately. Object name changes in the wave configuration do not affect those in the design source code. Sim User Guide UGEEO (v13.4) January 27, 2012 inx.com n Chapter 6: Waveform Analysis £ XILINX: Changing the Display Names ‘You can display the full hierarchical name (long name), the simple signal/ous name (short name), or a custom name for each signal. The signal/bus name displaysin the Name column of the wave configuration. If thenameis hidden: + Expand the Name colunm until you see the entire signal name. ‘© Use the scroll bar in the Name column to view thename To Change the Display Name 1. Select one or more signal or bus names. Use Shift+ click or Ctil+ click to select many signal names. 2. Right-click, and select Name > ‘+ Long to display the full hierarchical name. ‘+ Short to display the name of the signal or bus only. + Custom to display the custom name given to the signal when renamed. See Renaming Objects ‘Thename changes immediately according to your selection. Changing the Radix To Set the Default Radix ‘The default radic controls the bus radix displayed in the wave configuration, Objects pand, and the Consolepandl. To change the default radix from the default binary 1. Select Edit > Preferences 2. InthePreferences dialog box, click ISim Sinmalator in theleft pane 3. Select aradic fromthe Default Radic fied drop-down list 4. Click Apply, and click OK To Change an Individual Radix ‘You can change the radix of an individual signal (HDL object) in the Object panel as follows 1. Right-click on abusin the Objects panel 2. Select Radix, and the destred format from submenu menu: + Binary + Hexadecimal + Unsigned Decimal + Signed Decimal © Octal + ascI Note Changesto theradix of an item in the Objects panel do not apply to values in the ‘Wave window or the Consolepand. To change the radix of an individual signal HDL object) in the Wave window, use the Wave window context menu. To changetheradixin the Console panel, use the isim set radix Td command. ISim User Guide n wwwxilinx.com Uce60 (v1.4) January 27, 2012 £ XILINX: Chapter 6: Waveform Analysis Reversing Bus Bit Order ‘You can reverse the bus bit orderin the wave configuration in order to switch between, ‘MSB-first and LSB-first signal representation. To Reverse a Bus’ Bit Order 1. Sdect abus. 2. Right click and select Reverse Bit Order. ‘The bus bit orderis reversed, The Reverse Bit Order command is marked to show that thisis the current behavior. Navigating the Wave Configuration Expanding and Collapsing a Hierarchy ‘You can expand and collapse ahierarchy in any window orpanel with objectsin nested groups using one of the following methods. Clicking the Arrow - Click the arow to expand thehierarchy, Onelevel can be expanded at atime ~ Click the arrow to collapse the hierarchy. Menu Command 1. Select an object 2. Select Edit > Wave Objects > + Expand - Expands the hierarchy object that is selected. One level can be expanded at atime + Collapse - Collapses the hierarchy of the object selected. Using the Context Menu 1. Select an object 2. Right-click and select the applicable command from the context ment, + Expand - Expands the hierarchy object that is selected. One level can be expanded af atime + Collapse - Collapses the hierarchy of the selected object. Sim User Guide UGEEO (v13.4) January 27, 2012 inx.com 3 Chapter 6: Waveform Analysis £ XILINX: Zooming In and Out Usethe zoom functions to view your wave configuration in the Wave window asneeded. Using Commands Zooming Behavior ‘Command ‘Shortcut Key Zoom in Select View > Zoom >In, [+ PressFB ZoomIntoclbar |, Press Ch, and in the ‘wave configuration, draw line down tothe left Note The middlemouse Dutton can beused in place of the Ctal key. Zoom out ‘Select View > Zoom > Out, or [+ Press F7 ick the Zoom Out toolbar + Press Cha, and in the ‘wave configuration, dra alineup and tothe ight Note The middlemouse Dutton can be used in place of the Ctl key. Zoom to display the entire | Select View > Zoom >To Full [+ Press FS wevefonm inthewindow | View, ordick the Zoomto | > ncaa andinthe Full toolbar button J) ‘wave conf guration, dxavo alinenp and tothe lit Note The middlemouse Dutton can be used in place of the Ctl key. ‘Zoom toan area you select | Not applisble Press Cha, and draw a box around an area of the wave ‘configuration from the top eft comer of the area tothe bottom right Note The middlemouse Dutton can be used in place of the Ctl key. ‘Zoom to display the time | 1. Place the carsorsinthe | Not applicable range between the two ‘waveform, Select View > Zoom > To Cursors, or cick the Zoom to Selected toclbar Dutton Using the idle Mouse Wheel Function ‘Command. Zoom? in and out Press Chl and move the Mouse Wheel ‘Serclls Toft and right Press Shift and move the Mouse Wheel ‘Scrolls up and down ‘Move the Mouse Wheel only ISim User Guide 74 wwwxilinx.com Uce60 (v1.4) January 27, 2012 £ XILINX: Chapter 6: Waveform Analysis Displaying the Floating Ruler ‘The floating ruler assists with time measurements using a time base other than the absolute simulation time shown on the standard ruler at the top of the Wave window. A floating ruler can be displayed (or hidden) and moved to the desired location in the ‘Wave window. The floating ruler’s time base (time 0) is the secondary cursor, or, if there isno secondary cursor, the selected marker. The floating ruler button and the floating ruleritself are visible only when the secondary cursor (or selected marker) is present. To Display the Floating Ruler 1. Either: + Place the secondary cursor or + Sdect amatker 2. Select View > Floating Ruler, or click the Floating Ruler button ‘You only need to follow this procedure the frst time. The floating ruler will appear each time the secondary cursor is placed or marker is selected, as instructed in Step 1 ‘The floating ruler displays. Select the command again to hide the floating ruler. Displaying Waveform Values With Markers Markers, which are lines that intersect the waveform at apaticular time, can be used to navigate through the wave configuration and to display the signal and bus values in the Value column for each marker. Follow this procedure to jump themain cursor from. maker to makerto display waveform values. To Display Waveform Values With Markers 1. In the wave configuration in the Wave window, add one ormore markers, as described in Adding aMarker. For a single maker, if themain cursor and marker occupy the same location, the Value column displays the signal and bus values. No further action isrequired, For multiple markers, continue 2. Select Edit > Markers > Next Marker, or click the Nec Marker toolbar button 4 ‘The cursor advances through markers in the wave configuration, 3. Observe the values in the Value column at each marker. 4. Select Edit > Markers > Previous Marker, or click the Previous Maker toolbar button © ‘The cursor moves backward through markers in the wave configuration. 5. Observe the values in the Value column at each marker, Displaying Waveform Values at Signal Transitions ‘You can view signal values at each transition of a signal in your waveform using the Next Transition or Previous Transition commands. The starting point is the main cursor Sim User Guide UGEEO (v13.4) January 27, 2012 inx.com 5 Chapter 6: Waveform Analysis € XILINX: To Use Next and Previous Transition Commands 1. Select a signal ‘The starting point is the location of the cursor in the waveform. 2. To advance to the next transition, select View > Cursors > Next Transition or click the Next Transition icon 2. ‘Themarker advances to the net transition for the selected signal. The values for all signals at that time are displayed in the Value column. 3. Repeat step 2 as necessary. 4. To go back to the previous transition, select View > Cursors > Previous Transition or click the Previous Transition icon 1 ‘The maker moves back to the previous transition for the selected signal. The values for all signals at that time display in the Value column, 5. Repeat step 4 as necessary. ‘The cursor advances or moves back, and the signal values are updated, Measuring Time with Cursors ‘Together, themain and secondary cursors in the wave configuration measure arange of time. in addition to measuring time, the time range also forms the focal point for zooming to cursors and printing arange To Measure e With Cursors ‘A quick time measurement between one transition and another, possibly between two different signa waveforms, can be done with the following procedure Note The Snap to Transition button is on by default which will assist with placing the cursor more precisely on a signal transition because the cursor snaps to the transition ‘when in close proximity. 1. Place themouse on the first transition and press and hold the left mouse button. 2. Drag the mouse to the second transition. 3. Release the mouse button, ‘These actions place the secondary cursor on the first transition, and the main cursor on the second transition. 4. Examine the values at the bottom of the wave configuration’ + XI represents the time of the main cursor. + XQ represents the time of the secondary cursor + Delta X represents the time range between the cursors If the floating ruler is displayed, the time values of the cursors display just above the floating ruler. 5. Optional. You can switch the cursors using the Swap Cursors icon bil ‘The timerange displays until you click in the wave configuration to place anew main If you move the secondary cursor, as desaibed in Placing Cursors, the time range updates automatically. ISim User Guide 6 wwwxilinx.com Uce60 (v1.4) January 27, 2012 £ XILINX: Chapter 6: Waveform Analysis Measui 1g Time with Markers ‘When the floatingruleris displayed, you can view the time measurement between the floating ruler time base (at the selected marker), and themain cursor and markersin the waveform. To Measure Time with Markers 1. Display the floating ruler using a sdected marker as the time base. 2. Add addition markers 3. Movemarkers to desired location within the waveform, Themarker label above the floating ruler shows the time intervals between the selected marker and each of thenew markers. ‘Thetime base can be switched quickly from onemarkerto another by dicking and thus selecting, another marker. ‘You can also use a combination of cursors and markers for measuring time. To do s0, use the secondary cursor as the time base, and the floating ruler displays the time measurement of the makers and main cursor against the secondary cursor. Using Go To ‘The Go To Time function enables you to jump themain cursor to aparticular time in the wave configuration. Two Go To Time toolbar button also enables you to jump to ‘tume( (zero) and the latest simulation time. All signal and bus values are updated for the location of the main cursor. ime To Go To a User-Specified Time ‘With a wave configuration open: 1. Select Bait > Go To. The Go To Time entry box appears in the Wave window below the wave configuration, 2. Inthe Go To Tumebox, enter the time and time unit you wish to jump the cursorto, or select atime/time unit from the drop-down list if available 3. Press Enter To Go to Time 0 or Latest Time ‘With a wave configuration open: + Select the Go To Time 0 toolbar button @ to move the cursor to time 0 in the wave configuration. ‘+ Select the Go To Latest Time toolbar button © to move the cursor to the latest time in the wave configuration. Using Show Drivers ‘You can use the Show Driver command to display the driver for a change in signal, or object value. This command is used to determine the cause of avalue change, which helps determineif circuit connections are correct. ISim displays the signal, or object, and its one or more drivers in the Console panel. Sim User Guide UGEEO (v13.4) January 27, 2012 inx.com 7 Chapter 6: Waveform Analysis £ XILINX: ‘The Show Driver command is available for probing objects in the following areas © Objects pand © Wave window © Console pandl (show driver command) To Show Drivers 1. Sect an object, or signal. 2. Select Edit > Wave Objects > Show Drivers, or select Show Drivers from the right-click menu, ‘The Console lists the drivers for the object or signal. When there isno driver, amessage in the Console indicates that there is no driver. Note Running this command is the same asrunning show driver at the Console prompt, Printing Wave Configurations ‘You can print one wave configuration at a time using the setting specified during print setup. The wave configuration always prints with a white background. To Print Preview To Print 1. Select File > Print Preview 2. InthePrintPreview 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 See "To Print” 4. Select Close to lose 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, 1. Select File > Print 2. Inthe [Sim Print Setup dialog box, specify the Page Orientation, Time Range, Fit Tume Range To, and other display settings. Note Time Range is populated with the time range of the main and seconday. cursor if both are placed in the wave configuration, 3. Click OK 4. Inthe Print dialog box, select aprinter 5. Click Print ‘The wave configuration prints according to the print settings. Using Custom Colors Creating Custom Color Schemes 78 ‘You can modify the colors used in the wave configuration by creating your own, waveform color scheme, ISim User Guide wwwxilinx.com Uce60 (v1.4) January 27, 2012 £ XILINX: Chapter 6: Waveform Analysis To Create a Custom Color Scheme Sclect Edit > Preferences In theleft pane, espand ISim Sinmlator, and select Colors. In the Colors preference page click New. Enter aname for the color scheme, Click the color box and select a color for the areas you wish to change the color. Click Apply to set thenew color scheme. Click OK ‘The custom waveform scheme takes effect immediately. Changing Signal Colors ‘You can change the color for individual signals or buses to make them stand out for comparison purposes General color settings are part of the color scheme specified in the Colors Preferences page. Changing an individual signal/ous color overides the general color setting for sgnal/bus waveforms To Change a Signal Color 1. Right-click on a signa or bus 2. Select Signal Color and select a color: ‘The signal or bus waveform displays the new color selection. Note When using custom colors, all logic values including special values, such as’ and Z’, display in the same color Sim User Guide UGEEO (v13.4) January 27, 2012 inx.com 79 ISim User Guide UGsEO (v13.4) January 27, 2012 £ XILINX. Chapter 7 Saving and Opening Simulation Results Saving the Results [Sim saves the simulation results of the objects (VHDL signals, or Vailog reg or wire) being traced to the Waveform Database (w db) file (fluamte>.wcib) in the working directory. If you add objects to the Wave window and run the simulation, the design hierarchy for the complete design and the transitions for the added objects are automatically saved to the wb file ‘The wave configuration settings, which include the signal order, name style, radix and color, among others, are saved to the wave configuration ( wefg) file upon demand, Saving a Database to a .wdb File ‘When ISimis launched from the ISE® software, the wdb fileis named according to the name specified in the ISim Properties dialog box. When launched from the command line, the ~wdb switch is used to specify filename. When a simulation is run, results of the objects (VHDL signals, Verilogreg or wire) being traced are automatically saved to the wdb; no additional action is required. If another simulation is run on the same design in the same working directory as a curently running simulation, the wdb filename for thenew simulation is the name of the first simulation appended with an integer. The results of the first simulation are not ovarwnitten. For a wdb file called ‘sim.valb, subsequent invocations of ISim result in wb files isiml .wab, isin2.udb, ete, Note Thename of the database file cannot be changed once in a simulation. Saving a Wave Cont in to a WCFG File ‘The wefg stores the order and inclusion of simulation objects, their properties, and any. added wave objects, such as dividers, and markers found in the Wave window. For more information, see Wave Window Overview ‘When saving a.swefg file, select File > Save, and specify afilename for the wefg file ‘You can open the wave configuration fileto view results in the static simulator. For more information, see Opening a Static Simul tion. Relationship Between .wdb and .wefg ‘When you save the wave configuration ( wefg) file, ISim automatically adds areference in the file to the associated waveform database (wdb) file. There can be multiple wefg files for a single wdb file Sim User Guide UGEEO (v13.4) January 27, 2012 www xilinx.com at Chapter 7: Saving and Opening Simulation Results € XILINX. mulation Opening a Live Alive sumulation consists ofthe following: + awaveform database file, which contains all simulation data ‘+ awave configuration file which contains the order and settings associated with objects in the wave configuration Forinformation about saving simulation results, see Saving the Results. Opening a Waveform Database A sdb is automatically opened when a simulation is run. Formore information about running a simulation, see Step 3: Simulating the Design, Opening a Wave Configuration ‘When a simulation is run from the ISE® software, a default wave configuration is automatically opened in ISim_ You can open additional wave configurations. When ‘inning a simulation from the command prompt or using abatch saapt, aveave configuration is not opened by default when the GUIs launched, and you must open or create one ‘To open a wave configuration in the ISim GUI: 1. Select File > Open. 2. Select wefg from the file type list. 3. Select the file you wish to open. 4. Click OK ‘The wave configuration opens in the Wave window. Multiple wave configurations can be opened during one simulation session. Click the corresponding wave configuration tab to view the wave configuration. ‘To open a wave configuration from the command prompt: Since awave configuration is not open by default when you launch the GUI, you can indude the -view switch to open an esting one. Run the simulation executable with the following syntax: .wab -view .wefg where + -gui launches the ISim graphical user interface + -wab