Xilinx ISE Manual
Xilinx ISE Manual
Xilinx ISE Manual
LAB Manual
Page 1
Page 2
o o o o o o o o o o o
You can customize your output and reports to hide certain warning or info messages not applicable to your design. Tools integration Mentor Graphics Precision RTL Synthesis flow is now integrated into Project Navigator on all platforms. Cross probing between Timing Analyzer (ITA) and FPGA Editor. Integration of Schematic and Symbol Editors, RTL and Technology Viewers, and ISE Simulator within Project Navigator. Improved integration with Xilinx Platform Studio. Pushing into a flat (non-hierarchical) user-defined symbol now presents the option to create a VHDL, Verilog, or schematic definition. New Paste Special command in Schematic Editor gives more control over how nets and inputs are named in the pasted content. Design Rule Checks now detect illegal wired-OR connections. New preferences give control over the width of nets and buses when printing a schematic. Schematic Editor has added support for a Partial Bus I/O by providing the ability to take one or multiple bits of a bus out to an individual I/O port. ISE Text Editor features When the RTL Viewer cross probes to a source file, cross probing back to the schematic is enabled. Comment and Uncomment functionality is available. VHDL/UCF only have the Comment/Uncomment LINE functionality. Verilog has both Comment/Uncomment LINE and Comment/Uncomment SELECTION. Increase and Decrease Indent functionality is available from menu items and toolbar buttons. You can view/edit the preferences for the ISE Text Editor, in the typical manner. Preferences include the font used by the editor, how to treat tab characters, and whether to allow the cursor to be moved beyond the end of the line. Functionality for adding and removing breakpoints is available for debugging code while running in the ISE Simulator.
o o
o o
Synthesis
Following are the Xilinx Synthesis Technology (XST) enhancements. For more information, see the XST User Guide available from the Software Manuals collection. VHDL Language Support Support for configurations and nested configurations. Support for shared variables (dual-write block RAM inference only). Support for NULL arrays. Improved support for File Read. Support for hexadecimal values in read operations. Support for std_ulogic type (limited to values 1 and 0). Support for character and string type read functions. Verilog Language Support Support of defparams for passing attributes to Xilinx library primitives. Support for variable part select. Improved support for while loops. Macro Inference Inference of dual-write port block RAM (VHDL only). Xilinx ISE 7.1i Software Lab Manual Page 4
o o o o o o o o
o o o o o
Support for parity bits use for block RAM implementation (limited to Virtex-4 devices). Support for Block RAM initialization via signal declaration mechanism. Initialization of dual-port block RAMs in VHDL. Initialization of single and dual-port block RAMs in Verilog. Support for Block RAM/Block ROM initialization from an external text file. Finite State Machine (FSM) Processing. Support for Safe FSM implementation. Improved automatic FSM encoding selection. Introduced new speed oriented encoding method, called Speed1. Report of original and final FSM encoding. Support for Macro inference for Virtex-4 devices and its control via USE_DSP48 constraint/command line switch. More Macro Inference capabilities are listed in Chapter 1 of the XST User Guide. See the XST User Guide available from the Software Manuals collection Design Constraints New constraints controlling design processing have been added. Seven constraints have been updated with new values or capabilities. Please refer to Chapter 1 of the XST User Guide for a complete list of all the new and modified constraints. New syntax for switches supporting multiple directories. This change is related to the support of file and directory names with spaces. FPGA Flow Support for automatic inference of BUFGs on most critical internal clocks controlled by BUFFER_TYPE constraint. Improved support for Incremental Synthesis. INCREMENTAL_SYNTHESIS constraint can now be applied to blocks instantiated more than once. Improved detection and reporting of multi-source problems. The number of analyzed or failed paths and ports is now reported in Detailed Timing Report. Improved quality of results under high optimization effort for speed-oriented optimization.
Verification
Following are verification enhancements: New ISE Simulator New built-in HDL simulator, available in limited (free) and unlimited versions. Integrated VHDL/Verilog simulator with integrated wave editor for test bench creation. Behavioral/RTL simulation prior to synthesis. Timing simulation after place and route or fitting. Design Hierarchy, waveform, and console views. Source-level debugging capabilities. Command-line console features TCL interface. Generate Expected Results process generates expected design output behavior based on input stimulus. Simulator can generate Value Change Dump (VCD) file for use in XPower. Available in Base and Foundation configurations only. Simulation Performance Improvements UNISIM and SIMPRIM library optimizations to reduce simulation runtimes. CompXLib Verilog library compilation time reduction. Netgen netlisting runtime improvements.
o o o o o o o o o o
o o o
Page 5
o o o o o o o o o o
Implementation
Following are implementation enhancements: FPGA Editor Features Ability to see larger shapes that utilize multiple components (such as a carry chain and wide function) and move and place these shapes together. Ability to change background from black to white. Constraints Flexibility Bus delimiters in the UCF file do not have to match the delimiters in the source netlist. Any of the delimiter types < >, [ ], { }, or ( ) can be used to denote a signal within a bus. Improvements to Timing-Driven Packing and Placement The Place and Route Extra Effort option is available when the Map Effort Level is set to High. Values available are Normal and Continue on Impossible. The Place and Route Starting Cost Table option is available. Values can range from 1 to 100. A new Register Duplication feature can also be enabled, allowing Map to replicate flip flops to improve timing. Improved detection of designs containing paths that cannot be routed. Rather than spend a long time attempting to route a design with unroutable paths, the router quickly detects such cases. Upon detection of an unroutable path, the router exits, giving detailed information about the reason the design is unroutable. Xilinx ISE 7.1i Software Lab Manual Page 6
o o o
o o o
o o o o o o o
Device Configuration
Following are the cable software enhancements: The new CableServer executable allows for programming of devices across a network. Following are the iMPACT enhancements: The new iMPACT Project File (.ipf) provides an easy way to save and restore any configuration work. Ability to execute SVF files. Configuration Debug enhancements New Debug menu Capability to determine if a JTAG chain is broken and where the break occurs. Capability for users to read and decode the FPGA configuration status register at any time. Improvements to wizards and dialogs for both PROM-file creation and PROM programming functions. Support drag-and-drop addition of files to projects. Advanced Users will have the ability to switch off the iMPACT wizard for many functions.
o o o
Page 7
Fmax (~10% faster) Area (~4% smaller) Precision Physical New device support Additional functionality Incremental placement Bottom up physical design flow support LeonardoSpectrum Synthesis: New device support FPGA BoardLink now supports the latest Xilinx devices including Virtex-4. In addition to automating schematic symbols creation and updates, I/O Designer supports the latest device families and performs design rule checks to assist in creating FPGA pinout. ModelSim v6.0 has new enhanced user interface. The Synopsys software includes the following features and enhancements: DC FPGA The latest FPGA synthesis solution from Synopsys provides the flexibility of a Design Compiler for FPGA designs. The ASIC Prototyping Synthesis process can be customized using DC commands, supports Synopsys DesignWare, provides inferencing of Xilinx architectural resources including RAMs (BRAM and Distributed RAM). New device support. PrimeTime The ISE software (Netgen) generates netlist and SDF files with max and relative min delays, which enables min-max analysis within the PrimeTime software. New device support. HSPICE The HSPICE Signal Integrity Simulation (SIS) software supports S-parameter simulation models for the RocketPHY family of physical layer transceivers (PHYs) and the extended Virtex-II Pro family of 10 Gbps transceivers. Also includes CosmosScope, a powerful, new waveform viewer. Formality The ISE software (Netgen) generates an Equivalency Checking (EC) netlist and Formality setup (SVF) files to verify RTL to post synthesis and post synthesis to post Place and Route netlists. The Formality software supports RAM inferencing, multiplier matching, and verification for operands greater than 18 bits and new device support. LEDA The LEDA checker supports about 150 FPGA-specific rules, which cover Virtex-II, Virtex-II Pro, and Spartan-3 devices. There are 10 new rules provided in LEDA 4.1 compared to what was available in the previous version with the ISE 6.1i software. The Synplicity 8.0 software includes the following enhancements: Synplify Pro software Xilinx ISE 7.1i Software Lab Manual Page 8
o o
o o o o
o o o
o o
First feature support for System Verilog QOR improvements (Better Performance, smaller area) New device support Graphical Warning Viewer TCL and GUI Find function HTML log file Amplify Software Physical Synthesis Physical Analyst Island Timing Report (Spreadsheet view of timing information) The Product Acceleration Inc. software includes the following enhancements: Automated FPGA pinout assignment for Spartan-3, Virtex-II, Virtex-II Pro, and Virtex-4. Updated IO banking design rule checks - single ended and differential pairs for all families. Support Weighted Average Simultaneous Switching Outputs (WASSO) guidelines for all families. Added Support for local clocking and regional clocking rules for all families. Added Verilog and VHDL top level entity/module import capabilities. Added support for Import and Export of Xilinx user constraint file (UCF).
Architecture Support
FPGAs Spartan-II Spartan-IIE Spartan-3 Spartan-3E Spartan-3L Virtex Virtex-E Virtex-II Virtex-II Pro Virtex-II Pro X Virtex-4
Page 9
Page 10
The Module View shows the hierarchy of your design. You can collapse and expand the levels by clicking the plus (+) or minus (-) icons. Each source file appears next to an icon that shows its file type. The file you select determines the processes available in the Processes for Source window. You can double-click a source file to open it for editing in the Workspace. For information on the different file types, see Source File Types. From the Module View, you can also change the project properties, such as the device family to target, the top-level module type, the synthesis tool, the simulator, and the generated simulation language. For information, see Changing the Target Device and Design Flow. Note: The Sources in Project window also includes the Snapshot View and the Library View. For information on working with libraries, see Working with VHDL Libraries. For information on working with snapshots, see Working with Snapshots.
Page 11
The Process View shows the available processes in a hierarchical view. You can collapse and expand the levels by clicking the plus (+) or minus (-) icons. Processes are arranged in the order of a typical design flow: project creation, design entry, constraints management, synthesis, implementation, and programming file creation.
Processes Types
The following types of processes are available as you work on your design: Tasks When you run a task process, the ISE software runs in "batch mode," that is, the software processes your source file but does not open any additional software tools in the Workspace. Output from the processes appears in the Project Navigator Transcript window. Reports Most tasks include report sub-processes, which generate a summary or status report, for example, the Synthesis Report or Map Report. When you run a report process, the report appears in the Project Navigator Workspace. Tools Xilinx ISE 7.1i Software Lab Manual Page 12
Process Status
As you work on your design, you may make changes that require some or all of the processes to be rerun. For example, if you edit a source file, it may require that the Synthesis process and all subsequent process be rerun. Project Navigator keeps track of the changes you make and shows the status of each process with the following status icons: Up-to-date This icon shows that the process ran successfully with no errors or warnings and does not need to be rerun. If the icon is next to a report process, the report is up-to-date; however, associated tasks may have warnings or errors. If this occurs, you can read the report to determine the cause of the warnings or errors. Warnings reported This icon shows that the process ran successfully but that warnings were encountered. Errors reported This icon shows that the process ran but encountered an error. Out-of-Date This icon shows that you made design changes, which require that the process be rerun. If this icon is next to a report process, you can rerun the associated task process to create an up-to-date version of the report. No icon If there is no icon, this shows that the process was never run.
Running Processes
To run a process, you can do any of the following: Double-click the process Right-click while positioned over the process, and select Run from the popup menu, as shown in the following figure.
Page 13
Select the process, and then click the Run toolbar button:
When you run a process, Project Navigator automatically processes your design as follows: Automatically runs lower-level processes When you run a high-level process, Project Navigator runs associated lower-level processes or sub-processes. For example, if you run Implement Design for your FPGA design, all of the following sub-processes run: Translate, Map, and Place & Route. Automatically runs preceding processes When you run a process, Project Navigator runs any preceding processes that are required, thereby "pulling" your design through the design flow. For example, to pull your design through the entire flow, double-click Generate Programming File. Automatically runs related processes for out-of-date processes If you run an out-of-date process, Project Navigator runs that process and any related processes required to bring that process up to date. It does not necessarily run all preceding processes. For example if you change your UCF file, the Synthesize process remains up to date, but the Translate process becomes out of date. If you run the Map process, Project Navigator runs Translate but does not run Synthesize. Note: For more information on running processes, including additional Process menu commands, see Running Processes. Setting Process Properties Most processes have a set of properties associated with them. Properties control specific options, which correspond to command line options. When properties are available for a process, you can right-click while positioned over the process and select Properties from the popup menu, as shown in the following figure.
Page 14
When you select Properties, a Process Properties dialog box appears, with standard properties that you can set. The Process Properties dialog box differs depending on the process you select. For example, the following figure shows the Process Properties dialog box for the Synthesize - XST process.
After you become familiar with the standard properties, you can set additional, advanced properties in the Process Properties dialog box; however, setting these options is not recommended if you are just getting started with using the ISE software. When you enable the advanced properties, both standard and advanced properties appear in the Process Properties dialog box. Note: For more information on process properties, see Setting Process Properties. To set command line options using process properties, see Setting Command Line Options using Process Properties. Using the Workspace When you open a project source file, open the Language Templates, or run certain processes, such as viewing reports or logs, the corresponding file appears in the Workspace. You can open multiple files at one time. Tabs at the bottom of the Workspace show the names of the open files. Click a tab to select the file to view. You can undock a file in the Workspace to open it in a standalone window outside of the Project Navigator main window. You can dock or undock the file as needed using the following buttons: Xilinx ISE 7.1i Software Lab Manual Page 15
Page 16
Creating a Project
Project Navigator allows you to manage your FPGA and CPLD designs using an ISE project, which contains all the files related to your design. First, you must create a project and then add source files. With your project open in Project Navigator, you can view and run processes on all the files in your design. Project Navigator provides a wizard to help you create a new project, as follows.
To Create a Project
1. 2. a. b. c. Select File > New Project. In the New Project Wizard, do the following: In the Project Name field, enter a name for the project. In the Project Location field, enter the directory name or browse to the directory. In the Top-Level Module Type drop-down list, select one of the following top-level design module types: HDL Select this option if your top-level design file is a VHDL, Verilog, or ABEL (for CPLDs) file. An HDL Project can include lower-level modules of different file types, such as other HDL files, schematics, and "black boxes," such as IP cores and EDIF files. Schematic Select this option if your top-level design file is a schematic file. A schematic project can include lower-level modules of different file types, such as HDL files, other schematics, and "black boxes," such as IP cores and EDIF files. Project Navigator automatically converts any schematic files in your design to structural HDL before implementation; therefore, you must specify a synthesis tool when working with schematic projects, as described in step 5. EDIF Select this option if you converted your design to this file type, for example, using a synthesis tool. Using this file type allows you to skip the Project Navigator synthesis process and to start with the implementation processes. NGC/NGO Select this option if you converted your design to this file type, for example, using a synthesis tool. Using this file type allows you to skip the Project Navigator synthesis process and start with the implementation processes. 3. Click Next. 4. If you are creating an EDIF or NGC/NGO project, do the following in the File Selection page of the New Project Wizard. If you are creating an HDL or schematic project, skip to the next step. a. In the Input Design field, enter the name of the input design file, or browse to the file and select it. b. Select Copy Input Design to the Project Directory to copy your file to the project directory. If you do not select this option, your file is accessed from the remote location. c. In the Constraint File field, enter the name of the constraints file, or browse to the file and select it. Xilinx ISE 7.1i Software Lab Manual Page 17
What to Expect
Project Navigator creates the project file, project_name.ise, in the directory you specified. All source files related to the project appear in the Project Navigator Sources in Project window. Project Navigator manages your project based on the project properties (top-level module type, device type, synthesis tool, and language) you selected when you created the project. It organizes all the parts of your design and keeps track of the processes necessary to move the design from design entry through implementation to programming the targeted Xilinx device. Note: For information on changing project properties, see Changing the Target Device and Design Flow.
What to Do Next
You can perform any of the following: Create and add source files to your project. Add existing source files to your project. Run processes on your source files.
Page 20
To Open an Example
1. Select File > Open Example. 2. In the Open Example dialog box, select the Sample Project Name that you want to use. To help you choose an example project, the Project Description field describes each project. In addition, you can scroll to the right to see additional fields, which provide details about the project. 3. In the Destination Directory field, enter a directory name or browse to the directory. 4. Click OK.
What to Expect
The example project is placed in the directory you specified in the Destination Directory field and is automatically opened in Project Navigator. You can then run processes on the example project and save any changes. Note: If you modified an example project and want to overwrite it with the original example project, select File > Open Example, select the Sample Project Name, and specify the same Destination Directory you originally used. In the dialog box that appears, select Overwrite the existing project... and click OK.
What to Do First
Open a project in Project Navigator.
Page 21
What to Expect
After you click Finish, the New Source wizard closes. In some cases, a related tool is launched in which you can finish creating your file. After the source file is created, it appears in the Project Navigator Sources in Project window. If you selected Add to Project when creating the source file, the file is automatically added to the project.
Page 22
ABEL-HDL Module
.abl
RAM.bmm Map
ELF
.elf
Embedded Processor
.xmp
.ucf
IP (CoreGen)
.xco
Project
.ise
Schematic
.sch
State diagram
.dia
Undefined
N/A
User Document
.doc, .wri
.txt,
Verilog Module
.v
Verilog Fixture
Test.v
VHDL Library
.vhd
VHDL Module
.vhd
VHDL Package
.vhd
Design Entry
Create a Project Navigator project and specify your top-level design file as follows: 1. Create a Project Navigator project. 2. Create files and add them to your project, including a user constraints (UCF) file. 3. Add any existing files to your project. 4. Assign constraints such as timing constraints, pin assignments, and area constraints.
Functional Verification
You can verify the functionality of your design at different points in the design flow as follows: Before synthesis, run behavioral simulation (also known as RTL simulation). Run functional simulation (also known as gate-level simulation) at the following points in the design flow: After Synthesize (UNISIM library) After Translate (SIMPRIM library) After device programming, run in-circuit verification.
Page 26
Design Implementation
Implement your design as follows: 1. Implement your design, which includes the following steps: Translate Map Place and Route 2. Review reports generated by the Implement Design process, such as the Map Report or Place & Route Report, and change any of the following to improve your design: Process properties Constraints Source files 3. Synthesize and implement your design again until design requirements are met.
Timing Verification
You can verify the timing of your design at different points in the design flow as follows: Run static timing analysis at the following points in the design flow: After Map After Place & Route Run timing simulation at the following points in the design flow: After Map (for a partial timing analysis of CLB and IOB delays) After Place and Route (for full timing analysis of block and net delays)
Page 27
Note: Manually routing is not recommended unless absolutely necessary. Set multiple place and route passes for your design. 8. Modify the design as necessary, simulate, synthesize, and implement your design, as appropriate, until design requirements are met. 9. Run timing simulation to verify end functionality and timing of the design. 10. Program your Xilinx device as follows: a. Create a programming file (BIT) to program your FPGA. b. Generate a PROM, ACE, or JTAG file for debugging or to download to your device. c. Use iMPACT to program the device with a programming cable. Optionally, run in-circuit verification.
Synthesis and Verification Design Guide: See the "Using Pipelining" section in the "Coding Styles for FPGA Devices" chapter.
Page 31
HDL Overview
You can use a hardware description language (HDL), such as VHDL, Verilog, or ABEL (for CPLDs), for your top-level or lower-level design files. HDL files describe the behavior and structure of system and circuit designs. Using HDLs to design high-density devices allows you to do the following: Use a top-down approach You can use HDLs to create complex designs that require many designers to work together. After an overall plan is determined, each designer works on a separate section of the design. Run functional simulation early in the design cycle You can verify your design functionality early in the flow by simulating the HDL description. Testing your design decisions at the register transfer level (RTL) or gate level before the design is implemented allows you to make changes early in the design process. Use a synthesis engine to translate your design to gates Synthesis decreases design time by eliminating the need to define every gate. Synthesis to gates reduces the number of errors that may occur during a manual translation of the hardware description to a schematic design. Also, the synthesis tool can apply automation, such as machine encoding styles or automatic I/O insertion during optimization, resulting in greater efficiency. Retarget your code to different architectures You can use the same HDL design for new architectures with a minimum of recoding. This works especially well if you inferred, rather than instantiated, components. For details, see Instantiation and Inference. Additional details on the advantages of using HDLs are available in the Synthesis and Verification Design Guide. See the following chapters to help you with your design: "Introduction," which includes an overview of HDLs. "Understanding High-Density Design Flow," which discusses high-density designing, designing with hierarchy, and design size versus performance. Note: You must understand how to properly create hierarchy in your HDL file, as opposed to creating a "flat" design. "General HDL Coding Styles," which discusses general coding styles. "Coding Styles for FPGA Devices," which discusses architecture-specific coding styles. Review these chapters and consult any of the many HDL textbooks available. In addition, you can enroll in any of the Xilinx training classes available from the Xilinx website. Click Education to view the available classes and to sign up.
Page 32
Schematic Overview
Using schematics for your top-level or lower-level design files allows you to have a visual representation of your design. You can use schematics for your top-level design, your lower-level design files, or both, as follows: Top-level schematic You can use a schematic as your top-level design and create the lower-level modules using any of the following source types: HDL files, state diagrams, CORE Generator cores, Architecture Wizard IP, or schematic files. To instantiate a lower-level module in your top-level design, you must create a schematic symbol from the lower-level module, and instantiate the schematic symbol. For more information, see Creating a Top-Level Schematic. Note: You do not need to create schematic symbols for CORE Generator cores or for Xilinx Unified Library symbols. The CORE Generator software automatically generates schematic symbols, and library symbols are predefined. Lower-level schematic You can use schematics to define the lower-level modules of your design. If the top-level design file is a schematic, you must create a schematic symbol from the lower-level schematic, and then instantiate the symbol in the top-level schematic. If the top-level design file is an HDL file, you must create an HDL instantiation template from the schematic, and then instantiate the template in the top-level HDL file. For more information, see Creating a Lower-Level Schematic. Entire design composed of schematics You can create your entire design, including top-level and lower-level modules, using schematics. The design can be either flat or hierarchical. You must create schematic symbols from the lowerlevel schematics, and then instantiate them in the top-level schematic design. For more information, see Creating a Top-Level Schematic and Creating a Lower-Level Schematic. All schematics are ultimately converted to either VHDL or Verilog structural netlists before being passed on to your synthesis tool during the Synthesize process. Note: For more information on working with schematics in Project Navigator, see the Schematic and Symbol Editors Help. For information on Xilinx Unified Library symbols, see the Components Overview and the Libraries Guides available from the ISE Software Manuals collection. For information on cores, see the Intellectual Property and Cores Overview. Schematic Design Methods When using a schematic as your top-level design, use either of the following methods to describe the lower-level modules.
Page 33
Schematic The schematic contains I/O markers that correspond to the pins in the block symbol you created. Build the schematic by adding symbols as described in Adding a Symbol Instance. You can use Xilinx Unified Library symbols or symbols that you create. VHDL or Verilog The template contains the HDL port descriptions that correspond to the pins in the block symbol you created. You can then add the behavior of the module. The ISE Language Templates provide a convenient method for you to insert pre-built language and functional code samples into your HDL file. For details, see Working with Language Templates. Note: The next time you use the Push into Symbol command, the HDL or schematic file opens in the Project Navigator Workspace. 7. Complete your top-level schematic, starting with step 2 in Creating a Top-Level Schematic.
Page 34
Simulation Overview
During HDL simulation, the simulator software verifies the functionality and timing of your design or portion of your design. The simulator interprets VHDL or Verilog code into circuit functionality and displays logical results of the described HDL to determine correct circuit operation. Simulation allows you to create and verify complex functions in a relatively small amount of time. Simulation takes place at several points in the design flow. It is one of the first steps after design entry and one of the last steps after implementation, as part of verifying the end functionality and performance of the design. Simulation is an iterative process, which may require repeating until both design functionality and timing is met. For a typical design, simulation comprises the following high-level steps: 1. Compilation of the simulation libraries 2. Creation of the design and test bench 3. Functional simulation 4. Implementation of the design and creation of the timing simulation netlist 5. Timing simulation Note: See the Synthesis and Verification Design Guide for detailed information on Xilinx simulation capabilities. Xilinx ISE 7.1i Software Lab Manual Page 36
Simulation Libraries
Most designs are built with generic code, so device-specific components are not necessary. However, in certain cases, it may be required or beneficial to use device-specific components in the code to achieve the desired end circuit implementation and results. When you instantiate a component in your design, the simulator must reference a library that describes the functionality of the component to ensure proper simulation. Xilinx provides the following simulation libraries for simulating primitives and cores: UNISIM library for functional simulation of Xilinx primitives XilinxCoreLib library for functional simulation of Xilinx cores SIMPRIM library for timing simulation of Xilinx primitives SmartModel simulation library for both functional and timing simulation of Xilinx SmartModel-based primitives Note: For details on device primitives, see the Libraries Guides, available from the ISE Software Manuals collection. For details on cores, see the CORE Generator Help. For additional information on simulation libraries, including library specification and compilation, see the Synthesis and Verification Design Guide.
UNISIM Library
This library is used during functional simulation and contains descriptions for all the device primitives, or lowest-level building blocks. You must specify the UNISIM library anytime you include a device primitive listed in the Libraries Guides in your source code. Specify this library as follows: VHDL Add the following library declaration to the top of your HDL file: library UNISIM; use UNISIM.Vcomponents.all; Using this declaration, the simulator references the functional models for all device primitives. In addition to this declaration, you must compile the library and map the library to the simulator. This is covered in the "Simulation Library Compilation" section below. Verilog When you invoke the simulator from within Project Navigator, the simulator script automatically references the UNISIMS_VER library. In addition, you must compile the library and map the library to the simulator. This is covered in the "Simulation Library Compilation" section below. If you are running the simulator outside of Project Navigator, the UNISIMS_VER library must be referenced to the simulator. The method used to reference this library depends on the simulator. Please refer to the documentation for your simulator.
Page 37
SIMPRIM Library
This library is used for structural simulation netlists produced after implementation, including timing simulation. This library is specified as follows: VHDL The library declaration is automatically written by the netlist. In addition, you must compile the library and map the library to the simulator. This is covered in the "Simulation Library Compilation" section below. Verilog When you invoke the simulator from within Project Navigator, the simulator script automatically references the SIMRPRIMS_VER library. In addition, you must compile the library and map the library to the simulator. This is covered in the "Simulation Library Compilation" section below. If you are running the simulator outside of the Project Navigator environment, the SIMRPRIMS_VER library must be referenced to the simulator. The method used to reference this library depends on the simulator. Please refer to the documentation for your simulator.
Page 38
Test Benches
To simulate your design, you need both the design under test (DUT) or unit under test (UUT) and the stimulus provided by the test bench. A test bench is HDL code that allows you to provide a documented, repeatable set of stimuli that is portable across different simulators. A test bench can be as simple as a file with clock and input data or a more complicated file that includes error checking, file input and output, and conditional testing. Note: Verilog designers sometimes refer to a Verilog test fixture. "Test bench" and "test fixture" are used synonymously throughout this documentation. You can create the test bench using either of the following methods: Text editor This is the recommended method for verifying complex designs. It allows you to use all the features available in the HDL language and gives you flexibility in verifying the design. Although this method may be more challenging in that you must create the code, the advantage is that it may produce more precise and accurate results than using the Test Bench Waveform Editor. To assist in creating the test bench, you can create a template that lays out the initial framework, including the instantiation of the UUT and the initializing stimulus for your design. Create this template as described in Creating a Source File, selecting VHDL Test Bench or Verilog Test Fixture as your source type.
Page 39
Page 40
Simulation Environments
Every simulator operates differently, but simulating a design comprises the following general steps: 1. Compilation The simulator converts the HDL code from the design or the test bench into an intermediate form that it can understand. During this step, code parsing and syntax checking also take place. If a syntax or coding problem is found, it is flagged so you can correct it before proceeding. 2. Elaboration The simulator merges the pieces of compiled code to form a cohesive simulation platform. The simulator references simulation libraries and uses them as a part of the overall simulation model. If any pieces of the design are missing, possibly caused by an improperly referenced library or connection issues between the pieces of the design, an error is reported. 3. Execution Execution is the most significant step in simulation. The simulator processes the elaborated design to derive the design functionality. During execution, "simulation time" passes in which the simulator updates each node in the simulation, including the design outputs, to the proper values at the proper time based on the input stimulus to the design. During this stage, you can view simulation values, messages, and simulation waveforms. Note: For detailed information on running the Xilinx ISE Simulator, see the ISE Simulator Help. For information on how to operate another simulator, refer to the documentation for your simulator.
Functional Simulation
After you compile the simulation libraries and create the test bench and design code, you can perform functional simulation on the design. Functional simulation is an iterative process, which may require multiple simulations to achieve the desired end functionality of the design. Therefore, it is important to set up the proper infrastructure for this type of simulation. Spending time up front may save time in back end design debugging. Following are general recommendations: Spend time up front to create a good test bench. Creating a test bench that you can use for both functional and timing simulation can save time. For details, see Test Benches. Ensure that your libraries are properly compiled and mapped. If your design includes UNISIM components or Xilinx CORE Generator cores, make sure that your libraries are properly compiled and mapped to the simulator. If you are using the ISE Simulator or the ModelSim Xilinx Edition simulator, this is automatically done for you. If you are using a SmartModel component (for example, PPC405 or Gigabit Transceiver), ensure that the Xilinx ISE 7.1i Software Lab Manual Page 41
Page 42
Timing Simulation
After you implement the design using the ISE software, you can perform timing simulation on the design. Timing simulation allows you to check that the implemented design meets all timing requirements and behaves as you expect in the device. Performing a thorough timing simulation ensures that the finished design is free of defects that may be missed otherwise. Following are a few examples of defects that timing simulation can help you find: Post-synthesis and implementation functionality changes Dual-port RAM collisions Missing component generics for VHDL Missing module defparams for Verilog Missing or improperly applied timing constraints Operation of asynchronous paths You can perform timing simulation in conjunction with in-system testing to help you further understand how the device is operating. For more information, see the ChipScope Pro Debugging Overview. Note: See the Synthesis and Verification Design Guide for detailed information on Xilinx timing simulation.
Page 44
Page 45
Page 46
Low Level Optimization During low level optimization, XST transforms inferred macros and general glue logic into a technology-specific implementation. The flows for FPGAs and CPLDs differ significantly at this stage as follows: Note: For a list of supported FPGAs and CPLDs, see Architecture Support. Xilinx ISE 7.1i Software Lab Manual Page 47
Page 48
Page 49
Page 50
Page 51
Read Cores
If your design contains cores, apply the READ_CORES constraint. This provides precise information about resources that are already consumed. To apply this constraint, enable the Read Cores Synthesis Option. Note: XST does not optimize cores. It uses them for area and speed estimation and optimization. Max Fanout The value set for the MAX_FANOUT synthesis constraint has a direct influence on logic replication, regardless of whether the design is optimized for speed or for area. For example, if you set the value to 100 and the actual fanout of a net is more than 100, XST replicates logic to meet the maximum fanout requirements. To apply this constraint, set the Max Fanout Xilinx Specific Option. Register Balancing Limit the REGISTER_BALANCING constraint to a set of clocks or set of blocks where the register balancing must be performed. Register balancing improves design speed but may lead to an increased number of registers. To use this option, you must set the Register Balancing Xilinx Specific Option to Yes, Forward, or Backward. By default, it is set to No.
Speed Strategies
Many of the strategies covered in this section can be controlled through options in the Synthesis Process Properties dialog box. Note: For detailed information on constraints, see the Constraints Guide.
Design Considerations
Before attempting to improve your design performance, do the following: Flatten the hierarchy of your design for better results. This is the default mode, which allows XST to perform efficient optimization across module boundaries. If needed, you can control the KEEP_HIERARCHY constraint using the Keep Hierarchy Synthesis Option. Run XST speed optimization without timing constraints on the initial run. This is the default mode, which allows you to see the performance that can be achieved with no constraints. In this case, XST attempts to optimize the most critical or slowest clock or critical region of the design. If optimization is achieved, XST selects another critical clock or region to improve. However, the clock chosen by XST as most critical may not be the same clock that you consider the most critical. Therefore, on subsequent synthesis runs, specify timing constraints for synthesis to guide XST during the optimization process. Ensure that XST reads in your black box cores (EDIF or NGC files) during the optimization process. This is the default mode, which allows XST to use timing information from the cores to better optimize the synthesizable part of the design. If needed, you can control the READ_CORES constraint using the Read Cores Synthesis Option. Note: XST does not modify or optimize cores. It uses them for area and speed estimation and optimization.
Page 53
Page 56
Translate
The Translate process merges all of the input netlists and design constraints and outputs a Xilinx native generic database (NGD) file, which describes the logical design reduced to Xilinx primitives. See the following table for details. Translate Process Command line tool Input files Output files Process properties Tools available after running process
NGDBuild EDIF, SEDIF, EDN, EDF, NGC, UCF, NCF, URF, NMC, BMM BLD (report), NGD Translate Properties Constraints Editor, Floorplanner, PACE Note Each of these tools modifies the UCF file. When you rerun Translate with the updated UCF, the NGD file is updated.
Map
The Map process maps the logic defined by an NGD file into FPGA elements, such as CLBs and IOBs. The output design is a native circuit description (NCD) file that physically represents the design mapped to the components in the Xilinx FPGA. See the following table for details. Xilinx ISE 7.1i Software Lab Manual Page 57
MAP NGD, NMC, NCD, NGM Note The NCD and NGM files are for guiding. NCD, PCF, NGM, MRP (report) Map Properties Floorplanner, FPGA Editor, Timing Analyzer
PAR NCD, PCF Note In addition to the NCD file from MAP, PAR also accepts an NCD file for guiding. NCD, PAR (report), PAD, CSV, TXT, GRF, DLY Place & Route Properties Floorplanner, FPGA Editor, Timing Analyzer, XPower
BitGen NCD, PCF, NKY BGN, BIN, BIT, DRC, ISC, LL, MSD, MSK, NKY, ISC, RBA, RBB, RBD, RBT General Options, Configuration Options, Startup Options, Readback Options, Encryption Options iMPACT
Page 58
Page 59
Use this combination when critical paths are fully placed, but some placement requires Medium effort to be placed properly. Use this combination when critical paths are fully placed but some placement requires Medium effort to be placed properly, and routing requires Medium or High effort to achieve timing objectives. Use this combination if the design is highly utilized or if timing constraints are difficult to meet. Having a higher quality placement can dramatically reduce the time needed to route and meet timing, resulting in an overall runtime reduction. Using Multi-Pass Place and Route (MPPR) with this combination enables the placer and router to find the best placement without wasting too much runtime. After the best placement is found, you can set the Router Effort Level to High (-rl high) to help meet timing. To maintain the existing placement, set the Place and Route Mode to Route Only or use the par -p option. Use this combination when the design has aggressive timing, and placement and routing requires High effort levels to meet timing objectives.
High
High
High
high
high
Page 61
Turns Engine
The Turns Engine allows you to try different place and route strategies at the same time, using a network of computers. See the "Turns Engine (PAR Multi-Tasking Option)" section in the"PAR" chapter of the Development System Reference Guide. Note: This option is not supported for Windows operating systems.
Page 62
Department of Electronics Engineering 2011 Performance-Related Map and Place and Route Properties
Following are the Project Navigator properties and corresponding command line options you can set to control the performance of the Map and Place and Route processes. Note: Some of these properties are only available when you set the Property display level to Advanced.
Map to Functions
Input-k {4|5|6|7|8}
Timing Constraints
Use timing constraints as follows: Do not overconstrain the design to meet timing objectives. For example, do not place a 120 megahertz (MHz) constraint on a 100 MHz clock. Overconstraining the design makes it more difficult for the placer and router to achieve timing closure. In some cases, Xilinx ISE 7.1i Software Lab Manual Page 64
Additional Recommendations
Following are additional recommendations to reduce runtime and improve design performance: Manually place RAMB16 and MULT18X18 design elements to reduce runtime. For details, see the "LOC" section in the "Constraints" chapter of the Constraints Guide. Limit the use of AREA_GROUP constraints. Too many AREA_GROUP constraints, especially overlapping ones, cause long runtimes. Consider using the hierarchical design flows to reduce runtimes when limited changes are made to the design. For details, see Hierarchical Flows Strategies for FPGAs. Ensure that your computer has twice the amount of RAM listed as used in the Place & Route (PAR) report, up to the maximum of 4 gigabytes (GB). This reduces the possibility of using disk swap space. Use the PlanAhead software to reduce runtime and achieve faster performance.
Page 65
Configuration Overview
After generating a programming file using the Generate Programming File process, you configure your device. Configuration comprises the following steps: Download of the programming file from a host computer to a target board Generation of optional configuration files, which you can use in a configuration device, such as a PROM, or in other software programs The following sections describe how to configure your device and how to generate optional configuration files. Note: Default property values are used for these processes, unless you modify them.
Configuring a Device
To configure a device correctly, you must know which cable configuration mode you want to use. For FPGAs, you can use Boundary Scan, Slave Serial, or SelectMAP. For CPLDs, you can only use Boundary Scan, also known as JTAG. The most commonly used mode is Boundary Scan. When using this mode, you must connect the cable leads to the following pins: TDO, TDI, TCK, TMS, VCC, and GND. For more information on this type of configuration, see the XAPP501 Application Note and the Data Sheets for the device you are targeting. You can program FPGAs and CPLDs in-system, directly from a host-computer using a Xilinx download cable. To configure a device, do the following: 1. Connect the cable to an appropriate port on the host computer and to the correct pins on the target board. 2. Expand Generate Programming File. 3. Double-click Configure Device. This opens iMPACT, which includes wizards to guide you through the configuration download process, including specifying your configuration mode and configuring your device. Note: For details on configuring a device, see Device Configuration in the iMPACT Help.
PROM Files
Xilinx FPGAs are SRAM-based and must be programmed every time power is cycled. The most common method of programming Xilinx FPGAs is by using Xilinx PROMs connected to a chain of FPGAs. You must program these PROMs using PROM files created from the FPGA chain bitstreams. PROM files include information on the FPGA chain length and contain bitstreams that are reformatted for use with PROM programmers. Several PROM file formats are available: MCS, EXO, TEK, HEX, UFP, BIN, and ISC. iMPACT can directly program Xilinx PROM devices using MCS, EXO, and ISC file formats. If you are using a third-party programmer, check the documentation that came with the tool to see if a particular format is required. When you create a PROM file using iMPACT, you must select one of the following types of PROM files to target: Xilinx PROM iMPACT generates a PROM file you can use to program a Xilinx PROM or chain of PROMs. For more information, see Xilinx and Platform Flash PROM Settings. Generic Parallel PROM iMPACT generates a PROM file that you can use to program parallel PROMs made by third-party companies. These PROMs are typically byte-wide, directly-accessible memory devices that require addresses for certain pins so that specific locations can be read. iMPACT allows you to generate PROM files for parallel PROMs; it does not support programming of parallel PROMs. For more information, see Parallel PROM Settings. Note: For more information on these file types, see PROM Formatter Settings in the iMPACT Help. For information on using PROM configuration, see the XAPP501 Application Note.
Page 67
Page 68
Configuration Troubleshooting
Following are common configuration issues and suggestions for where to look for more information. Issue Configuration fails. What to Do Use the Configuration Problem Solver to determine why configuration failed. Configuration succeeds, but the device does notUse the Configuration Problem Solver to appear to be active. determine why the device is not active. Error message: "Connecting to cable (ParallelSee Answer Record 15742. Port - LPT1)...Cable connection failed." Error message: 585 This error appears when you are trying to program or initialize a chain, and your cable is not properly connected. Do the following: Make sure that the cable, scan chain, and power connections are intact, that the specified scan chain configuration matches the actual hardware, and that the power supply is adequate and delivering the correct voltage. Make sure VCC or GND cable leads are connected to sufficient voltage. If your cable is externally powered, make sure the power supply is connected and operating. Other configuration issues Search the Answer Browser, or see Contacting Xilinx Technical Support.
Page 69