Radiant 2023 2 User Guide
Radiant 2023 2 User Guide
2
User Guide
Trademarks
All Lattice trademarks are as listed at www.latticesemi.com/legal. Synopsys and
Synplify Pro are trademarks of Synopsys, Inc. Aldec and Active-HDL are trademarks
of Aldec, Inc. Modelsim and Questa are trademarks or registered trademarks of
Siemens Industry Software Inc. or its subsidiaries in the United States or other
countries. All other trademarks are the property of their respective owners.
Disclaimers
NO WARRANTIES: THE INFORMATION PROVIDED IN THIS DOCUMENT IS “AS IS”
WITHOUT ANY EXPRESS OR IMPLIED WARRANTY OF ANY KIND INCLUDING
WARRANTIES OF ACCURACY, COMPLETENESS, MERCHANTABILITY,
NONINFRINGEMENT OF INTELLECTUAL PROPERTY, OR FITNESS FOR ANY
PARTICULAR PURPOSE. IN NO EVENT WILL LATTICE OR ITS SUPPLIERS BE
LIABLE FOR ANY DAMAGES WHATSOEVER (WHETHER DIRECT, INDIRECT,
SPECIAL, INCIDENTAL, OR CONSEQUENTIAL, INCLUDING, WITHOUT
LIMITATION, DAMAGES FOR LOSS OF PROFITS, BUSINESS INTERRUPTION, OR
LOSS OF INFORMATION) ARISING OUT OF THE USE OF OR INABILITY TO USE
THE INFORMATION PROVIDED IN THIS DOCUMENT, EVEN IF LATTICE HAS
BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. BECAUSE SOME
JURISDICTIONS PROHIBIT THE EXCLUSION OR LIMITATION OF CERTAIN
LIABILITY, SOME OF THE ABOVE LIMITATIONS MAY NOT APPLY TO YOU.
Bold Items in the user interface that you select or click. Text that you type
into the user interface.
Courier Code examples. Messages, reports, and prompts from the software.
Chapter 1 Introduction 9
Radiant Software Overview 9
User Guide Organization 10
IP Catalog 34
Process 35
Task Detail View 36
Hierarchy 36
Reports 37
Tool Views 38
Tcl Console 39
Output 39
Message 40
Find Results 40
Common Tasks 41
Controlling Views 41
Cross-Probing 42
IP Packager 162
SEI Editor 163
Common Tasks 164
Controlling Tool Views 164
Using Zoom Controls 166
Displaying Tool Tips 167
Setting Display Options 167
Chapter 1
Introduction
The Radiant software has many of the same features as Lattice Diamond
software, and adds new features, such as:
Constraints support utilizing industry standard SDC format.
Efficient, easy-to-use integrated graphical user interface (GUI) with a new
look-and-feel that gives users more efficient access to popular tools.
Unified timing analysis engine with enhanced timing reports for faster
design timing closure.
The chapter “Working with Projects” on page 46 shows how to set up project
implementations and strategies.
The chapter “Working with Tools and Views” on page 116 describes the many
tool views available.
Chapter 2
Getting Started
This chapter explains how to run the Radiant software and open or create a
project. For more information about project fundamentals, see the chapters
“Design Environment Fundamentals” on page 17 and “Working with Projects”
on page 46.
Prerequisites
To run the Radiant software, select Radiant Software from the installation
location. This opens the default Start Page, shown in Figure 1.
Note
Do not place more than one project in the same directory.
File names for Radiant software projects and project source files must
start with a letter (A-Z, a-z) and must contain only alphanumeric
characters (A-Z, a-z, 0-9) and underscores (_). Spaces are allowed.
To specify a location for your project, click Browse. In the Project
Location dialog box, you can specify a desired location.
Under Implementation, specify the name for the first version of the
project. You can have more than one version, or “implementation,” of
the project to experiment with. For more information on
implementations, refer to “Implementations” on page 48.
To create a sub-directory with the same name as your location
directory, click Create Subdirectory. This will allow you to keep your
project implementations separate. If this box is left unchecked, no sub-
directory will be created in the project directory.
When you finish, click Next.
4. In the Add Source dialog box, do the following if you have an existing
source file that you want to add to the project. If there are no existing
source files, click Next.
a. Click Add Source. You can import HDL files at this time. In the Import
File dialog box, browse for the source file you want to add, select it,
and click Open.
The source file is then displayed in the Source files field.
b. Repeat the above to add more files.
c. To copy the added source files to the implementation directory, select
Copy source to implementation directory. If you prefer to reference
these files, clear this option.
d. To create empty Lattice Design Constraint (.ldc) file and Physical
Constraint File (.pdc) files that can be edited at a later time, select
Create empty constraint files. Refer to the chapter
“Implementations” on page 48 for more information about constraint
files.
e. When you finish, click Next.
5. In the Select Device dialog box, shown in Figure 4, select a device family
and a specific device within that family. Then choose the options you want
for that device. When you finish, click Next.
6. In the Select Synthesis Tool dialog box, select the synthesis tool that you
want to use. This choice can be changed at any time. When you finish,
click Next.
7. In the Project Information dialog box, make sure the project settings are
correct.
Note
If you want to change some of the settings, click Back to modify them in the
previous dialog boxes of the New Project Wizard.
Click Finish. The newly created project, shown in Figure 5, is now created
and open.
Select the File List tab under the left pane, to view the Test project file list.
You can use the Options dialog box to increase the number of projects that
are shown in the Recent Projects list and to automatically load the previous
project at startup. Choose Tools > Options to open the dialog box. To
increase the number of recent projects listed, click the General tab and enter
a number for “Maximum items shown in Recent Project List” (up to 32). To
automatically open the previous project during startup, click the Startup tab
and then choose Open Previous Project from the “At Lattice Radiant
Software startup” menu.
The file browser applies an *.ldf file filter to help you find Lattice Diamond
project files. The Lattice Diamond project is converted to a Radiant project.
For more information about importing Lattice Diamond projects into the
Radiant software, refer to the Lattice Radiant Software Guide for Diamond
Users.
Next Steps
After you have a project opened in the Radiant software, you can go
sequentially through the rest of this user guide to learn how to work with the
entire design environment, or you can go directly to any topic of interest.
The chapters “Design Environment Fundamentals” on page 17 and
“Radiant Software Design Flow” on page 84 provide explanations of key
concepts.
“User Interface Operation” on page 23 provides descriptions of the
functions and controls that are available in the Radiant software
environment.
The chapters “Working with Projects” on page 46 and “Working with Tools
and Views” on page 116 explain how to run processes and use the design
tools.
Reference Guides > Tcl Command Reference Guide in the Radiant
Help provides an introduction to the scripting capabilities available, plus
command-line shell examples.
“Advanced Topics” on page 349 provides further details about
environment options, shared memory, and Tcl scripting.
Chapter 3
Design Environment
Fundamentals
Overview
Understanding some of the fundamental concepts behind the Radiant
software framework technology will increase your proficiency with the tool and
allow you to quickly come up to speed on its use.
The process flow is managed at a system level with run management controls
and reporting. Context-sensitive views ensure that you only see the data that
is available for the current state in the process flow.
Note
By loading the Radiant software multiple times, you can run different Radiant projects
simultaneously. However, you must not load the same project in more than one
Radiant software instance, as software conflicts can occur.
The Radiant software can also be run remotely. Refer to the Lattice Radiant Software
Installation Guide for Windows or Lattice Radiant Software Installation Guide for Linux
for more information.
Project-Based Environment
A project in the Radiant software consists of the following file types:
HDL source files
Constraint files
Reveal debug files
Script files for simulation
Analysis files for power calculation and timing analysis
Programming files
The Radiant software also includes settings for the targeted device and the
different tools. The project data is organized into implementations, which
define the project structural elements, and strategies, which are collections of
tool settings.
Each item that is displayed in bold means that it has been selected as the
active item for an implementation. An implementation displayed in bold
means that it has been selected as the currently active implementation for the
project. Your project must have one active implementation, and the
implementation must have one active strategy. Optional items, such as
Reveal hardware debugger files, can be set as active or inactive.
Similarly, if you want to try different implementation tool options, you can
create a new strategy with the new option values.
You manage these multiple implementations and strategies for your project by
setting them as active. There can only be a single active implementation with
its one active strategy at a time.
Process Flow
A process is a specific task in the overall processing of a source or project.
Typical processing tasks include synthesizing, mapping, placing, and routing.
You can view the available processes for a design in the Process Toolbar.
Click the Task Detail View to see detailed information of the processes.
Process failed
Shared Memory
The Radiant software uses a shared memory architecture. All tool and data
views look at the same design data at any point in time. This means that when
you change a data element in one view of your design, all other views will see
the change, whether they are active or not.
When project data has been changed but not yet saved, an asterisk (*) is
displayed in the title tab of the view.
Notice that the asterisks indicating changed data will appear in all views
referencing the changed data.
For example, Figure 11 shows the Process flow before Synthesis. Therefore,
Spreadsheet View shows no IO Type or PULLMODE.
After Synthesis has been completed, Spreadsheet View displays IO Type and
PULLMODE assignments, as shown in Figure 12.
When you see the “Loading Data” message displayed in Figure 13, it means
that a process has been completed and that the shared memory is being
updated with new data.
All tool views are dynamically updated when new data becomes available.
This means that when you rerun an earlier process while a view is open and
displaying data, the view will remain open but dimmed because its data is no
longer available.
Chapter 4
This chapter describes the user interface, controls, and basic operation of the
Radiant software. Each major element of the interface is explained. The last
section in the chapter describes common user interface tasks.
Start Page
The Start Page contains three major sections, as shown in Figure 14.
Project: This section allows you to create a new project; open an existing
Project, and open an example.
Information Center: This section has links to Getting Started, Tutorials,
User Guides, and Support Center.
Recent Project List: Provides a quick way to load a recent project you’ve
been working on.
The Start Page appears in the View area by default when the Radiant
software is first launched, and can be opened from the View tab on the menu.
The Start Page can be closed, opened, detached, and attached using the
Attach button. See “Basic UI Controls” on page 27.
The Process Toolbar lists all the processes available, such as Synthesize
Design, Map Design, Place & Route Design, and Export Files. A process is a
specific task in the overall processing of a source or project. You can view the
available processes for a design in the Process Toolbar. Click Task Detail
View to see detailed information of the processes available.
Log messages are displayed in the Output frame of the Radiant software
main window.
Reports View
Log Messages
File List
Hierarchy View
Tabs at the bottom of the File List area allow you to select between the
following views:
File List – shows the files in the project organized by implementations and
strategies. This is not a hierarchical listing of the design.
Source Template – provides templates for creating VHDL, Verilog, and
Constraint files.
IP Catalog – lists available modules/intellectual properties (IP).
Underneath the File List is the Hierarchy View area. It allows you to view the
hierarchical design representation. Hierarchy view shares the left pane with
File List view.
Tool View
Multiple tools can be displayed at the same time. The tool tabs include
controls for grouping the tool views as well as integrating all tool views back
into the main window.
Each tool view is specific to its tool and can contain additional toolbars and
multiple panes or windows controlled by additional tabs. The chapter
“Working with Tools and Views” on page 116 provides more details about
each tool and view.
Tabs at the bottom of this area allow you to select between Tcl Console,
Output, and Message. Tool output is automatically displayed in the Output
tab, and Errors and Warnings in the Message tab.
Basic UI Controls
The Radiant software environment is based on modern industry standard
user interface concepts. The menus, toolbars, and mouse pointer all behave
in familiar ways. You can resize any of the window panes, drag and drop
elements, right-click a design element to see available actions, and hold the
mouse pointer over an object to view the tool tip. Window panes can also be
detached from the main window and operated as independent windows.
File List
The File List is a project view that shows the files in the project, including
implementations and strategies. It is not a hierarchical listing of the design,
but rather a list of all the design source, configuration and control files that
make up the project.
At the top of the File List is the project name. Directly below the project name
is the target device, followed by the strategies, and then the implementations.
There must be one active implementation, and it must have one active
strategy. Active elements are indicated in bold.
You can right-click any file or item in the File List to access a pop-up menu of
currently available actions for that item. The pop-up menu contents vary,
depending on the type of item selected.
The File List view can be hidden by clicking the small arrow in right border:
“Click to show/hide side panel.”
For this strategy, the files under implementation can be committed to the
revision control system. You can select files to submit to the system under
each implementation, which mainly includes intermediate and analysis
files.
Use a source directory to place all source and design files for every
implementation. Under the source folder, each implementation has its own
file directory (e.g. impl_1, impl_2).
Note:
Intermedia files might be re-generated if you rerun the flow.
You can get the latest code from the radiant version server and develop in
your own environment and working directory. Later on, you can submit the
modified code or new design to the radiant version server as needed.
You may have your code changes and modify the same source file or design.
For example, if you submit a file and another user updates it, you will get an
error. At this time, you need to update the latest code locally from the server,
integrate it with your modifications, and submit it again. This is the
collaborative operation of multiple users for the revision control system.
If you add a new a.v file in the design, and submit this file and the Radiant
project file to the revision control server, another user can do the following:
Get the latest code from the server
Source Template
The Source Template is a project view that provides templates for creating
VHDL, Verilog, and constraint files. Templates increase the speed and
accuracy of design entry. You can drag and drop a template directly to the
source file. You can also create your own templates.
To access templates, choose View > Show Views > Source Template, or
click icon in the toolbar, or click on the Source Template tab in the bottom-
left pane, to locate and access the following templates:
Verilog, including common and Parameterized Module Instantiation (PMI),
Primitives, Attributes, Encryption, and User Templates
VHDL, including common, PMI, Primitives, Attributes, Encryption, and
User Templates
Constraints for LSE, including Timing and Physical constraints and User
Templates
Note
For more information on PMI, refer to the Radiant Software Help. See User Guides >
Entering the Design > Designing with Soft IP, Modules, and PMI > PMI or IP
Catalog?
You can simply drag any template and drop it into your source file.
IP Catalog
IP Catalog enables you to customize a collection of functional blocks from
Lattice Semiconductor. Through the IP Catalog, you can access two types of
functional blocks, Modules and IP.
To access IP catalog, choose View > Show Views > IP Catalog, or click
icon in the toolbar, or click on the IP Catalog tab in the bottom-left pane.
Process
A process is a specific task in the overall processing of a source or project.
Typical processing tasks include synthesizing, mapping, placing, and routing.
You can view the available processes for a design in the Process Toolbar.
Process failed
For more detail of different designs and Export Files available, see “Process
Flow” on page 19.
The default design flow processes are marked by check marks. To enable the
remaining tasks, either check-mark the specific task and rerun the process
step, or double-click the task’s name. You can also right-click on the task to
show the context menu.
Once the process has finished, the process status icon next to the task
replaces the gray dot.
Hierarchy
The Hierarchy view is a project view that displays the design hierarchy and is
displayed by default. The hierarchical view is available when File List tab is
selected.
If you would prefer that it not open by default, simply close Hierarchy View.
The next time you launch the Radiant software, the Hierarchy View will not be
opened. You can open it manually by selecting it from the View > Show View
menu.
Right-click any of the objects in the Hierarchy View to see the available
actions.
Reports
The Reports View provides a centralized reporting mechanism in the Tools
view area. The Reports View is automatically displayed and updated when
processes are run. It provides a separate tab for the current implementation,
enabling you to compare results quickly.
The right pane displays the report for the selected step. You can also click the
icon in the toolbar.
The Reports pane on the right shows the detail of the project summary and
resource usage.
The Report View can be selected, closed, opened, detached, and attached
with the Attach button. See “Basic UI Controls” on page 27.
Tool Views
The Tool view area of the UI displays the tools that are currently active. Each
tool that you have opened from the toolbar or the Tools menu is displayed.
The Reports and Start page, which can be opened from the toolbar or the
Windows menu, are also displayed. When multiple tools are active, the
display can be controlled with the tab group functions in the Window menu.
See “Common Tasks” on page 41 for more information on tab group
functions.
Each tool view is specific to its tool and can contain additional toolbars,
multiple panes, or multiple windows controlled by additional tabs. See
“Working with Tools and Views” on page 116 for descriptions of each tool and
view, plus details on controlling their display.
The Tool views can be selected, closed, opened, detached, and attached
using the Attach button. See “Basic UI Controls” on page 27
Tcl Console
The Tcl Console is an integrated console for Tcl scripting. You can enter Tcl
commands in the console to control all of the functionality of the Radiant
software. Use the Tcl help command (help <tool_name>*) to display a list of
valid extended Tcl commands.
Output
The Output View is a read-only area where tool output is displayed.
Message
There are three message types available:
Error -- displayed in red.
Critical -- displayed in orange.
Warnings -- displayed in yellow.
General Information -- displayed in blue.
A red dot in the Message tab provides a visual notification
that a new message/warning was received. Once you view
the notification, the dot disappears.
Find Results
The Edit > Find in Files command enables you to search for information in
the files within your project directory. The search results are then displayed in
the Find Results view.
Common Tasks
The Radiant software UI controls many tools and processes. The following
sections describe some of the more commonly performed tasks.
Controlling Views
All of the views in the Radiant software are controlled in a similar manner,
even though the information they contain varies widely. Here are some of the
most common operations:
Open – Use the View > Show Views menu selections or right-click in the
menu or toolbar areas to select a view from the pop-up menu.
Select – If a view is already open you can select its tab to bring it to the
front.
Detach – Click the detach button in the upper right corner of the view.
Attach – Click the attach button in the upper right corner of the view.
Move – Click and hold a view’s tab, and then drag and drop the view to a
different position among the open views.
Using a Tab Group You can use the Window menu to split off a view and
control it as a separate tab group. This allows you to examine two open views
side by side. The controls work as follows:
Split Tab Group – displays two views side by side. See Figure 33.
Move to Another Tab Group – moves the selected tab to the other tab
group. See Figure 34.
Merge Tab Group – merges a split tab group back into the primary view
Switch Tab Group Position – switches the positions of the two tab groups.
Figure 33: After Split Tab Group Command Used on Physical Designer
Figure 34: After Move to Another Tab Group Used on Netlist Analyzer
Cross-Probing
It is possible to select a data object in one view and see that same data object
in a different view or views. Right-click an object to see if cross-probing is
available. If it is, you will see a Show In sub-menu with the available views
listed. If you select a view that is not yet open, the Radiant software will open
it automatically. Cross-probing is available between Floorplan View and
Physical View of Physical Designer, and from Netlist Analyzer to Physical
Designer.
During the Radiant flow, various timing analyses and reports are created. You
can view a specific path in Netlist Analyzer, Physical Designer’s Floorplan
View, and Physical Designer’s Physical View. This allows for flexibility and
reduced debugging effort.
NOTE
Cross-probing to Netlist Analyzer is available only if the selected synthesis tool is LSE.
In the Reports tab, view any timing analysis report and identify a path to view.
If cross-probing is available, the specific icon tools become visible, as shown
in the following figure.
Click on an icon and the tool opens with the selected path.
In some cases, the tool is unable to find the path. The message “Can’t show
the schematic of this timing path.” appears. In an encrypted design, in some
cases, cross-probing is not available. The message “Cannot open encrypted
design.” appears.
The following figures show cross-probing a path from the Place & Route
Timing Analysis report to Netlist Analyzer, Physical Designer’s Floorplan
View, and Physical Designer’s Physical View.
By clicking on the Netlist Analyzer icon, you can preview the data path in
Netlist Analyzer.
Similarly, by clicking on the Floor Planner icon, you can easily view the same
path in Physical Designer’s Placement Mode.
Chapter 5
Overview
A project is the top organizational element in the Radiant software design
environment. Projects consist of design, constraint, configuration and analysis
files. Only one project can be open at a time, and a single project can include
multiple design structures and tool settings.
You can create, open, or import a project from the Start Page. Refer to
“Getting Started” on page 11 for instructions on creating a new project.
The File List view shows a project and its main elements.
Implementations
An implementation is the structure of a design and can be thought of as what
is in the design. For example, one implementation might use inferred memory
while another implementation uses instantiated memory. Implementations
also define the constraint and analysis parameters for a project.
Adding Implementations
To add a new implementation to an existing project:
1. Right-click the project name in the File List project view.
Select Add > New Implementation. In the New Implementation dialog box,
you can set the implementation name, directory, default strategy, and add
source files. When you select Add Source you have a choice of browsing for
the source files or using a source from an existing implementation.
Notice that you have the option to “Copy source to implementation directory.”
If this option is selected, the source files will be copied from the existing
implementation to the new implementation, and you will be working with
different source files in the two implementations. If you want the two
implementations to share the same source files and stay in sync, make sure
that this option is not selected.
To make an implementation active, right-click its name in the File List and
choose Set as Active Implementation.
Cloning Implementations
To clone an implementation:
1. In the File List view, right-click on the name of the implementation that you
want to copy and choose Clone Implementation.
The Clone Implementation dialog box opens.
2. In the dialog box, enter a name for the new implementation. This name
also becomes the default name for the folder of the implementation.
3. Change the name of the implementation’s folder in the Directory text box,
if desired.
4. Decide how you want to handle files that are outside of the original
implementation directory. Select one of the following options:
Continue to use the existing references
The same files will be used by both implementations.
Input Files
Input files are the design source files for the project. Input files can be any
combination of Verilog, SystemVerilog, and VHDL.
Right-click an input file name to open a pop-up menu of possible actions for
that file.
You can use the “Include for” commands to specify that a source file be
included for both synthesis and simulation, synthesis only, or simulation only.
An implementation can have multiple .pdc files, but only one can be active at
a time.
Debug Files
The files in the Debug folder are project files for Reveal Inserter. They are
used to insert hardware debug into your design. There can be multiple debug
files, and one can be set as active. To insert hardware debug into your design,
right-click a debug file name and choose Set as Active Debug File from the
pop-up menu. The debug file name becomes bold, indicating that it is active. It
is not required to have an active debug file.
Script Files
The Script Files folder contains the scripts that are generated by the
Simulation Wizard. After you run the Simulation Wizard, the steps are stored
in a simulation project file (.spf), which can be used to control the launching of
the simulator.
Analysis Files
The Analysis Files folder contains Power Calculator files (.pcf). The folder can
contain multiple analysis files, and one (or none) can be set as active. The
active or non-active status of an analysis file affects the behavior of the
associated tool view.
Programming Files
Programming files (.xcf) are configuration scan chain files used by the
Radiant Programmer for programming devices. The .xcf file contains
information about each device, the data files targeted, and the operations to
be performed.
An implementation can have multiple .xcf files, but only one can be active at a
time.The file must be set as active by the user.
Strategies
Strategies are collections of all the implementation-related tool settings in one
convenient location. Strategies can be thought of as recipes for how the
design will be implemented. An implementation defines what is in the design,
and a strategy defines how that design will be run. There can be many
strategies, but only one can be active at a time. There must be one active
strategy for each implementation.
The Radiant software provides two predefined strategies: Area and Timing. It
also enables you to create customized strategies. Predefined strategies
cannot be edited, but they can be cloned, modified, and saved as customized
user strategies. Customized user strategies can be edited, cloned, and
removed. All strategies are available to all of the implementations, and any
strategy can be set as the active one for an implementation.
To create a new strategy from scratch, choose File > New > Strategy. In the
New Strategy dialog box, enter a name for the new strategy. Specify a file
name for the new strategy and choose a directory to save the strategy file
(.sty).
The new strategy is with all the default settings of the current design. You can
modify its settings in the Strategies dialog box.
If you want to save the strategy changes to your current project, choose File >
Save Project from the Radiant software main window.
To create a new strategy from an existing one, right-click the existing strategy
and choose Clone <strategy name> Strategy. Set the new strategy’s ID and
file name.
To make a strategy active, right-click the strategy name and choose Set as
Active Strategy.
The default values are displayed in plain blue text. Modified values are
displayed in italic bold text.
Strategies are design data independent and can be exported and used in
multiple projects.
Area
The Area strategy is a predefined strategy for area optimization. Its purpose is
to minimize the total logic gates used while enabling the tight packing option
available in Map.
Applying this strategy to large and dense designs might cause difficulties in
the place and route process, such as longer time or incomplete routing.
Timing
The Timing strategy is a predefined strategy for timing optimization. Its
purpose is to achieve timing closure. The Timing strategy uses a very high
effort level in placement and routing. Use this strategy if you are trying to
reach the maximum frequency on your design. If you cannot meet your timing
requirements with this strategy, you can clone it and create a customized
strategy with refined settings for your design. This strategy might increase
your place-and-route run time compared to the Area strategy.
User-Defined
You can define your own customized strategy by cloning and modifying any
existing strategy. You can start from either a predefined or a customized
strategy.
When it is set to True, the last definition of the module is used by the software
and any previous definitions are ignored. The default is False.
The True option specifies the area reduction mode. When set to True, this
setting overrides the setting in “Frequency (MHz) (for Synplify Pro)” on
page 60.
The default is True for VHDL or VHDL design entry type projects, and False
for other projects. When this is set to False, Synplify Pro will use the file order
in the Radiant software File List view.
Compile Points minimize the amount of netlist changes resulting from RTL
code changes. Compile points create logical boundaries where optimization
will not occur. This may sacrifice some design performance for design result
predictability. No user intervention is needed aside from enabling the flow.
Note:
Auto Compile Point only supports the LAV-AT-E device.
When this option is set in the strategy, the synthesis tool inserts glue logic
around inferred RAM to avoid simulation mismatches caused by
indeterminate output values when the read and write addresses are same. By
default this option is OFF.
Users should design to make sure the read and write addresses are never the
same.
Clock Conversion
Controls gated and generated clock conversion.
For example:
(For VHDL designs) Defines how enumerated data types are implemented.
If this is set to True, Synplify Pro will not add I/O buffers into your design. If it
is set to False (default), the synthesis tool will insert I/O buffers into your
design.
For more information, refer to the Radiant Software Help. See User Guides >
Implementing the Design > Synthesizing the Design > Interactive
Synthesis.
When Synplify Pro is selected as the synthesis tool, it enables or disables the
FSM Compiler and controls the use of FSM synthesis for state machines.
When this is set to True (default), the FSM Compiler automatically recognizes
and optimizes state machines in the design. The FSM Compiler extracts the
state machines as symbolic graphs, and then optimizes them by re-encoding
Fanout Guide
Controls fanout during synthesis. When the specified fanout limit is achieved,
logic will be duplicated.
The setting is ignored when “Area (for Synplify Pro)” on page 57 is set to True.
Library Directories
Specifies all the paths to the directories which contain the Verilog library files
to be included in your design for the project.
You can also add custom library files with module definitions for the design in
a single file. The names of files read from the library path must match module
names. Mismatches result in error messages.
Values are:
None – Disables the pipelining and retiming features.
Pipelining Only (default) – Runs the design at a faster frequency by
moving registers into the multiplier, creating pipeline stages.
Pipelining and Retiming – When enabled, registers may be moved into
combinational logic to improve performance.
Push Tristates
When this is set to True, the Synplify Pro compiler pushes tristates through
objects such as muxes, registers, latches, buffers, nets, and tristate buffers,
and propagates the high impedance state.
The high-impedance states are not pushed through combinational gates such
as ANDs or ORs.
With resource sharing, synthesis uses the same arithmetic operators for
mutually exclusive statements; for example, with the branches of a case
statement. Conversely, you can improve timing by disabling resource sharing,
but at the expense of increased area.
Resynthesize All
When this is set to True (default), Synplify Pro will resynthesize all portions,
modules, or files of the RTL source. When this is set to False, Synplify Pro will
synthesize only the updated portions, modules or files of the RTL source
since the last run result.
If you run the “Force Run From Start' process, all portions, modules, or files of
the RTL source will be resynthesized, regardless of whether this option is set
to True or False.
When this is set to False (default), Synplify Pro keeps the top level module the
same, which is desired by incremental flow.
When this is set to True, changes in low level partitions will be propagated to
top partitions up to top module. Synplify Pro will possibly optimize timing data
and certainly will write a new timestamp onto the partition for the top level
module.
When this is set to True, only explicit I/O port constraints are forward
annotated. When it is set to False (the default), all I/O port constraints are
forward annotated.
LSE Options
This page lists all the strategy options associated with the LSE synthesis
process.
Allow Mixed Assignments (for LSE) When set to True, having both
blocking and non-blocking assignments to the same variable will be allowed.
A warning will be issued instead of an error.
For detailed description on LSE command line options, refer to the Radiant
Software Help. See Reference Guides > Command Line Reference Guide
> Command Line Tool Usage > Running SYNTHESIS from the Command
Line.
DSP Style
DSP Utilization
Specifies the percentage of DSP sites that LSE should try to use.
EBR Utilization
Specifies EBR utilization target setting in percent of total vacant sites. LSE will
honor the setting and do the resource computation accordingly. Default is 100
(in percentage).
Note
The encoding type “gray” only works with less than or equal to four machine states.
When the number of machine states is large than four, LSE will use other encoding
styles and issue the following warning message:
WARNING - Gray encoding is not supported for state machines with more than
four states.
The gated clocks must be specified in the .ldc file with create_clock
constraints. All inputs of the gating logic must be driven by primary inputs and
the gating logic must be decomposable. Instantiated primitives and black
boxes are not affected.
Forces Global Set/Reset Pin usage. (Not applicable for iCE40 UltraPlus).
By default, the box is unchecked (False), and LSE terminates processing and
issue an error message when a constraint errors are encountered.
When the box is checked (True), LSE will ignore constraint errors and
continue processing.
The LSE synthesis report includes the setting of this option and the constraint
errors found.
Loop Limit
Specifies the maximum number of iterations of "for" and "while" loops in the
source code. The limit is applied when the loop index is a variable, not when it
is a constant. The higher the loop_limit, the longer the run time. The default
value is 1950. Setting a higher value may cause stack overflow during some
of the optimizations during synthesis. A lower value will be ignored and the
default used instead.
Allows you to specify a path (or paths) to locate physical macro files used in a
given design. The software will add the specified paths to the list of directories
to search when resolving file references. The option can also be used for
indicating the directories containing include files that are specified in the RTL
design files.
You do not need to specify a search path if the necessary file is in the
directory containing the top-level .ngo file or if the FILE attribute in the design
gives a complete path name for the file (instead of a relative path name).
To specify a macro search path, double-click the Value box, and directly enter
the path or click the ... button to browse for one or more paths.
To specify a search path, double-click the Value box, and directly enter the
path or click the ... button to browse for one or more paths.
Optimization Goal
Enables LSE to optimize the design for area or speed.
When Optimization Goal is set to Area, LSE honors the LDC constraints if
there are any. If “Use IO Registers” on page 70 is set to Auto, LSE packs
input and output registers into I/O pad cells.
Note
With the Area setting, LSE also ignores all SDC constraints. These constraints are
not used by LSE and are not added for use by the later stages of implementation.
Timing – Optimizes the design for speed by reducing the levels of logic.
When Optimization Goal is set to Timing and a create_clock constraint is
available in an .ldc file, LSE ignores the “Target Frequency” on page 69
setting and uses the value from the create_clock constraint instead.
If there are multiple clocks, and if not all the clocks use create_clock
constraint, then LSE will assign 200 MHz constraint on the remaining
clocks in Timing Mode.
If “Use IO Registers” on page 70 is set to Auto, LSE does not pack input
and output registers into I/O pad cells.
For more information, refer to the Radiant Software Help. See User Guides >
Implementing the Design > Synthesizing the Design > Optimizing LSE
for Area and Timing.
Propagate Constants
When set to True (default), enables constant propagation to reduce area,
where possible. LSE will then eliminate the logic used when constant inputs to
logic cause their outputs to be constant.
You can turn off the operation by setting this option to False.
RAM Style
Sets the type of random access memory globally to distributed, embedded
block RAM, or registers.
The default is Auto which attempts to determine the best implementation, that
is, the synthesis tool will map to technology RAM resources (EBR/Distributed)
based on the resource availability.
ROM Style
Allows you to globally implement ROM architectures using dedicated,
distributed ROM, or a combination of the two (Auto).
This applies the syn_romstyle attribute globally to the design by adding the
attribute to the module or entity. You can also specify this attribute on a single
module or ROM instance.
Infer ROM architectures using a CASE statement in your code. For the
synthesis tool to implement a ROM, at least half of the available addresses in
the CASE statement must be assigned a value. For example, consider a
ROM with six address bits (64 unique addresses). The CASE statement for
this ROM must specify values for at least 32 of the available addresses.
(iCE40UP Only) Adds (True) or does not add (False) the glue logic to resolve
read/write conflicts wherever needed. Default is False.
deleted and the first one will be made to fan out to the second one's
destinations. LSE will not remove duplicate registers if this option is set to
False.
When set to True, LSE will report whenever a user-declared HDL net is
trimmed from the netlist.
With resource sharing, synthesis uses the same arithmetic operators for
mutually exclusive statements; for example, with the branches of a case
statement. Conversely, you can improve timing by disabling resource sharing,
but at the expense of increased area.
Target Frequency
Specifies the target frequency setting. This frequency applies to all the clocks
in the design. If there are some clocks defined in an .ldc file, the remaining
clocks will get this frequency setting. When a create_clock constraint is
available in an .ldc file, LSE ignores the Target Frequency setting for that
clock and uses the value from the create_clock constraint instead.
Use IO Insertion
When set to True, LSE uses I/O insertion and GSR.
Use IO Registers
When True, this option forces the synthesis tool to pack all input and output
registers into I/O pad cells based on the timing requirements for the target
device family. Auto, the default setting, enables this register packing if
“Optimization Goal” on page 66 is set to Area. If Optimization Goal is Timing
or Balanced, Auto disables register packing.
You can also do control packing on individual registers and ports. Refer to the
Radiant Software Help. See Reference Guides > Constraints Reference
Guide > Lattice Synthesis Engine Constraints > Lattice Synthesis
Engine-Supported HDL Attributes > syn_useioff.
Post-Synthesis Options
This page lists all strategy options associated with the Post-Synthesis
process. The options available for user setting are dependent on the target
device of your project.
Allows the user to supply already synthesized modules for design assembly
into the top level design. These modules must be already synthesized in
Unified Database (.udb) format.
For example:
c:\case1\ip1.udb; d:\example\aaa\abc.udb
All modules contents must be resolved at this stage before the flow can
continue to the next stage.
Hardware Evaluation
You might want to disable this option to refine your design while waiting for the
license. You will not be able to generate a bitstream, but you will be able to
see how resources are used (without the timer) and close timing. When you
get the license, you can then generate the bitstream.
Note:
The Hardware Evaluation option is only for a device that does not support bitstream
encryption ability even with a built-in hardware evaluation timer (i.e., LAV-AT device).
Lists detailed logic and route delays for all constrained paths and nets in the
design.
Controls maximum number of paths that could be reported for each endpoint.
To reference more information about command line options for the Map
Design process, type map -h <architecture> in a command line window. For
detailed options description, refer to “Running MAP from the Command Line”
on page 194.
When the box is checked (True), Map Design will ignore constraint errors and
continue processing.
The Map Design process report includes the setting of this option and the
constraint errors found.
Infer GSR
(Not applicable for iCE40 UltraPlus): Enables or disables the GSR
inferencing.
When multiple GSR instances are found in the design, mapper is able to
merge them if their outputs are actually the same wire in the netlist. Otherwise
mapper will issue an error.
Mapper can also create a GSR component if user specified the GSR signal in
the constraint file.
Controls maximum number of paths that could be reported for each endpoint.
Specifies performance grade for hold analysis. This option allows you to
override the default m (minimum) performance grade for hold time analysis,
which represents faster silicon than the fastest performance grade of the
device being targeted.
Specifies performance grade for setup analysis. This option allows you to
override the default performance grade which runs setup analysis against the
performance grade of the device currently targeted by the project
implementation.
Disable Auto Hold Timing Correction (for Place & Route Design)
When the switch is used, PAR will not check the hold timing of the design, so
no correction of potential hold timing violations will be performed.
When this is set to True, the timing-driven option for the PAR run will not be
used. If this is set to False, PAR automatically uses the timing-driven option if
the Timing Wizard is present and if any timing constraints are found in the
preference file. If selected, the timing-driven option is not invoked in any case
and cost-based placement and routing are done instead.
Two examples of situations in which you might disable this option are:
You have timing constraints specified in your preference file, but you want
to execute a quick PAR run without using the timing-driven option to give
you a rough idea of how difficult the design is to place and route.
You only have a single license for the timing-driven option but you want to
use this license for another application (for example, to perform timing-
driven routing within EPIC) that will run at the same time as PAR. This
option keeps the license free for the other application.
The multi-tasking PAR allows you to use multiple machines (nodes) that are
networked together for a multi-run PAR job, significantly reducing the total
amount of time for completion.
Allows you to run multiple threads on your local machine by specifying how
many cores to be used from your local machine. The range is from 0 to 64.
This option has great control of the packing density. The value range is 0-100
percent (100 = minimum packing; 0 = maximum density).
If you specify a density value for this option, the placer will attempt to pack the
device to that density. The “0” setting results in the densest mapping. If the
design is large compared with the target density, the placer will make an
aggressive packing effort to meet your target. However, this may adversely
impact the design fMAX performance.
Path-based Placement
Note:
The Pack Logic Block Utility and Path-based Placement strategies are not supported
in the LAV-AT-E device.
The default is 1. Cost tables are not an ordered set. There is no correlation
between a cost table's number and its relative value. If cost table 100 is
reached, placement does not begin at 1 again, even if command options
specify that more placements should be performed.
Placement Iterations
Specifies the maximum number of placement/routing passes (0-100, 0 = run
until solved) to be run (regardless of whether they complete) at the Placement
Effort Level.
Each iteration uses a different cost table when the design is placed and will
produce a different Uniform Database (.udb) file. If you specify a Starting Cost
Table, the iterations begin at that table number.
This option does not care how many iterations you performed or how many
effort levels were used. It compares every result to every other result.
Prioritize Hold Correction Over Setup Performance (for Place & Route
Design)
During hold timing correction, there may be situations when correcting a hold
timing violation would cause a setup requirement to become violated. By
default, we do not correct the hold violation on such connections so as to
preserve the setup performance, but when this switch is used, we will attempt
to correct the hold violation and let the setup requirement become violated.
Setting this to True prevents the design from being routed. PAR will output a
placed, but not routed Unified Design Database(.udb) file.
Set Speed Grade for Hold Optimization (for Place & Route Design)
This overrides the default speed grade used to perform hold timing analysis.
Number of Paths Per Constraint (for Place & Route Timing Analysis)
Lists detailed logic and route delays for all constrained paths and nets in the
design.
Number of Paths Per Endpoint (for Place & Route Timing Analysis)
Controls maximum number of paths that could be reported for each endpoint.
Specifies performance grade for hold analysis. This option allows you to
override the default m (minimum) performance grade for hold time analysis,
which represents faster silicon than the fastest performance grade of the
device being targeted.
Specifies performance grade for setup analysis. This option allows you to
override the default performance grade which runs setup analysis against the
performance grade of the device currently targeted by the project
implementation.
Controls whether the I/O timing report (.ior) will give an in-depth analysis on
all available performance grades or will just produce a summary report on the
worst-case performance grade.
True - The I/O Timing Report will summarize the worst-case scenario of all
available performance grades.
False (default) - The I/O Timing Report will only contain a summary of the
worst-case performance grade for the given device.
When this is set to False, the timing simulation file generation process will not
write PUR instance in the Verilog/VHDL back-annotation netlist. Then you
have to instantiate PUR in the test bench.
When this is set to True, the Timing Simulation process will place X notifiers in
the output file on flip-flops with setup and/or hold time violations.
The default is True. You can set it to False for those simulators that might not
be able to handle negative setup- hold times.
You are limited to those performance grades available for the device used in
the UDB file.
You can specify the following two special characters as the hierarchy
separator: “/” (back-slash) or “.” (period).
Enter the character as is in the edit box. Encapsulate the character with
double quotes, for example, “/”, “.”.
Bitstream Options
This page lists all strategy options associated with the bitstream generation
process. The options available for user setting are dependent on the target
device of your project.
Bitstream Mode
When this is set to true and there is timing error in the Place and Route report
file, a dialogue box will display before executing bitstream generation.
IP Evaluation
No header
Do not write the bitstream header section. (iCE40UP)
Removes the pullup on the unused I/Os, except Bank 3 I/Os which do not
have pullup. (iCE40UP)
Options include Medium and Slow. Fast is not supported for iCE40UP. Only
for NVCM configuration, not for programming
Depending on the speed of external PROM, this options adjusts the frequency
of the internal oscillator used by the iCE40UP device during configuration.
This is only applicable when the iCE40UP device is used in SPI Master Mode
for configuration.
Output Format
Specifies the type of bitstream to create for an FPGA device.
Register Initialization
Enable register initialization section of the bitstream (Not applicable for iCE40
UltraPlus).
Run DRC
When this is set to True, the software runs a physical design rule check and
saves the output to the Bit Generation report file (.bgn).
Running DRC before a bitstream or JEDEC file is produced will detect any
errors that could cause the FPGA to function improperly. If no fatal errors are
detected, it will produce a bitstream or JEDEC file. Run DRC is the default.
This option is applicable only when the iCE40UP device is used as SPI
Master Mode for configuration.
Common Tasks
Working with projects includes many tasks, including: creating the project,
editing design files, modifying tool settings, trying different implementations
and strategies, and saving your data.
Creating a Project
See “Creating a New Project” on page 11 for step-by-step instructions.
In the Project Properties dialog box, select Value next to Top-Level Unit and
select the desired top level from the list.
You can also use the Hierarchy View to set the top-level. Right-click a level
you want to be the top-level in the Hierarchy View and choose Set Top-Level
Unit.
Editing Files
You can open any of the files for editing by double-clicking or by right-clicking
and choosing Open or Open with.
Chapter 6
This chapter describes the design flow in the Radiant software. Running
processes and controlling the flow for alternate what-if scenarios are
explained.
Overview
The FPGA implementation design flow in the Radiant software provides
extensive what-if analysis capabilities for your design. The design flow is
displayed in the Task Detail View at the right end of the Process Toolbar.
Synthesize Design This process runs the selected synthesis tool (Lattice
Synthesis Engine is the default) in batch mode to synthesize your HDL
design.
Synthesis Tool - identifies the selected synthesis tool, Synplify Pro
(default) or Lattice Synthesis Engine.
Post-Synthesis Timing Analysis - generates timing analysis files.
Post-Synthesis Simulation File - generates a post-synthesis netlist file
<file_name>_syn.vo used for Post-Synthesis Simulation.
Map Design This process maps the design to the target FPGA and
produces a mapped Unified Database (.udb) design file. Map Design converts
a design’s logical components into placeable components.
Map Timing Analysis - generates timing analysis files.
Place & Route Design This process takes mapped physical design files
and places and routes the design. The output can be processed by the design
implementation tools. Timing analysis files can also be generated.
Place & Route Timing Analysis - generates timing analysis files.
I/O Timing Analysis - generates I/O timing analysis files.
Export Files This process generates the IBIS, simulation, and programming
files that you have selected for export:
Bitstream File – generates a configuration bitstream (bit images) file,
which contains all of the design’s configuration information that defines
the internal logic and interconnections of the FPGA, as well as device-
specific information from other files.
IBIS Model – generates a design-specific I/O Buffer Information
Specification model file (.ibs). IBIS models provide a standardized way of
representing the electrical characteristics of a digital IC’s pins (input,
output, and I/O buffers).
Gate-Level Simulation File – generates a Verilog netlist of the routed
design that is back annotated with timing information. This generated .vo
file enables you to run a timing simulation of your design.
The files for export can also be generated separately by double-clicking each
one.
Running Processes
You can perform the following actions for each step in the process flow:
Run – runs the process, if it has not yet been run.
Force Run– reruns a process that has already been run.
Force Run From Start – reruns all processes from the start to the selected
process.
Stop – stops a running process.
Clean Up Process – clears the process state and puts a process into an
initial state as if it had not been run.
The state of each process step is indicated with an icon to the left of the
process. The process status icons description is described in “Process” on
page 35
The Reports View displays detailed information about the process results,
including the last process run. The Messages section shows warning and
error messages and allows you to filter the types of messages that are
displayed. See “Reports” on page 37.
IP Encryption Flow
IP encryption flow enables you to protect your IP design. Following the
industry standard, the Radiant software, through the IP encryption flow, allows
the partnership between the IP Vendor, supported EDA vendor, and Lattice
Semiconductor.
Each encrypted source file contains a single data block and one or more key
blocks. The number of key blocks depends on the number of provided
vendor’s public keys.
Note
To decrypt an encrypted source file, you must perform the IP encryption flow steps in
the reverse order.
During the next step in the design flow, typically synthesis, the Encrypted RTL
is decrypted to access the original IP design, as shown in the following figure.
By separating the encryption of data and key, you can use public keys from
different vendors to encrypt the same HDL file.
For more information on how to perform HDL encryption, refer to the Radiant
Software Help. See Reference Guides > Command Line Reference Guide
> Command Line Tool Usage > Running HDL Encryption from the
Command Line.
The Radiant software provides the key templates you can simply drag-and-
drop into an HDL file. Each key template is specific to an EDA vendor
providing the value of a public key.
In this example, the HDL source file will be encrypted by the Lattice Public
Key.
‘pragma protect version=1
‘pragma protect encoding=(enctype=”base64”)
// optional information
‘pragma protect author=”<Your_Name>”
‘pragma protect author_info=”<Your_Information>”
Defining the key in the key.txt file: The public encryption key or keys can
be defined in any .txt file. The key file may contain a single public key or a list
of all available public keys. In the Radiant software, all common EDA vendor
public keys are located in <Radiant_install_directory>/ispfpga/data/key.txt file.
Defining the key directly in the HDL file: You may define the Public Key
directly in the HDL file. You may define one or more keys.
‘pragma protect key_keyowner= "Lattice Semiconductor"
‘pragma protect key_keyname= "LSCC_RADIANT_2"
‘pragma protect key_method="rsa"
‘pragma protect key_public_key
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0EZKUUhbuB6vSsc7OhQJ
iNAWJR5unW/OWp/LFI71eAl3s9bOYE2OlKdxbai+ndIeo8xFt2btxetUzuR6Srvh
xR2Sj9BbW1QToo2u8JfzD3X7AmRvlwKRX8708DPo4LDHZMA3qh0kfDDWkp2Eausf
LzE2cVxgq7fy/bDhUeN8xKQCSKJ7aguG6kOI6ROoZz21ljzDLUQzhm2qYF8SpU1o
tD8/uw53wLfSuhR3MBOB++xcn2imvSLqdgHWuhX6CtZIx5CD4y8inCbcLy/0Qrf6
sdTN5SAg2OZhjeNdzmqSWqhL2JTDw+Ou2fWzhEd0i/HN0y4NMr6h9fNn8nqxRyE7
IwIDAQAB
If the key is defined directly in the HDL file, you don’t need to provide the -k
option in the encrypt_hdl command.
Note
The key defined directly in an HDL source file has preference over the key defined in
the key.txt file.
or
`pragma protect data_method="aes256-cbc"
If the key was defined in the key.txt file: The command will encrypt the
HDL file with all keys defined in the key.txt file.
encrypt_hdl -k <keyfile> -l <verilog | vhdl> -o <output_file>
<input_file>
Macro Types:
Macro Creation:
During macro creation, the macro is implemented as a design block and gets
instantiated in the RTL design. The design contains additional logic to test
macro functionality. Unified Design Database (.udb) supports the design block
to be a macro.
Macro Module – module in the design database which implements macro
netlist.
Macro Instance – an instance in the design database where a macro
module is instantiated.
Export Macro:
Modules representing macros will be extracted from the design and exported
as a .ipm file. The macro will be the top module in the .ipm file. The name
specified in ldc_create_macro constraint will be used as the name of the top
module.
Macro Reuse:
During macro reuse, the design database checks macro compatibility and
provides APIs for tools to connect the macro to your design. Before
connecting, the macro used in the design must be a black box. Macros are
reused as black boxes in top designs. The implementation of macros will be
connected to top designs during the compilation flow.
Topics include:
Creating a Macro Block
Creating a Macro Region
Exporting Macro
Reusing a Macro Block
Macro Usage Guidelines
Note:
The Lattice Synthesis Engine (LSE) tool is currently not supported in macro creation.
Disable – if you do not want to use the macro, you can select the
checkbox in this column. You will see the #DISABLED# appended in
front of ldc_create_macro constraint.
Note:
The default hierarchy separator for Synplify Pro is a “.” (period), while Radiant tools
use “/” (forward slash). If you create a sub-module under more than two hierarchy
levels, you need to manually add the set_hierarchy_separator {/} line or change the
separator from “/” to “.” in the .sdc file.
Macro dropdown menu -- you can select the predefined macro instance
from the pre-synthesis macro creation.
Buffer size -- buffer zone of the routing region.
Buffer left - left buffer zone of the routing region.
Buffer right - right buffer zone of the routing region.
Buffer top - top buffer zone of the routing region.
Buffer bottom - bottom buffer zone of the routing region.
If you do not enter a value within range, you may encounter an error. The
following example shows a buffer size error.
Color option -- allows you to change the color of the macro region.
After creating a macro region, click the Save icon in Physical Designer.
The created macro regions are saved into a post-synthesis constraint (.pdc)
file.
Once macro regions are defined, you can assign a macro instance to the
region by using ldc_set_location constraint.
Exporting Macro
Once synthesis is passed, you can launch the Export Macro dialog box from
the Tools menu. The dialog box lists all defined macros on the left-hand pane.
You can select them and set their preservation levels. When macro is
exported, a .ipm file will be generated.
To export macro:
Click Tools > Export Macro.
In the Export Macro dialog box, you can choose the macro preservation
levels and specify the default path where the macro package will be
exported.
Logic & Physical with Placement & Routing Info (Hard Macro)
After running PAR, you can export to Logical, Logical & Physical with
Place Info, and Logic & Physical with Placement & Routing Info
preservation levels.
The Export Macro dialog box also contains the following fields:
Macro Name – displays the name of the selected macro from the Macro
column in the left-hand pane.
Vendor – displays the vendor name.
Version – displays the Macro IP version, the default is always 1.0.
Support Radiant from Version to Version – displays the supported
maximum and minimum Radiant version. The maximum version could be
empty, but the minimum is the same as the current Radiant version.
Testbench File – testbenches that allow you to do simulation or evaluate
the macro (optional).
Document File – contains any document such as help, user guide, or
introduction file included in the macro (optional).
Other Files – any files such as readme files and other documentation
(optional).
Export to – default path where the macro package will be saved.
When you open Physical Designer, the netlist shows the reused macro
instances. They contain information of the original region from the create
stage.
This section lists Firm and Hard macro information and attributes
such as device family, preservation level, anchor, and main
resources.
The syn_resources information generated when exporting macro
(e.g., LUT, REG, Block RAM, LRAM) determines the main
resources listed in the Map Report.
You can also create a macro region with the Exclusive option in Physical
Designer. This option excludes other logic from the region for placement
and routing when reusing the exported Firm and Hard macro.
The Reuse Macro Region dialog box opens when you right-click on a
macro instance from the netlist and select the Reuse macro region...
option.
For these macro instances, you can only enable the Exclusive option. The
text boxes are grayed out.
To help determine which scenario best meets your project goals, use a
different implementation of a design using the same tool strategy, or run the
same implementation with different strategies. Each implementation has an
associated active strategy, and when you create a new implementation you
must select its active strategy.
To try a new implementation with different strategies, you must create a new
implementation/strategy combination.
1. Right-click the project name in File List.
2. Choose Add > New Implementation.
3. In the dialog box, choose a source file from an existing implementation
using the Add Source drop-down menu.
4. Choose a strategy using the Default Strategy drop-down menu.
To use the same source for new and existing implementations, make sure that
the “Copy source to implementation directory” option is not selected. This will
ensure that your source is kept in sync between the two implementations.
If you are using the Lattice Synthesis Engine, the synthesis constraints will be
included in an .ldc file. If you are using Synplify Pro for synthesis, the
constraints will be included in an .fdc file. The older .sdc file format is also
supported for constraints.
The .ldc, .pdc, or .fdc file will open in the Source Editor to allow you to
manually add the constraints. You can use the Pre-Synthesis Constraint
Editor tool to add pre-synthesis constraints to the .ldc file and the Post-
Synthesis Timing Constraint Editor tool to add logic view level post-synthesis
timing constraints to .pdc files. You can also use the Device Constraint Editor
and Floorplan View to add physical constraints to .pdc files. For detailed
information about setting constraints, see User Guides > Applying Design
Constraints and the Reference Guides > Constraints Reference Guide in
the Radiant Software Help.
Constraint Creation
LDC (pre-synthesis) and PDC (post-synthesis) files are used to input timing
and physical constraints. The following steps illustrate how to assign and edit
constraints in the Radiant software and implement them at each stage of the
design flow.
1. If desired, define some constraints at the HDL level using HDL attributes.
These source file attributes are included in the Unified Database (UDB),
and will be displayed in the Radiant software after the Map Design
process is run. The following is an example of applying the LOC attribute
in Verilog source code:
module top (
input clk1,
input datain /* synthesis loc = B12 */,
output ff_clk1out
)
For more information on HDL Attributes, refer to the Radiant Software
Help. See Reference Guides > Constraints Reference Guide > HDL
Attributes.
2. Open one or more of the following tools to create new constraints or to
modify existing constraints from the source files:
Device Constraint Editor, which consists of:
Spreadsheet View – the primary view for setting constraints.
Package View – examines the pin layout of the design, modifies
signal assignments, reserves pin sites that should be excluded
from placement and routing, and runs PIO design rule check to
verify legal placement of signals to pins.
Device View – examines FPGA device resources.
Netlist View - shows port types (Input, Output) and groups.
Timing Constraint Editor. Timing/Physical constraints are entered
through:
Pre-Synthesis Constraint Editor - used to enter pre-synthesis
constraints such as clocks, clock latency/uncertainty/Group, Input/
Output delays, timing exceptions, and attributes.
Post-Synthesis Timing Constraint Editor - This post-synthesis
version of the Timing Constraint Editor is used to enter logic view
level timing constraints and physical constraints.
Floorplan View examines the device layout of the design, draws
bounding boxes for GROUPs, draws REGIONs for the assignment of
groups or to reserve an area, and reserves sites and REGIONs that
should be excluded from placement.
3. Save the constraints to the pre-synthesis constraint file (.ldc) or post-
synthesis constraint file (.pdc).
4. Run the Map Design process (Map).
5. Run the Map Timing Analysis process and examine the timing analysis
report. This is an optional step, but it can be a quick and useful way to
identify serious timing issues in the design and constraint errors (syntax
and semantic). Modify constraints as needed and save them.
6. Run the Place & Route Design process.
7. Open views directly or by cross-probing to examine timing and placement
and create new GROUPs. Also examine the Place & Route Timing report.
8. Modify constraints or create new ones using the appropriate constraint
tool. Save the constraint changes and rerun the Place & Route Design
process.
Simulation Flow
The simulation flow in the Radiant software supports source files that can be
set in the File List view to be used for the following purposes:
Simulation and Synthesis (default)
Simulation
Synthesis
This allows the use of test benches, including multiple file test benches.
Additionally, multiple representations of the same module can be supported,
such as one for simulation only and one for synthesis only.
You can add top level signals to the waveform display in the simulator and to
automatically start the simulator running.
The Simulation Wizard automatically includes any files that have been set for
simulation only or for both simulation and synthesis. You can select the top of
the design for simulation independent of the implementation design top. This
allows easy support for test bench files, which are normally at the top of the
design for simulation but not included for implementation. The implementation
wizard exports the design top to the simulator, along with source files, and set
the correct top for the .spf file if running timing simulation.
After you add a module, use the Include for menu to specify how the module
file is to be used in the design.
Notes
If Aldec-HDL is not installed, it will not be selectable.
If you change simulation tool, project name will not change. Any previous
Simulation Wizard results will be deleted, and a new simulation will be started
using new simulation files.
Note
If you want to run a post-synthesis simulation, you must first generate a post-
synthesis simulation file (<file_name>_syn.vo) as follows:
In the Radiant Software, click Task Detail View and check Post-Synthesis
Simulation File.
In the Process Toolbar, click Synthesize Design.
6. In the Add and Reorder Source page, select from the source files listed in
the Source Files list box or use the browse button to choose a source file
not listed.
By default, the Automatically Set Simulation Compilation File
Order option is checked.
7. Click Next. If the Automatically Set Simulation Compilation File Order
option was checked in the previous step, you’ll need to specify a top level
simulation test bench in the Simulation Top Module box in the Parse
HDL Files for Simulation box.
In some designs, the compile order of the HDL files passed to the simulator
might result in compilation warnings. In most cases, these compilation
warnings can be safely ignored. The warnings can be eliminated in one of two
ways:
The correct compilation order for the HDL files can be set manually in the
File List view. After the correct order is determined, the files are sent to the
simulator, which will eliminate any compilation warnings.
The correct compilation order for the HDL files can be set in the
Simulation Wizard during the “Add and Reorder” step. After the correct
order for the files is set manually, the files will be sent to the simulator,
which will eliminate any compilation warnings.
You can also run the simulation directly from the wizard.
Chapter 7
This chapter covers the tools and views controlled from the Radiant software.
Tool descriptions are included and common tasks are described.
Overview
The Radiant design environment streamlines the implementation process for
FPGAs by combining the tool and data views into one common location. Two
main features of this design environment make it easy to keep track of
unsaved changes in your design and examine data objects in different views.
Start Page
The Start Page is displayed by default when you run the Radiant software.
The Start Page enables you to open projects, read product documentation,
and view the software version and updates. You can modify startup behavior
by choosing Tools > Options > General > Startup.
The Start Page gives you quick access to recent projects and to product
documentation.
Reports
The Reports view provides one central location for the project summary and
design processing reports. It is displayed by default when a project is open.
Alternatively, click on the Reports icon in the toolbar.
The Reports view is organized into Project Summary, Synthesis Reports, Map
Reports, Place & Route Reports, Export Reports, and Misc Reports.
The Reports view also supports path cross-probing through the timing or
analysis reports. You can view a specific clock or data path in Netlist Analyzer
and Physical Designer by clicking the icon next to the path.
Tools
The entire FPGA implementation process tool set is contained in the Radiant
software. You can run a tool by selecting it from the Tools menu or toolbar.
If you are viewing an encrypted design, some secured objects may not be
visible in the selected tool. To learn more, see User Guides > Securing the
Design > Secure Objects in the Design in the Help.
Table 2: Difference between Radiant 3.0 (or later) and previous versions
Radiant 1.x/2.x Radiant 3.0 or later
.sdc file For Synplify Pro only For both LSE and Synplify
Pro
The following figure shows the Radiant folder structure. The .ldc constraints
are stored under the Lattice LSE folder, the .fdc constraints are stored under
Synplify Pro, and the newly created .sdc constraints are stored outside these
two folders, which can be commonly used by both synthesis tools.
Notes:
1. If the previous project includes an .sdc file, Radiant 3.0 or later will use it
in the LSE flow, but it can cause unexpected syntax errors.
2. If the previous project includes both .ldc and .sdc files, Radiant 3.0 or later
will force one of them to be inactive. Only one constraint file can be active.
The Timing Constraint Editor can only be launched with the active
constraints file.
Known Limitations
Constraints on internal objects from Synplify Pro may not be fully
compatible. The pre-synthesis TCE uses Verific parser for compilation
whereas Synplify Pro uses their own parser. This may cause some name
changes on the internal objects when Synplify Pro is used.
Pre-Synthesis TCE "Attribute" tab is only supported by LSE. The
attributes are passed using a Lattice Proprietary constraint
"ldc_define_attribute,” which is not supported by Synplify Pro.
See Also
Reference Guides > Constraints Reference Guide in the Radiant Help.
User Guides > Applying Design Constraints > Using Radiant
Software Pre-Synthesis Constraints in the Radiant Help.
User Guides > Applying Design Constraints > Using Radiant
Software Tools > Device Constraint Editor in the Radiant Help
Constraint Propagation
Constraint propagation is not a stand-alone tool, nor do you have to provide
any input to take advantage of this feature.
You usually define constraints for the top-level design as well as include other
constraint files for any IP that are generated with Radiant tools such as IP
Catalog. Constraints defined at the IP level may not contain the correct
hierarchical names and so will not be applied correctly when synthesized. To
help honor as much of the supplied constraints as possible, this feature runs a
design rule check (DRC) on all the input constraints and writes out a new
constraint file to support hierarchical constraints such as soft-IP constraints
and honor top-level constraints.
All modified constraints are saved to a .pdc file and the flow returned to Map.
The Device Constraint Editor shows the pin layout of the device and displays
the assignments of signals to device pins. This view allows you to edit these
assignments, and reserve sites on the layout to exclude from placement and
routing. The Device Constraint Editor is also the entry mechanism for physical
constraints.
Device Constraint Editor views, shown in Figure 67, enable you to develop
constraints that will shorten turn-around time and achieve a design that
conforms to critical circuit performance requirements.
Global Settings
In the Device Constraint Editor tool at the bottom of the tool, there are a series
of tabs to allow you to set many of the device settings such as Junction
Temperature, Voltage, sysCONFIG, User Code, Derating, Bank VCCIO,
Global Set/Reset, Use Primary Net, and Vref Locate constraints.
sysCONFIG Settings
Defines system configuration option settings for the sysCONFIG feature. If
you do not specify these settings in the .pdc file, using the Global tab in
Device Constraint Editor or manually, some default sysCONFIG constraints
will automatically be generated based on the device selection.
The SYSCONFIG constraint is available for all Lattice FPGA devices that
support the sysCONFIG configuration port. The sysCONFIG port can be a
single data line or byte-wide (multiple byte) data port that can support serial
and parallel configurations streams. The devices also support daisy chaining.
The following table shows the default settings in bold type and the selectable
settings for all of the keyword values for the SYSCONFIG constraint. They are
ordered as they appear in the Global tab in the Device Constraint Editor.
Device Support
Syntax
ldc_set_sysconfig <keyword>=<value>+
You should set the constraint configuration using the Device Constraint Editor
or by editing the .pdc file directly. If you do not set sysCONFIG options,
default SYSCONFIG constraints are automatically set.
Examples
FLASH_CLK_FREQ 3.5 [ 3.5, 7.0, 14.1, 28.1, 56.2, 75, 90, LFMXO5
112.5]
MASTER_PREAMBLE_TIMER_C 600000 [600000, 400, 2000, 4000, 20000, LFCPNX, LFD2NX, LFMXO5,
YCLES 40000, 200000, 400000] LIFCL, UT24C, UT24CP
SLAVE_SPI_PORT
MASTER_SPI_PORT
Specifies if the CSPI port should be available after configuration. Used for
background programming of the connected SPI flash. This option will
preserve the dual-purpose pins for PAR. When enabled, it allows the use of
the external Controller SPI port for configuring the SRAM fuses using the
bitstream.
SLAVE_I2C_PORT
Note
As part of the Lattice inclusive language guidelines, the Avant device's
MASTER_SPI_PORT has been changed to CONTROLLER_SPI_PORT and
SLAVE_SPI_PORT to TARGET_SPI_PORT. If you want to know more about the
Lattice Inclusive Language, please visit Lattice Answer Database.
Specifies if the SLAVE I2C port should be available after configuration. This
option will preserve the dual-purpose pins for PAR.
SLAVE_I3C_PORT
Specifies if the SLAVE I3C port should be available after configuration. This
option will preserve the dual-purpose pins for PAR.
JTAG_PORT
DONE_PORT
INITN_PORT
PROGRAMN_PORT
BACKGROUND_RECONFIG
DONE_EX
OFF (default) | ON
The customer can select if the device should wake up on its own after the
DONE bit is set or wait for an external DONE signal to drive the DONE pin
high. The DONE_EX attribute will determine if the wake up sequence is
driven by an external DONE signal. If set to ON, the user wishes to delay
wake up until the DONE pin is driven high by an external signal and
synchronous to the clock. The user will select OFF if they want to
synchronously wake up when the DONE bit is set and ignore any external
driving of the DONE pin.
DONE_OD
ON (default) | OFF
Done Pin Open Drain. Enables you to configure the DONE pin as an open
drain pin. By default, the pullup on the DONE pin is active.
The DONE pin used in sysCONFIG to indicate that configuration is done. The
DONE pin can be linked to other DONE pins and used to initiate the wake up
process. The DONE pin can be open collector or active drive. Default is ON
and insures the user needs to make a conscious decision to drive the pin.
MCCLK_FREQ
3.5 (default) | 7.0 | 14.1 | 28.1 | 56.2 | 90 | 112.5 | 150 – Nexus devices.
3.1 (default) | 7.1 | 14.3 | 28.6 | 57.1 | 66.7 | 80.0 | 100.0 | 106.7 | 133.3 | 160.0
– Avant devices.
For LAV-AT devices, a 400 Mhz oscillator is divided and made available for
configuration.
FLASH_CLK_FREQ
TRANSFR
OFF (default) for LAV-AT, LFD2NX, LIFCL, and UT24C. ON [default] for
LFCPNX and UT24CP
CONFIG_IOSLEW
CONFIGIO_VOLTAGE_BANK0/1
Setting this attribute informs the software which voltage is required in Bank0/1
to satisfy the user’s sysCONFIG requirements. The sysCONFIG pins used for
configuration may or may not be used in the design and hence the user shall
be able to declare the voltage interface for this bank. DRC errors can then be
generated based on CONFIG_IOVOLTAGE and usage of the dual-purpose
sysCONFIG pins. BANK0 and 1 values can be different and a combination of
the available values including NOT_SPECIFIED.
CONFIGIO_VOLTAGE_BANK1/2
CONFIG_SECURE
OFF (default) | ON
WAKE_UP
Wake Up. Wake Up is a controlled event after a part has been configured.
External control of the DONE pin can be selected to either delay wake up or
be ignored. See DONE_EX.
The Wake Up sequence controls three internal signals, and the DONE Pin will
be driven after configuration and prior to user mode. If DONE_EX = ON, the
WAKE_UP keyword will take your selected option (1-7), and then the software
will set wake-up signal bits accordingly. If you do not select a wake-up
sequence, the default wake-up sequence will be 4. If DONE_EX = OFF
(default), the WAKE_UP keyword will take your selected option (1-25), and
then the software will set wake-up signal bits accordingly. If you do not select
a wake-up sequence, the default wake-up sequence will be 21.
COMPRESS_CONFIG
OFF (default)
Bitstream Compression. When set to ON, for those devices that support
bitstream compression, the software generates a compressed version of the
bitstream file.
EARLY_IO_RELEASE
Program and wakeup the left/right I/O banks early, before the rest of the
device is programmed.
BOOTMODE
This setting enables you to select the booting mode at power up.
DUAL - Performs the dual boot for the booting event. In case the
primary booting image (bitstream) fails, the secondary boot image is
invoked to boot the device.
SINGLE - Performs a single boot only. If it fails, the device will move to
unprogrammed mode directly.
NONE - No controller SPI booting at startup, waits for target
configuration port to configure the device.
MASTER_PREAMBLE_TIMER_CYCLES
The preamble_count value below is the number of clock cycles to get a valid
preamble before an error is declared.
BOOT_SEL
The BOOT_SEL preference allows you to select the booting mode (DUAL or
SINGLE) at power up (POR), PROGRAMN pin toggle or REFRESH
command execution with the following available options:
DUAL (default) - Performs the dual boot for the booting event. In case
the primary booting image (bitstream) failed, the secondary booting
image is automatically invoked to boot up the device.
SINGLE - Performs the single boot only. If it fails, the device goes
directly to unprogrammed mode.
PROGRAMN_RECOVERY
MSPI_RESET
MULTI_BOOT_MODE
DAISY_CHAIN
You can select the daisy chain mode for upstream device using
DAISY_CHAIN preference with the following available options:
DISABLE - Daisy Chain is disabled (default).
BYPASS - Enables the transparent SRAM access mode.
FLOW_THROUGH - Enables the transparent SRAM or/and INIT
Registers access mode.
DAISY_CHAIN_WAIT_DONE
MSPI_SIGNATURE_TIMER
MSPI_CLK_PHASE
MSPI_CPOL
SSPI_CLK_PHASE
SSPI_CPOL
The SSPI_CPOL specifies the clock to be low or high in idle state with the
following available options:
IDLE_CLOCK_LOW (default) - Clock is low in idle state.
IDLE_CLOCK_HIGH - Clock is high in idle state.
SSPI_SHIFT_ORDER
The SSPI_SHIFT_ORDER bit specifies the SSPI shift order with the following
available options:
MSB_FIRST (default) - Shifts the most significant bit first.
LSB_FIRST - Shifts the least significant bit first.
SSPI_DAISY_CHAIN_MODE
ERASE_EBR_ON_REFRRESH
SIGNATURE_CHECK
MSPI_ADDRESS_32BIT
The MSPI_ ADDRESS_32BIT enables you to send the 32-bit command set
on MSPI with the following available options:
DISABLE (default) - 24-bit command set.
ENABLE - 32-bit command set.
MSPI_COMMAND_32BIT
The MSPI_ ADDRESS_32BIT enables the 32-bit MSPI addressing mode with
the following available options:
DISABLE (default) - 24-bit MSPI addressing mode.
ENABLE - 32-bit MSPI addressing mode.
SSPI_IDLE_TIMER
MSPI_PREAMBLE_DETECTION_TIMER
MULTI_BOOT_SEL
SSO Analysis
The Radiant software enables you to run an analysis of simultaneous
switching outputs (SSO). SSO analysis describes the noise on signals caused
by a large number of output drivers that are switching at the same time.
Analysis of SSO helps ensure that your I/O standards and power integrity
meet requirements of the PCB design. This tool can be accessed in the
Device Constraint Editor in the SSO tab at the bottom. From there you can set
output loads, ground plane PCB noise, SSO Allowance %, and power plane
PCB noise values. Once the flow is re-run, an SSO report is generated.
A Virtual I/O is terminated in the LUT instead of a PIO. This is reported as the
"Number of feedthrough LUT4s" in the MAP report, and is not included in the
number of LUTs in the design implementation.
If the total number of real ports in the design is less than or equal to the total
number of I/O ports in the device, you can use the regular Radiant flow for
such IP without the Virtual I/O flow.
Notes:
Wildcard "*" is supported for the port names:
ldc_set_attribute {VIRTUAL_IO = TRUE} [get_ports datain*]
Using the DCE Spreadsheet View Virtual column, set the required ports
value to "TRUE." By default, the value is set to "FALSE."
See Also
“Checking the Virtual I/O Ports” on page 137
“Verifying Virtual I/O Ports” on page 138
Notes:
I/O registers are treated differently in the LFCPNX (CertusPro-NX) and UT24CP
(CertusPro-NX-RT) device versus the iCE40UP (iCE40 UltraPlus) device. For the
LFCPNX and UT24CP device, IOLOGIC is a whitebox cell model. I/O registers are
mapped into IOLOGIC. So, when IREG's D input or OREG's Q output is a Virtual I/O
port, the I/O REG will be pushed into PLC (SLICE).
However, for the iCE40UP device, I/O register is in IOLOGIC black box. It is packed by
the synthesis tool. As a result, the Virtual I/O constraints will be ignored for ports
associated with I/O registers.
See Also
“Specifying Virtual I/O Ports” on page 135
“Verifying Virtual I/O Ports” on page 138
Viewing Virtual I/Os in DCE If you have specified the Virtual I/O attributes
for some I/O ports in the Post-Synthesis constraint file (.pdc), you can see
them in the "Virtual" column. As shown in the following figure, the ports
"datain[0]" to "datain[7]" are virtual I/Os.
If you save the result, the Radiant software will ask you to rerun the Map
Design and Place & Route Design processes, since the .pdc file has been
changed.
The number of Virtual I/Os are reported in the Map Report (.mrp) file. Here is
an example:
The report shows that the "Number of Virtual I/Os" is 8, and it used 8 LUTs to
replace the specified Virtual I/O ports. These eight LUTs are part of "Number
of inserted feedthrough LUT4s."
You can find the individual Virtual I/Os in the "I/O (PIO) Attributes" section in
the same .mrp file. If a port is a Virtual I/O, the value is marked as "VIRTUAL"
in column "Levelmode IO_TYPE."
I/O Name Direction Levelmode I/O REG I/O DDR Special I/O Buffer
IO_TYPE
See Also
“Specifying Virtual I/O Ports” on page 135
“Checking the Virtual I/O Ports” on page 137
Netlist Analyzer
Netlist Analyzer works with Lattice Synthesis Engine (LSE) and Synplify Pro
to produce schematic views of your design while it is being implemented. Use
the schematic views to better understand the hierarchy of the design and how
the design is being implemented.The Netlist Analyzer window has four parts,
as shown in Figure 69.
World View, which is a miniature view of the sheet, helps you pan and
zoom in the schematic view.
Netlist Analyzer can have multiple schematics open. The open schematics
are shown on tabs along the bottom of the window.
There are several ways to adjust the view of a schematic and to navigate
through the hierarchy. For more information on how to do this, in addition to
detailed information about Netlist Analyzer, refer to the Radiant Software
Help. See User Guides > Managing Projects > Analyzing a Design.
Physical Designer
Physical Designer provides one central location where you can do all the
floorplanning and be able to view the physical layout of the design. Physical
Designer does this with Placement, IO, and Routing modes.
Placement Mode
Placement Mode provides a large-component layout of your design, and is
available as soon as the target device has been specified. Placement Mode
displays user constraints, and placement and routing information. All
connections are displayed as fly-lines. Placement Mode allows you to create
REGION and GROUP constraints to keep components together. You can
specify the types of components and connections to be displayed. As you
move your mouse pointer over the floorplan layout, details are displayed in
tool-tips and in the status bar, including:
Number of resources for each GROUP and REGION
Number of utilized slices for each PLC component
Name and location of each component, port, net, and site
Placement Mode has a Congestion Timing Map view allowing you to debug
timing congested areas of your design. This view gives the timing of the most
critical paths within the slack threshold input. There is also the Congestion
View, which is a read-only view showing the most congested regions based
on wire length and pins selected.
IO Mode
IO Mode is used for I/O assignments such as DDR Interface, DQS, and clock
assignments. I/O resource utilization can be displayed by hovering and
displayed in tool tips.
Routing Mode
Routing Mode provides a read-only detailed layout of your design that
includes physical wire connections. Routed connections are displayed as
Manhattan-style lines, and unrouted connections are displayed as fly-lines.
As you move your mouse pointer slowly over the layout, the name and
location of each REGION, group, component, port, net, and site are displayed
as tool tips and also appear in the status bar. The tool tips and status bar also
display the group name for components that are members of a group.
The Routing Mode toolbar allows you to select the types of elements that will
be displayed on the layout, including components, empty sites, pin wires,
routes, and timing paths. Routing Mode is available after placement and
routing.
Timing Analyzer
Timing Analyzer analyzes timing constraints that are present in the .ldc and
.pdc files. These timing constraints are defined in the Timing Constraint Editor
or in a text editor before the design is mapped. A Timing Analysis report file,
which shows the results of timing constraints, is generated each time you run
the LSE, Map Timing Analysis process, or the Place & Route Timing Analysis
(PAR) process. Place & Routing Timing Analysis results can then be viewed
in the Timing Analyzer windows.
The Map Timing Analysis report (.tw1) contains estimated routing that can be
used to verify the expected paths and to provide an estimate of the delays
before you run Place & Route. The PAR Timing Analysis report (.twr) contains
delays based on the actual placement and routing and is a more realistic
estimate of the actual timing.
Each tab can be detached from the main window, rearranged, and resized.
When you select a constraint from the Constraint pane, you can view the path
table details on one pane, and Timing Analyzer report in the other. For
detailed information about Timing Analyzer, see User Guides > Analyzing
Static Timing in the Radiant Software Help.
See Also
“Running Standalone Timing Analyzer from the Command Line” on
page 247
To edit the location of the current .pdc file: You can add the new
constraint in the current .pdc file.
Click the Refresh button to start the timing analysis process.
To add the new constraint in the .pdc file, you can copy the text from the
timing table.
If the location of the current .pdc file is not specified, you can also choose
File > Load Timing Constraint File to specify the .pdc file and start the
timing analysis process.
Reveal Inserter
Reveal Inserter lets you add debug information to your design to allow
hardware debugging using Reveal Analyzer. Reveal Inserter enables you to
select the design signals to use for tracing, triggering, and clocking. Reveal
Inserter will automatically generate the debug core, and insert it into a
modified design with the necessary debug connections and signals. Reveal
Inserter supports VHDL and Verilog sources. After the design has been
modified for debug, it is mapped, placed and routed with the normal design
flow in the Radiant software.
For more information about Reveal Inserter, refer to the Reveal User Guide
for Radiant Software. Also, refer to User Guides > Testing and Debugging
On-Chip in the Radiant Software Help.
The following compiler directives are all enabled in the source file. You can
use the OEM simulator or any stand-alone simulator to compile and simulate
the Controller:
`define en_sw
`define en_led
`define en_user_mem
`define en_user_creg
`define en_user_sreg
The user design must include a memory block (EBR, Distributed Memory or
PMI Memory) to be able setup User Memory.
The mandatory signals in the user design to setup User Memory are:
Clock, Clock_enable, Wr_Rdn, Address, WData and RData.
3. Select signals in the Design Tree and drag the signals to the desired
position in the Setting List in the User Memory Setup tab. For help finding
signals, refer to the Radiant Software Help. See User Guides > Testing
and Debugging On-Chip > Creating Reveal Modules > About Reveal
Inserter > Searching for Signals.
4. Drag the desired signals in to the User Memory data panel to the right.
The width of the signals will automatically update between 4-32 entries at
the top.
5. Beside the title User Memory Setting, there is a check box in which
Controller function for User Memory signals can be enabled/disabled.
The user design must include the control registers as wires, which should not
have any other drivers. They should be treated as asynchronous switches as
they are changed with the JTAG clock.
2. Click the Add button. By default, a unique label is assigned to the Name
column. You can edit this label by double-clicking it.
3. Drag-and-drop the corresponding signals from Design View to the
Control Signals column.
Or
4. Select the existing row and double-click the Control Signals column.
The Edit Signals dialog box appears.
5. In the Edit Signals dialog box, do the following:
a. Choose signals from the Select Signals pane.
The user design must include status registers as wires, which should be
driven by registers to show the status of the different functional blocks of the
design. These signals are read-only.
2. Click the Add button. By default, a unique label is assigned to the Name
column. You can edit this label by double-clicking it.
3. Drag-and-drop the corresponding signals from Design View to the Status
Signals column.
Or
4. Select the existing row and double-click the Status Signals column.
The Edit Signals dialog box appears.
5. In the Edit Signals dialog box, do the following:
a. Choose signals from the Select Signals pane.
Reveal Analyzer
After you generate the bitstream, you can use Reveal Analyzer to debug your
FPGA circuitry. Reveal Analyzer gives you access to internal nodes inside the
device so that you can observe their behavior. It enables you to set and
change various values and combinations of trigger signals. After the specified
trigger condition is reached, the data values of the trace signals are saved in
the trace buffer. After the data is captured, it is transferred from the FPGA
through the JTAG ports to the PC.
For more information about Reveal Analyzer, refer to the Reveal User Guide
for Radiant Software. Also, refer to User Guides > Testing and Debugging
On-Chip in the Radiant Software Help.
The figure below shows the Eye-Opening Monitor dialog box when
debugging an Avant device. The Channel and Import options are added.
4. In the Eye-Opening Monitor dialog box, select the quality of the eye
diagram from the drop-down menu.
It is recommended to select normal or low quality for a faster result, and
select high quality for the final result. The default is normal quality.
If you are debugging Avant SerDes multiple channels, select the channel
to debug in the Channel drop-down menu.
5. Click the Run button to start the EOM process. You can stop the process
at any time by clicking the Stop button.
6. After the EOM has finished running, it will display the eye diagram for the
current channel. The figure below shows the Eye Diagram when
debugging non- Avant devices.
At the bottom of the eye diagram for non-Avant devices, you can click the
View Raw Data button to open the raw data file containing the number of
samples and errors used in calculating the density of the eye diagram.
If you change the Reveal Controller options, you can re-run the EOM to
display the new eye diagram and view the new raw data until the desired
result is achieved.
If you are debugging Avant SerDes, each time you run the EOM, the result is
automatically saved as a .txt file in the project folder. The file name provides
information on the EOM settings. For example, the file name
eom_normal_MPPHYX4Q1_L2.txt tells you that the EOM result was
generated using normal quality for the MPPHYX4Q1 instance with L2 or lane
2 as the selected channel.
Reveal Controller
Reveal Controller allows you to emulate an otherwise unavailable
environment for power debug. For example, your evaluation board would only
have a limited number of LEDs or switches but the virtual environment
enables up to 32 bits. Register memory mapping and dumping of values is
also easily manifested while visibility into Hard IP is also enabled.
For more information about Reveal Controller, refer to the Reveal User Guide
for Radiant Software. Also, refer to User Guides > Testing and Debugging
On-Chip in the Radiant Software Help.
Power Calculator
Power Calculator estimates the power dissipation for your design. It uses
parameters such as voltage, temperature, process variations, air flow, heat
sink, resource utilization, activity and frequency to calculate the device power
consumption. It reports both static and dynamic power consumption.
To launch Power Calculator from the Radiant software, choose Tools >
Power Calculator or click the Power Calculator button on the toolbar.
When Power Calculator opens, it displays the Power Summary page, which
enables you to change the targeted device, operating conditions, voltage, and
other basic parameters. Updated estimates of power consumption are then
displayed based on these changes. Tabs for other pages, including Power
Matrix, Logic Block, Clocks, I/O, I/O Term, Block RAM, Graph, and Report,
are arranged across the bottom. The number and types of these pages
depends on the target device.
For more information on Power Calculator, see User Guides > Analyzing
Power Consumption in the Radiant Software Help.
ECO Editor
The Engineering Change Order (ECO) Editor enables you to safely make
changes to an implemented design without having to rerun the entire process
flow. Choose Tools > ECO Editor or click the ECO Editor button on the
toolbar.
ECOs are requests for small changes to be made to your design after it has
been placed and routed. The changes are directly written into the Unified
Database (.udb) file without requiring that you go through the entire design
implementation process.
ECOs are usually intended to correct errors found in the hardware model
during debugging. They are also used to facilitate changes that had to be
made to the design specification because of problems encountered when
other FPGAs or components of the PC board design were integrated.
The ECO Editor includes windows for editing I/O preferences, and memory
initialization values. It also provides a Change Log window that enables you to
track the changes between the modified .udb file and the post-PAR .udb file.
Note
After you edit your post-PAR UDB file, your functional simulation and timing
simulation will no longer match.
For more information, see Reference Guides > Command Line Reference
Guide > Command Line Tool Usage > Running Various Utilities from the
Command Line > ECO Editor in the Radiant Software Help.
Programmer
The Radiant Programmer is a system for programming devices. The software
supports serial programming of Lattice devices using PC and Linux
environments. The tool also supports embedded microprocessor
programming.
For more information about Programmer and related tools, refer to the
Programming Tools User Guide for Radiant Software. Also, refer to User
Guides > Programming the FPGA in the Radiant Software or Stand-Alone
Programmer Help.
Run Manager
Run Manager runs the processes for the different implementation/strategy
combinations. Choose Tools > Run Manager or click the Run Manager
button on the toolbar.
Run Manager takes the design through the entire process flow for each
selected implementation. If you are running on a multi-core system, Run
Manager will distribute the iterations so that they are executed in parallel. The
option “Maximum implementation processes running in Run Manager” is
available in the General section of the Options dialog box. Choose Tools >
Options to access it. This option enables you to set the maximum number of
processes to run in parallel. Generally, the maximum number of processes
should be the same as the number of cores in your processor; but if the
strategy is using the “Multi-Tasking Node List” option for Place & Route
Design, this number should be set to one.
You can use the Run Manager list to set an implementation as active. Right-
click the implementation/strategy pair and choose Set as Active.
See the User Guides > Managing Projects section of the Radiant Software
Help for more information about using implementations, strategies, and Run
Manager.
You can also run Synplify Pro in interactive mode. Choose Tools > Synplify
Pro for Lattice or click the Synplify Pro button on the toolbar.
For more information, see the Synplify Pro User Guide, which is available
from the Radiant Start Page or the Synplify Pro Help menu.
Mentor ModelSim
The Mentor® ModelSim® tool is an OEM simulation tool that is closely linked
to the Radiant software environment. It is not run as part of the Process
implementation flow. To run ModelSim, choose Tools > ModelSim Lattice-
Edition or click the ModelSim button on the toolbar.
See “Simulation Flow” on page 111 for more information about simulating your
design. See “Simulation Wizard Flow” on page 111 for information about
creating a simulation project to run in ModelSim.
Simulation Wizard
The Simulation Wizard enables you to create a simulation project for your
design. To open Simulation Wizard, choose Tools > Simulation Wizard or
click on the icon in the Radiant software toolbar. The wizard leads you
through a series of steps that include selecting a simulation project name,
location, specifying the simulator type, selecting the process stage to use, and
selecting the source files. To learn more about the flow, view “Simulation
Wizard Flow” on page 111.
Source Template
Source Template provides templates for creating VHDL, Verilog, and
constraint files. Templates increase the speed and accuracy of design entry.
You can drag and drop a template directly to the source file. You can also
create your own templates. For more information, see “Source Template” on
page 33.
IP Catalog
IP Catalog is an easy way to use a collection of functional blocks from Lattice
Semiconductor. There are two types of functional blocks available through IP
Catalog: modules and IP. IP Catalog enables you to extensively customize
these blocks. They can be created as part of a specific project or as a library
for multiple projects.
Modules: These basic, configurable blocks come with IP Catalog. They
provide a variety of functions including I/O, arithmetic, memory, and more.
Open IP Catalog to see the full list of what’s available.
IP: Intellectual property (IP) are more complex, configurable blocks. They
are accessible through IP Catalog, but they do not come with the tool.
They must first be downloaded and installed in a separate step before
they can be accessed from IP Catalog.
Below are the basic steps of using IP Catalog modules and IP.
1. Open IP Catalog. IP Catalog is accessed via a tab at the lower left.of the
Radiant software. Click the tab to view the list of available modules and IP.
For more information on IP Catalog, see User Guides > Entering the Design
> Designing with Soft IP, Modules, and PMI in the Radiant Software Help.
IP Packager
IP Packager is a tool for you to create and IP package easily. You can edit
ports, files, parameters, and memory in the IP Packager, and pack a
customized IP directly.
See Also
“Running IP Packager and Viewing Documentation” on page 162
“Installing IP Created with IP Packager into IP Catalog” on page 163
To run IP Packager:
In Windows, go to the Windows Start menu and choose Programs >
Lattice Radiant Software > Accessories > IP Packager.
The IP Packager can also be run from the command line. Refer to “IP
Packager” on page 245.
See Also
“IP Packager” on page 162
“Installing IP Created with IP Packager into IP Catalog” on page 163
See Also
“IP Packager” on page 162
“Running IP Packager and Viewing Documentation” on page 162
SEI Editor
SEI (Soft Error Injection) Editor allows you to generate single-bit errors, insert
them into a bitstream, and detect them for analysis, simulating the effect of
radiation damage on the device’s configuration memory.
SEI Editor is available after you have placed and routed your design and
generated a bitstream.
Common Tasks
The Radiant software gathers the many FPGA implementation tools into one
central design environment. This gives you common controls for active tools,
and it provides shared data between views.
You can detach as many tool views as desired. The Window menu keeps
track of all open tool views and allows you to reintegrate one or all of them
with the main window or detach any of them. Those that are already
integrated are displayed with a check mark.
Tab Grouping
The Radiant software allows you to split one or more active tools into a
separate tab group. Use the Window menu or the toolbar buttons to create the
tab group and control the display.
The Split Tab Group command separates the currently active tool into a
separate tab group. Having two separate tab groups enables you to work with
two tool views side-by-side. This is especially useful for dragging and
dropping to make constraint assignments; for example, dragging a port from
Netlist View to Package View in order to assign it to a pin.
Having two separate tab groups is also useful for examining the same data
element in two different views, such as the Netlist Analyzer and Physical
Designer layouts.
Move an active tool view from one tab group to another by dragging and
dropping it, or you can use the Move to Another Tab Group command.
To switch the positions of the two tab groups, click the Switch Tab Group
Position command.
To merge the split tab group back into the main group, click the Merge Tab
Group command.
Use the mouse to quickly zoom in, out or pan graphical views, such as
Placement Mode and Routing Mode, by doing the following, as shown in
Figure 82:
Zoom In: press and hold the left mouse button while dragging the mouse
down from upper right to left to zoom in.
Zoom Out: press and hold the left mouse button while dragging the mouse
up from lower left to right to zoom out.
Zoom To: press and hold the left mouse button while dragging the mouse
down from upper left to right to zoom into the box created.
Zoom Fit: press and hold the left mouse button while dragging the mouse
up from lower right to left to reset the diagram so it fits on screen.
Pan: Click Pan ( ) and drag the mouse in any direction to move the
diagram, or press and hold Ctrl and drag the mouse.
Tool Options
For more information about Options, refer to “Environment and Tool Options”
on page 350.
This help guide contains information necessary for running the core design
flow development from the command line. For tools that appear in the Radiant
software graphical user interface, use Tcl commands to perform commands
that are described in the Tcl Command Reference Guide.
Each command line program provides multiple options for specifying device
information, applying special functions using switches, designating desired
output file names, and using command files. The programs also have
particular default behavior often precludes the need for some syntax, making
commands less complex. See Command Line General Guidelines and
Command Line Syntax Conventions.
To learn more about the applications, usage, and syntax for each command
line program, click on the hyperlink of the command line name in the section
below.
Note
Many of the command line programs described in this topic are run in the background
when using the tools you run in the Radiant software environment. Please also note
that in some cases, command line tools described here are used for earlier FPGA
architectures only, are not always recommended for command line use, or are only
available from the command line.
Placement and Routing PAR Place & Route Design Assigns physical locations
to mapped components and
creates physical
connections to join
components in an electrical
network.
Static Timing Analysis Timing Post-Synthesis Timing Generates reports that can
Report, MAP Timing Report, be used for static timing
Place & Route Timing analysis.
Report
Back Annotation Backanno Tool does not exist in the Distributes the physical
Radiant software interface design information back to
as process but employed in the logical design to
file export. generate a timing simulation
file.
See Also
Command Line Data Flow
Command Line General Guidelines
Command Line Syntax Conventions
Invoking Core Tool Command Line Programs
Topics include:
Command Line Data Flow
Command Line General Guidelines
Command Line Syntax Conventions
Setting Up the Environment to Run Command Line
Invoking Core Tool Command Line Programs
Invoking Core Tool Command Line Tool Help
See Also
Command Line Reference Guide
Command Line General Guidelines
For any Radiant software FPGA command line program, you can store
program commands in a command file. Execute an entire batch of
arguments by entering the program name, followed by the –f option, and
the command file name. This is useful if you frequently execute the same
arguments each time you execute a program or to avoid typing lengthy
command line arguments. See Using Command Files.
See Also
Command Line Reference Guide
Invoking Core Tool Command Line Tool Help
Command Line Syntax Conventions
Using Command Files
Command Line Data Flow
bold text Indicates text to be taken literally. You type this text
exactly as shown (for example, “Type autoroute -all -i
5 in the command area.”) Bold text is also used to
indicate the name of an EPIC command, a Linux
command, or a DOS command (for example, “The
playback command is used to execute the macro you
created.”).
Italic text or text enclosed in Indicates text that is not to be taken literally. You must
angle brackets <> substitute information for the enclosed text. Italic text is
also used to show a file directory path, for example,
“the file is in the /cd/data/Radiant directory”).
See Also
Command Line Reference Guide
Command Line General Guidelines
Invoking Core Tool Command Line Tool Help
Using Command Files
When running the Radiant software from the Windows command line (via
cmd.exe), you will need to add the following values to the following
environment variables:
PATH includes, for 64-bit
<Install_directory>\bin\nt64;<Install_directory>\ispfpga\bin
\nt64
Example <Install_directory>:
c:\lscc\radiant\1.0\bin\nt64;c:\lscc\radiant\1.0\ispfpga\bin
\nt64
FOUNDRY includes
set FOUNDRY= <Install_directory>\ispfpga
For Linux On Linux, the Radiant software provides a similar standalone Tcl
Console window (radiantc) that sets the environment. The user can enter Tcl
commands and core tool commands in it.
If you do not use the Tcl Console window, you need to run "bash" to switch to
BASH" first, then run the following command.
After setting up for either Windows or PC, you can run the Radiant software
executable files directly. For example, you can invoke the Place and Route
program by:
par test_map.udb test_par.udb
See Also
Invoking Core Tool Command Line Programs
Invoking Core Tool Command Line Tool Help
For any the Radiant software FPGA command line programs, you begin by
entering the name of the command line program followed by valid options for
the program separated by spaces. Options include switches (-f, -p, -o, etc.),
values for those switches, and file names, which are either input or output
files. You start command line programs by entering a command in the Linux™
or DOS™ command line. You can also run command line scripts or command
files.
SeeTable 6 on page 172 for details and links to specific information on usage
and syntax. You will find all of the usage information on the command line in
the Running FPGA Tools from the Command Line > Command Line Tool
Usage book topics.
See Also
Command Line Reference Guide
Command Line Syntax Conventions
Invoking Core Tool Command Line Tool Help
Setting Up the Environment to Run Command Line
Using Command Files
To redirect this message to a file (to read later or to print out), enter this
command:
For those FPGA family Radiant software applications that have architecture-
specific command lines (e.g., iCE UltraPlus), you must enter the application
name, -help (or -h), and the architecture to get the verbose usage message
specific to that architecture. If you fail to specify the architecture, you get a
message similar to the following:
See Also
Command Line Reference Guide
Command Line Data Flow
Command Line General Guidelines
Command Line Syntax Conventions
Setting Up the Environment to Run Command Line
Using Command Files
Topics include:
Running cmpl_libs.tcl from the Command Line
Running HDL Encryption from the Command Line
Running Synthesis from the Command Line
Running Postsyn from the Command Line
Running MAP from the Command Line
Running PAR from the Command Line
Running Timing from the Command Line
The following information is for running cmpl_libs.tcl from the command line
using the tclsh application. The supported TCL version is 8.5 or higher.
If you do not have TCL installed, or you have an older version, perform the
following:
Add <Radiant_install_path>/tcltk/windows/BIN to the front of your PATH,
and
For Linux users only, add <Radiant_install_path>/tcltk/linux/bin to the front
of your LD_LIBRARY_PATH
Note
The default version of TCL on Linux could be older and may cause the script to fail.
Ensure that you have TCL version 8.5 or higher.
Notes
If Siemens Questa is already in your PATH and preceding any Aldec tools, you can
use:
'-sim_path .' for simplification; '.' will be added to the front of your PATH.
Ensure the FOUNDRY environment variable is set. If the FOUNDRY environment
variable is missing, then you need to set it before running the script. For details,
refer to Setting Up the Environment to Run Command Line.
To execute this script error free, Siemens Questa 2020.4 or a later version should
be used for compilation.
Check log files under <target_path> (defualt = .) for any errors, as follows:
For Linux, type:
grep -i error *.log
tclsh <Radiant_install_path>/cae_library/simulation/scripts/cmpl_libs.tcl -
sim_path <sim_path> [-sim_vendor \{mentor<default>|cadence|aldec}] [-
device \{ice40up|lifcl|lfcpnx|lfd2nx|lfmxo5-25|lfmxo5-15d|lfmxo5-100t|lfmxo5-
55t|lavat|ut24c|ut24cp|all<default>}] [-target_path <target_path>]
cmpl_libs.tcl Options
Examples
Example 1
The following command will compile all the Lattice FPGA libraries for Verilog
simulation, and place them under the folder specified by -target_path. The
path to Modelsim is specified by -sim_path.
tclsh <c:/lscc/radiant/1.0/>/cae_library/simulation/script/
cmpl_libs.tcl -sim_path C:/modeltech64_10.0c/win64 -target_path
c:/mti_libs
See Also
Command Line Program Overview
The tool supports encryption of Verilog HDL and VHDL files. Per command’s
execution, single source file is encrypted.
Before running the utility, you need to annotate the HDL file with the
appropriate pragmas. Additionally, you may need to create a key file
containing an encryption key. To view the key file’s proper formating, see Key
File.
-k <keyfile> A key repository file. Depending on the location of the key, this
option is required or optional.
If the HDL source file contains no pragma, the key file is
required. The tool encrypts the entire HDL file using all key
sets declared in the key file.
If the HDL source file contains only begin and end pragmas
and no key pragmas, the key file is required. The tool
encrypts the section between begin and end using all key
sets declared in the key file.
If the HDL source file contains the proper key pragma,
key_keyowner, key_keyname, but the key file is missing the
provided key_public_key, the tool fetches the first public key
string matching the key_keyowner and key_keyname
requirement in the key file
If the HDL source file contains the proper definition of key, this
option is not required.
NOTE: If the same key name is defined in both, HDL source file
and key.txt file, the key defined in HDL source file has a
precedence.
Examples
This section illustrates and describes a few examples of HDL encryption using
Tcl command.
Example1:
This example shows a successful encryption of HDL file with default options.
It is assumed that key is properly defined in HDL file. Since output file name
was not specified, the tool generates an output file <file_name>_enc.v in the
same directory as the location of the input file.
Example2:
Example3:
This example shows unsuccessful HDL encryption due to a missing key file.
To correct this issue, the user must either define the appropriate key file
key.txt or annotated the HDL file with appropriate pragmas. To correct the
issue, define the key either in key.txt file or directly in HDL source file.
NOTE
A key is always required in the encryption tool while key file is optional. If the
complete key: key_keyowner, key_keyname, key_method, and
key_public_key, is defined within HDL source file, key file is not required.
For specific steps and information on how to encrypt HDL files in the Radiant
software, refer to the following section in the Radiant Software Help: User
Guides > Securing the Design.
Defining Pragmas
Pragmas are used to specify the portion of the HDL source file that must be
encrypted. Pragma’ definition is compliant with IEEE 1735-2014 V1 standard.
key_keyname string The RSA key name to specify the private key.
To encrypt HDL source file, encryption version, encoding type, and key
specific pragmas must be defined in the HDL source file by HDL designer;
only the content within the pragmas is encrypted.
NOTE
Multiple key sets can be declared in a single key file.
See Also
Running HDL Encryption from the Command Line
Key File
Key File
The key repository file defines the cryptographic public key used for RSA
encryption. In Radiant software, the key file contains Lattice public key.
Additionally, it may contain some of the common EDA vendors public keys.
NOTE
If using Synplify Pro synthesis tool, both, the Lattice Public Key and the Synplify Pro
Public Key must be defined in the key file. The Synplify Pro Public Key is used during
the synthesis step to decrypt an encrypted design. The Lattice Public Key is used
during the post-synthesis flow to decrypt an encrypted design.
The key file typically also contains the data_method pragma. It defines the
algorithm used in data block encryption of HDL source file.
See Also
Running HDL Encryption from the Command Line
Defining Pragmas
Verilog source files are passed to the program using the -ver option and
VHDL source files are passed using the -vhd option. For mixed language
designs the language type is automatically determined by synthesis based on
the top module of the design. For IP design, you must also specify IP location
(-ip_dir), IP core name (-corename), and encrypted RTL file name (-
ertl_file).
Running Synthesis Synthesis will convert your input netlist (.v) file into a
structural Verilog file that is used for the remaining mapping process.
To run synthesis, type synthesis on the command line with valid options.
A sample of a typical synthesis command would be as follows:
There are many command line options that give you control over the way
synthesis processes the output file. Please refer to the rest of the subjects in
this topic for more details. See examples.
Synthesis Options
The table below contains descriptions of all valid options for synthesis.
Table 10:
Table 11: Command Line Options
Option Description
-optimization_goal <area The synthesis tool allows you to choose among the
| timing (default)> following optimization options:
balanced balances the levels of logic.
-force_gsr <no(default) | Enables (yes) or disables (no) forced use of the global
yes> set/reset routing resources. When the value is auto, the
synthesis tool decides whether to use the global set/
reset resources.
Table 10:
Table 11: Command Line Options
Option Description
Table 10:
Table 11: Command Line Options
Option Description
-output_hdl <filename.v> Specifies the name of the output Verilog netlist file.
-loop_limit Specifies the iteration limits for “for” and “while” loops in
<max_loop_iter_cnt the user RTL for loops that have the loop index as a
(default 1950)> variable and not a constant.
The higher the loop_limit, the longer the run time. Also,
for some designs, a higher loop limit may cause stack
overflow during some of the optimizations during
compile/synthesis.
The default value is 1950. Setting a higher value may
cause stack overflow during some of the optimizations
during synthesis.
Table 10:
Table 11: Command Line Options
Option Description
-mux_style <auto(default) Specifies the MUX style setting, which controls the way
| pfu_mux | L6Mux_single | the macrogenerator implements the multiplexer macros.
L6Mux_multiple>
Valid options are auto, L6Mux Multiple, L6Mux Single,
and PFU Mux. The default value is auto, meaning that
the tool looks for the best implementation.
Table 10:
Table 11: Command Line Options
Option Description
-ifd Sets option to dump intermediate files. If you run the tool
with this option, it will dump about 20 intermediate
encrypted Verilog files. If you supply Lattice with these
files, they can be decrypted and analyzed for problems.
This option is good to for analyzing simulation issues.
Examples
The following are examples of synthesis command lines and their respective
description:
-use_io_insertion 1
-sdc "C:/my_radiant_tutorial/impl1/impl1.ldc"
-ver "C:/my_radiant_tutorial/impl1/source/LED_control.v"
"C:/my_radiant_tutorial/impl1/source/spi_gpio.v"
"C:/my_radiant_tutorial/impl1/source/spi_gui_led_top.v"
-path "C:/my_radiant_tutorial"
-top spi_gui_led_top
-output_hdl "LEDtest_impl1.vm"
See Also
Command Line Program Overview
Table 12:
Option Description
Table 12:
Option Description
See Also
Command Line Program Overview
Running MAP
MAP uses the database (.udb) file that was the output of the Synthesis
process and outputs a mapped Unified Database (.udb) file with constraints
embedded.
To run MAP, type map on the command line with, at minimum, the
required options to describe your target technology (i.e., architecture,
device, package, and peformance grade), the input .udb along with the
input .ldc file. The output .udb file specified by the -o option. That
additional physical constraint file (*.pdc) can be applied optionally. A
sample of a typical MAP command would be as follows:
map counter_impl1_syn.udb impl1.pdc -o counter_impl1.udb
Note
The -a (architecture) option is not necessary when you supply the part number with the
-p option. There is also no need to specify the constraint file here, but if you do, it must
be specified after the input .udb file name. The constraint file automatically takes the
name “output” in this case, which is the name given to the output .udb file. If the output
file was not specified with the -o option as shown in the above case, map would place
a file named input.udb into the current working directory, taking the name of the input
file. If you specify the input.ldc file and it is not there, map will error out.
There are many command line options that give you control over the way
MAP processes the output file. Please refer to the rest of the subjects in this
topic for more details.
MAP Options
The table below contains descriptions of all valid options for MAP.
Examples
Example 1
The following command maps an input database file named mapped.udb and
outputs a mapped Unified Database file named mapped.udb.
See Also
Command Line Data Flow
Command Line Program Overview
Running PAR
PAR uses your mapped Unified Database (.udb) file that were the outputs of
the Map Design process or the map program. With these inputs, par outputs
a new placed-and-routed .udb file, a PAR report (.par) file, and a PAD
(specification (.pad) file that contains I/O placement information.
To run PAR, type par on the command line with at minimum, the name of
the input .udb file and the desired name of the output .udb file. Design
constraints from previous stages are automatically embedded in the input
.udb file, however the par program can accept additional constraints with
either a .pdc or .sdc file. A sample of a basic PAR command would be as
follows:
There are many command line options that give you control over PAR. Please
refer to the rest of the subjects in this topic for more details.
Note
All filenames without special switches must be in the order <infile> <outfile> <pdcfile>.
Options may exist in any order.
General Options
-s Save "n" best results for this run. Default: Save All.
Example 1
The following command places and routes the design in the file input.udb and
writes the placed and routed design to output.udb.
Example 2
The following command runs 20 place and route iterations. The iterations
begin at cost table entry 5. Only the best 3 output design files are saved.
Example 3
(Lattice FPGAs only) This is an example of par using the -io switch to
generate .udb files that contain only I/O for viewing in the PAD Specification
file for adjustment of ldc_set_location constraints for optimal I/O placement.
You can display I/O placement assignments in the Radiant Spreadsheet View
and choosing View > Display IO Placement.
This section provides information about environment setup, node list file
creation, and step-by-step instructions for running the PAR Multi-tasking (-m)
option from the command line. The PAR -m option allows you to use multiple
machines (nodes) that are networked together for a multi-run PAR job,
significantly reducing the total amount of time for completion. Before the multi-
tasking option was developed, PAR could only run multiple jobs in a linear or
serial fashion. The total time required to complete PAR was equal to the
amount of time it took for each of the PAR jobs to run.
tells PAR to run 10 place and route passes (-n 10). It runs each of the 10 jobs
consecutively, generating an output .udb file for each job, i.e., output_par.dir/
5_1.udb, output_par.dir/5_2.udb, etc. If each job takes approximately one
hour, then the run takes approximately 10 hours.
Suppose, however, that you have five nodes available. The PAR Multi-tasking
option allows you to use all five nodes at the same time, dramatically reducing
the time required for all ten jobs.
You must use the format above for the node list file and fill in all required
parameters. Parameters are case insensitive.The node or machine
names are given in square brackets on a single line.
The System parameter can take linux or pc values depending upon your
platform. However, the PC value cannot be used with Linux because it is
not possible to create a multiple computer farm with PCs. Corenum refers
to the number of CPU cores available. Setting it to zero will disable the
node from being used. Setting it to a greater number than the actual
number of CPUs will cause PAR to run jobs on the same CPU lengthening
the runtime.
The Env parameter refers to a remote environment setup file to be
executed before PAR is started on the remote machine. This is optional. If
If the design can be found then the current directory is already available.
2. Now run the job from the command line as follows:
par -m nodefile_name -n 10 mydesign.udb output.udb
Note
If you attempt to use the multi-tasking option and you have specified only one
placement iteration, PAR will disregard the -m option from the command and run
the job in normal PAR mode. In this case you will see the following message:
WARNING - par: Multi task par not needed for this job. -m switch will be ignored.
The executables required on the machines defined in the node list file are as
follows:
/bin/sh
par (must be located through the PATH variable)
To determine if everything is set up correctly, you can run the ssh command
to the nodes to be used.
If you get the usage message back on your screen, everything is set correctly.
Note that depending upon your setup, this check my not work even though
your status is fine.
If you have to set up your remote environment with the proper environment
variables, you must create a remote shell environment setup file. An example
of an ASCII file used to setup the remote shell environment would be as
follows for ksh users:
export FOUNDRY=<install_directory>/ispfpga/bin/lin64
export PATH=$FOUNDRY/bin/lin64:$PATH
export LD_LIBRARY_PATH=$FOUNDRY/bin/lin:$LD_LIBRARY_PATH
64
Screen Output
When PAR is running multiple jobs and is not in multi-tasking mode, output
from PAR is displayed on the screen as the jobs run. When PAR is running
multiple jobs in multi-tasking mode, you only see information regarding the
current status of the feature.
For example, when the job above is executed, the following screen output
would be generated:
Starting job 5_1 on node NODE1
Starting job 5_2 on node NODE2
Starting job 5_3 on node NODE3
Starting job 5_4 on node NODE4
Starting job 5_5 on node NODE5
See Also
User Guides > Implementing the Design in the Radiant Software Help
Command Line Data Flow
Command Line Program Overview
Timing checks the delays in the Unified Design Database (.udb) file against
your timing constraints. If delays are exceeded, Timing issues the appropriate
timing error. See “Implementing the Design” in the Radiant Software Help and
associated topics for more information.
Running Timing
Note
The above command automatically generates the report file named design.twr which is
based on the name of the .udb file.
There are several command line options that give you control over the way
Timing generates timing reports for analysis. Please refer to the rest of the
subjects in this topic for more details. See Examples.
Command Line Syntax timing <udb file name> [ -sdc <sdc file name> ]
[ -hld | -sethld ] [ -o <output file name> ] [ -v <integer> ] [-endpoints
<integer>] [-help]
Timing Options
The following tables contain descriptions of all valid options for Timing.
Examples
Example 1
Example 2
The following command produces a file listing all delay characteristics for the
design named design1.udb. Timing constraints contained in the file group1.prf
are the timing constraints for the design. The file output.twr is the name of the
verbose report file.
Example 3
The following command analyzes the file design1.udb and reports on the
three worst errors for each constraint embedded in design1.udb and in
additional timing constraint file (e.g. test.ldc). The report is called design1.twr.
Example 4
Example 5
unspecified here, a file using the root name of the .udb file (i.e., design1.twr)
will be output by default.
See Also
Command Line Program Overview
Command Line Data Flow
Running Backanno
Note
The above command back annotates backanno.udb and generates a Verilog file
backanno.v and an SDF file backanno.sdf. If the target files already exist, they will not
be overwritten in this case. You would need to specify the -w option to overwrite them.
There are several command line options that give you control over the way
backanno generates back-annotated netlists for simulation. Please refer to
the rest of the subjects in this topic for more details.
backanno [-w] [-pre <prfx>] [-sp <grade>] [-neg] [-pos ] [-sup] [-min] [-x] [-fc
] [-slice] [-slice0] [-slice1] [-noslice] [-t] [-dis [<del>]] [-m [<limit>]] [-u] [-i] [-
nopur] [-l <libtype>] [-s <separator>] [-o <verilog<<.v>>] [-d <delays[.sdf]>] [-
gui] [-msg <msglogfile>] [-msgset <msgtypefile>] [<udbfile>]
Backanno Options
The table below contains descriptions of all valid options for backanno.
Examples
Example 1
Example 2
Example 3
Example 4
The following command generates Verilog netlist and SDF files without setting
the negative setup/hold delays to 0:
backanno -neg -n verilog design.udb
See Also
Command Line Program Overview
Command Line Data Flow
Running BITGEN
BITGEN uses your input, fully placed-and-routed Unified Database (.udb) file
to produce bitstream (.bit, .msk, or .rbt) for device configuration.
To run BITGEN, type bitgen on the command line with, at minimum, the
bitgen command. There is no need to specify the input .udb file if you run
bitgen from the directory where it resides and there is no other .udb
present.
There are several command line options that give you control over the way
BITGEN outputs bitstream for device configuration. Please refer to the rest of
the subjects in this topic for more details.
bitgen [-d] [-w] [-m <format>] [-g <opt:val>] [-f <*.t2b>] [-s <*.secproj>] {-site
<seirule>} {-site <seitype>} <infile> [<outfile>]
BITGEN Options
The table below contains descriptions of all valid options for BITGEN.
Note
Many BITGEN options are only available for certain architectures. Please use the
bitgen -h <architecture> help command to see a list of valid bitgen options for the
particular device architecture you are targeting.
-d Disable DRC.
-spilowpower SPI flash low power mode. Places the PROM in low-
power mode after configuration.
This option is applicable only when the iCE40UP
device is used as SPI Controller Mode for
configuration.
Table 20: BITGEN Command Line Options (all devices except iCE40UP)
Option Description
-d Disable DRC.
Example 1
The following command tells bitgen to overwrite any existing bitstream files
with the -w option, prevents a physical design rule check (DRC) from running
with -d, specifies a raw bits (.rbt) file output with -b. Notice how these three
options can be combined with the -wdb syntax.
bitgen -wdb <design.udb>
Example 2
There are two command line options to set the SEI Editor tool with the
following examples:
1-bit Error Injection
Unused
bitgen –w -ebit 1 –sei unused –site PFU des.udb
des_partial.bit
Random
bitgen –w -ebit 1 –sei random - des.udb des_partial.bit
Unused
bitgen –w -ebit 2 –sei unused –site DSP des.udb
des_partial.bit
Note
The <other options> option, does not support compressed or encrypted partial
bitstream, and if it includes “-b”, it generates an ASCII bitstream output file.
See Also
Command Line Program Overview
Command Line Data Flow
There are several command line options that give you control over the way
PGRCMD programs devices. Please refer to the rest of the subjects in this
topic for more details.
PGRCMD Options
Help (Optional)
Option Description
Option Description
-infile filename.xcf Specifies the chain configuration file (.xcf). If the file path includes spaces, enclose the
path in quotes.
Option Description
Option Description
Option Description
Option Description
-portaddress FTUSB-0 ... FTDI based demo board or FTDI USB2 cable
FTUSB-15 number 0 through 15
Default is EZUSB-0 and FTUSB-0. Only valid with the USB port cables.
Option Description
-TCK 0, 1, 2, 3, 4, ,5 ,6 7, 8, 9, 0 = 30 Mhz
10
1 = 15 Mhz (default)
2 = 10 Mhz
3 = 7.5 Mhz
4 = 6 Mhz
5 = 5 Mhz
6 = 4 Mhz
7 = 3 Mhz
8 = 2 Mhz
9 = 1 Mhz
10 = 900 Khz
Calculation formula for USB-2B (2232H FTDI USB host chip): Frequency = 60
MHz / (1 + ClockDivider) *2
Calculation formula for USB-2B (2232D FTDI USB host chip): Frequency = 12
MHz / (1 + ClockDivider) *2
Return Codes
Code Definition
0 Success
-4 NT driver error
Code Definition
Examples
See Also
Command Line Data Flow
Command Line Program Overview
Note
If you use the Deployment Tool GUI, the correct command line for the operation you
are performing will be displayed in the GUI in the “Step 4 of 4 - Generate Deployment”
dialog box. The command line is also recorded in the Deployment Project File (*.ddt).
You can view the Deployment Project File with a text editor and view or copy the
command line.
Running DDTCMD
DDTCMD allows you to convert data files to other formats for one device at a
time and devices in a chain. DDTCMD can also use the data files it produces
to generate other data file formats.
There are several command line options that give you control over the way
DDTCMD converts data files. Please refer to the rest of the subjects in this
topic for more details.
<install_path>\ddtcmd
[ -h] |
-oft <-bit | rbt >
[ -dev <Device Name> ]
-if "<Data File Path>"
[ -of "<Data File Path>"]
[ -compress <on | off>]
[ -verifyid <on | off> ]
[ -freq ]
[ -crc <frame | global>]
[ -mirror]
[ -header]
[ -secure <on | off>]
[ -overwriteues on <Hex Value>]
[ -encryption -key hex <Valid Key Value>
-config_mode <slave_scm | slave_pcm | jtag | spi | spim |
master_pcm | slave_spi>]
|
-oft <-int | mot | xtek>
[ -dev <Device Name> ]
-if "<Data File Path>"
[ -of "<Data File Path>"]
[ -compress <on | off>]
[ -verifyid <on | off> ]
[ -freq ]
[ -crc <frame | global>]
[ -mirror]
[ -header]
[ -secure <on | off>]
[ -skipverify]
|
-oft -stpchain
-if "<Data File Path>"
[ -of "<Data File Path>"]
[ -nocompress]
[ -print]
[ -skipverify]
|
oft -ate
-if "<Data File Path>"
[ -of "<Data File Path>"]
-type <tst | gr | hp3070 | hp3065 | t1800 | t200>
[ -ispdcd]
[ -skipverify]
[ -headerfile <file path>]
[ -splitfile [ -init] [ -vectors <# vectors/file>] [ -splitatlow]]
|
-oft -fullvme
-if "<Data File Path>"
[ -of "<Data File Path>"]
[ -maxdata <8 | 16 | 32 | 64 | 128 | 256>]
[ -hex]
[ -nocompress]
[ -compact]
[ -fixedpulse]
[ -verifyues]
[ -noheader]
[ -comment]
|
-oft -slimvme
-if "<Data File Path>"
[ -ofa <Algorithm File Path>]
[ -ofd "<Data File Path>"]
[ -nocompress]
[ -hex]
|
-oft -sspi
-if "<Data File Path>"
[ -ofa <Algorithm File Path>]
[ -ofd "<Data File Path>"]
[ -nocompress]
[ -hex]
[ -op <Operation>]
|
-oft -i2c
-if "<Data File Path>"
[ -ofa <Algorithm File Path>]
[ -ofd "<Data File Path>"]
[ -nocompress]
[ -hex]
[ -op <Operation>]
-address <80 | (User Specified)>
[ -comment]
[ -fixedpulse]
|
-oft -cpu
-if "<Data File Path>"
[ -of "<Data File Path>"]
- type <cpu | c | hex | txt>
[ -verify]
[ -comment]
[ -nocompress]
[ -mirror]
|
-oft -boot
[ -dev <Device Name>]
-golden "<Data File Path>"
-primary "<Data File Path>"
-format <int | mot | xtek>
[ -of "<Data File Path>"]
-flashsize <1 | 2 | 4 | 8 | 16 | 32 | 64 | 128 | 256>
[ -protect]
[ -mirror]
[ -header]
[ -preamble]
[ -optimize] [ -fast | -dualio | -quad 1]
[ -asc <1 | 2 | 3 | 4 | 5 | 6 | 7 | 8>
-ascfile “<Data File Path>”
[ -ascfile “<Data File Path>”] … [ -ascfile “<Data File Path>”]]
|
-oft -jed
-if “<Data File Path>”
[ -dev <Device Name>]
[ -of “<Data File Path>”]
[ -overwriteues <on "<hex value>" | checksum | disable>]
[ -comment “<Header File Path>”]
[ -encryption -key hex “<valid key value>”]
|
-oft -advanced
[ -dev <Device Name>]
-if “<Data File Path>”
-format <int | mot | xtek>
[ -of “<Data File Path>”]
-flashsize <512 | 1 | 2 | 4 | 8 | 16 | 32 | 64 | 128 | 256 | 513>
[ -mirror]
[ -header]
[ -optimize]
[ -preamble]
[ -userdata <1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16>
-usermirror
-userfile “<Data File Path>”
-address <hex address value>
[ -userfile “<Data File Path>”
-address <hex address value>] ...
[ -userfile “<Data File Path>”
-address <hex address value>]]
DDTCMD Options
Option Description
-h Displays the Deployment Tool command line usage in the terminal or DOS window.
Option Description
Option Description
Option Description
Option Description
-int (cont.) -config_mode <slave_scm | slave_pcm | jtag | spi | spim | master_pcm | slave_spi>]:
Selects the appropriate configuration mode for the bitstream encryption. Valid for
LatticeECP2S/MS and LatticeECP3 devices only.
-address <hex address> Specifies the starting address of the memory device to store
the input file.
-fast: Using this option, the FPGA will issue the Fast Read command (0x0B) to the SPI
Flash, instead of the Slow Read command (0x03). Valid for ECP5.
Option Description
-mot (cont.) -overwriteues on: Overwrites (or replaces) the USERCODE value contained in the input
file with the hex value passed in.
Note: The encryption software patch must be installed before using the following -
encryption -key and -config_mode commands.
-encryption -key hex <Valid Key Value>: Encrypts the input file using the -key 128-bit
encryption key.
-config_mode <slave_scm | slave_pcm | jtag | spi | spim | master_pcm | slave_spi>]:
Selects the appropriate configuration mode for the bitstream encryption. Valid for
LatticeECP2S/MS and LatticeECP3 devices only.
-address <hex address> Specifies the starting address of the memory device to store
the input file.
-fast: Using this option, the FPGA will issue the Fast Read command (0x0B) to the SPI
Flash, instead of the Slow Read command (0x03). Valid for ECP5.
Option Description
-xtek (cont.) -mirror: Flips each byte. Default: bytes are not flipped (optional).
-header: Retains the input file header in the output file. Default: Replaces header with all
ones (0xFF) (optional).
-secure <on | off>: Specifies program security (optional). On: Programs the Security Fuse
(blocks read back). Off: Does not program the Security Fuse (allows read back).Default
uses the settings of the input file.
overwriteues on: Overwrites (or replaces) the USERCODE value contained in the input
file with the hex value passed in.
Note: The encryption software patch must be installed before using the following -
encryption -key and -config_mode commands.
-encryption -key hex <Valid Key Value>: Encrypts the input file using the -key 128-bit
encryption key.
-config_mode <slave_scm | slave_pcm | jtag | spi | spim | master_pcm | slave_spi>]:
Selects the appropriate configuration mode for the bitstream encryption. Valid for
LatticeECP2S/MS and LatticeECP3 devices only.
-address <hex address> Specifies the starting address of the memory device to store
the input file.
-fast: Using this option, the FPGA will issue the Fast Read command (0x0B) to the SPI
Flash, instead of the Slow Read command (0x03). Valid for ECP5.
Option Description
Option Description
-stpchain Generate Standard Test and Programming Language (STAPL) file for a chain of devices.
-if <Data File Path>: Indicates the input data file full path and file name. If the file path
includes spaces, enclose the path in quotes.
-of "<Data File Path>": Indicates the output file path. If the file path includes spaces,
enclose the path in quotes. Optional. Default uses the input file name with *.stp extension.
-nocompress: < ON | OFF >: Generates a compressed or uncompressed STAPL file.
Default is ON.
-print < ON | OFF >: Generates a STAPL file with all the comment statements. Default is
OFF.
-skipverify: < ON | OFF >: Generates a STAPL file without the Verify portion (optional).
Option Description
Option Description
Option Description
-boot (cont.) -protect: Inserts the Golden File at the beginning of the upper half of the SPI flash
(optional). This allows the upper half of the SPI flash to be write-protected, which protects
the Golden File from accidental erase or reprogram.
-mirror: Flips each byte. Default: bytes are not flipped (optional).
-header: Retains the input file header in the output file. Default: Replaces header with all
ones (0xFF) (optional).
-preamble: Replaces the header Preamble of the primary bitstream with 0xFFs (for Fail
Safe Upgrade feature) (optional).
-optimize: Uses the files size of the input files to determine SPI flash sector addresses for
each input file. Use this option to minimize wasted memory space. The default is to use
worst case file size fo the target device, which is an uncompressed file with all EBR and
PCS, depending on the family. Using the worst case will ensure that all files will always be
located at the same address even if any of the files/designs are updated at a later date.
-asc <1 | 2 | 3 | 4 | 5 | 6 | 7 | 8> Indicates the number of ASC devices connected to the
MachXO2 or Platform Manager 2 device. The maximum number that can be used with
the MachXO2 device is 8. The maximum number that can be used with the Platform
Manager 2 device is 7. The input JEDEC file and the ASC Hex files will be merged into
one Hex file that can be programmed into an external SPI Flash device for Dual Boot
support. Optional.
-ascfile "<Data File Path>": Specifies the ASC Hex file path and name. If the file path
includes spaces, enclose the path in quotes. There must be one "-ascfile" and path for
each ASC specified by the "-asc" Optional.
<-fast | -dualio | -quad 1>: With the -fast option, the FPGA will issue the Fast Read
command (0x0B) to the SPI Flash. The -dualio option must be used if a Dual I/O SPI
Flash is used. The -quad 1 option must be used if a Quad I/O SPI Flash is used. Only one
of these options (-fast, -dualio, -quad 1) can be used. Without any of these options, the
FPGA uses the Slow Read command (0x03). Valid for ECP5.
-encryption -key hex <Valid Key Value>: Encrypts the input file using the -key 128-bit
encryption key.
Option Description
Option Description
Option Description
-advanced (cont.) -multi <1 | 2 | 3 | 4> Optional. The -multi option selects Multiple Boot. The number selects
the number of alternate files. Must be used in conjunction with Dual Boot, since dual boot
is a subset of Multiple Boot feature. The Golden file must also be selected. The data file
passed in using the -if option is considered the Primary file.
-golden "<Data File Path>" Indicates the Golden file path and file name.
-altfile “<Data File Path>” Indicates the alternate file path and name. Must specify the
alternate file for each number following the -multi option.
-address <hex address value> SPI Flash address location for the alternate file. Must be
specified for each alternate file (-altfile).
-next <primary | alt1 | alt2 | alt3 |alt4> Indicates which will be the next pattern to boot from
when the PROGRAMN pin is toggle, or the Refresh command is issued. Must be
specified for each alternate file (-altfile).
-merge -ifdev1 “<Data File Path>” Indicates the input dta file full path and file name for the first
device in the chain. If the file path includes spaces.
-ifdev2 “<Data File Path>” “Second device in the chain.”
-format < intel | motorola | xtek >: Specifies the output format as Intel, Motorola, or
Tektronix Extended Hex. The default format is Intel Hex (optional).
-of "<Data File Path>": Indicates the output file path. If the file path includes spaces,
enclose the path in quotes (optional). Default uses the input file name with *.mcs. *.exo, or
*.xtek extension, depending on the format selected.
-mergeformat <intelligent | combine> Intelligent merge will set the appropriate bits in the
bitstream to support sysCONFIG Daily Chaining. Combine will merge the two files without
changing any bits in the bitstreams.
-freq: Specifies the frequency of the master bitstream.
Possible frequencies valid for LatticeEC/P, LatticeECP2/M, LatticeECP3, and LatticeXP/2
devices only are: 2.5, 4.3, 5.4, 6.9, 8.1, 9.2, 10, 13, 15, 20, 26, 30, 34, 41, 45, 51, 55, 60,
and 130 MHz.
Possible frequencies valid for for MachXO2 and MachXO3L devices only are: 2.1, 2.5,
3.2, 4.3, 5.5, 7, 8.3, 9.2, 10, 13, 15, 20, 27, 30, 33, 38, 44, 53, 66, 89, and 133 MHz.
Possible frequencies valid for for ECP5 devices only are: 2.4, 3.2, 4.1, 4.8, 6.5, 8.2, 9.7,
12.9, 15.5, 16.3, 19.4, 20.7, 25.8, 31, 34.4, 38.8, 44.3, 51.7, 62, 77.5, 103.3, and 155
MHz.
-scoutput <dout | qout>: For LatticeSC/M devices, indicates if the output pin is Dout or
Qout.
-mirror: Flips each byte. Default: bytes are not flipped (optional).
-header: Retains the input file header in the output file. Default: Replaces header with all
ones (0xFF). Optional.
Option Description
Tester Examples:
ATE - GenRad:
ATE - HP3070:
ATE - HP3065:
I2C Embedded:
Return Codes
Code Definition
0 CMD_SUCCESS
-1 ERROR_LOG_FILE
-2 OUT_MEMORY
-3 CANNOT_WRITE_DIRECTORY
-4 ERROR_CONFIGURATION_SETUP
-5 DEVICE_NAME_NOT_FOUND
-6 FILE_NOT_FOUND
-7 FILE_NOT_VALID
-8 UNKNOWN_OPERATION
-9 TOO_MANY_CHIPS
-10 FILE_NOT_JEDEC
-11 ERROR_OUTPUT_FILE
-12 OPERATION_NOT_SUPPORT
-13 FILE_NAME_ERROR
-14 FILE_READ_ERROR
-15 ERROR_BUILD_SVP_FILE
-16 ERROR_BUILD_BJD_FILE
-17 ERROR_BUILD_SVF_FILE
-18 CANNOT_WRITE_LOG_FILE
-19 MISSING_START_FILE
-20 UNKNOWN_DEVICE
-21 ERRROR_BUILD_BIT_FILE
-22 MULTIPLE_DEVICES_FOUND
-23 DEVICE_NOT_MATCH_FILE
-24 ERROR_COMMAND_LINE_SYNTAX
-25 ERROR_BUILD_ISC_FILE
-26 ERROR_BUILD_SPLIT_BITSTREAM_FILE
-27 ERROR_BUILD_MERGE_BITSTREAM_FILE
-28 ERROR_INPUT_FILE
-29 ERROR_BUILD_BITSTREAM_FILE
-30 ERROR_BUILD_JED_FILE
Code Definition
-31 ERROR_BUILD_PROM_FILE
-32 DEVICE_NOT_SUPPORTED
See Also
Command Line Data Flow
Command Line Program Overview
Note
For information on commonly-used FPGA command line tools, see Command Line
Basics.
Synpwrap
The synpwrap command line utility (wrapper) is used to manage Synplicity
Synplify and Synplify Pro synthesis programs from the Radiant software
environment processes: Synplify Synthesize Verilog File or Synplify
Synthesize VHDL File.
The synpwrap utility can also be run from the command line to support a
batch interface. For details on Synplify see the Radiant Software Help. The
synpwrap program drives synplify_pro programs with a Tcl script file
containing the synthesis options and file list.
Note
This section supersedes the “Process Optimization and Automation” section of the
Synplicity Synplify and Synplify Pro for Lattice User Guide.
This section illustrates the use of the synpwrap program to run Synplify Pro
for Lattice synthesis scripts from the command line. For more information on
synthesis automation of Synplify Pro, see the “User Batch Mode” section of
the Synplicity Synplify and Synplify Pro for Lattice User Guide.
If you use Synplify Pro, the Lattice OEM license requires that the command
line executables synplify_pro be run by the Lattice “wrapper” program,
synpwrap.
-int <prj_file> Same as the -gui and -prj <file> options. Invokes Synplify
GUI with project per command file.
-nolog Does not print out the log file after the process is finished
if there is no error (batch mode only).
-prj <project_file> Uses Synplify .prj file instead of the command file
(recommended).
Example
See Also
Command Line Program Overview
Command Line Data Flow
IP Generation
The IP generation command allows you to generate or update existing IPs in
the design.
See Also
Command Line Program Overview
Command Line Data Flow
IP Packager
The IP Packager (ippkg) tool can be run from the command line, allowing IP
developers to select files from disks and pack them into one IPK file.
-metadata_files Location of the file which stores the metadata files. One
line is a file path in specified file. Must have a file named
metadata.xml.
Example
See Also
Command Line Program Overview
Command Line Data Flow
ECO Editor
The ECO Editor tool can be run from the command line too.
ECO Editor is also able to dump the ECO TCL commands which user acted in
GUI view without saving any UDB file.
In the meanwhile, we will have one non-GUI ECO engine tool, it accepts the
dumped TCL script file with a UDB file and output a new UDB file.
User can set ‘Place & Route design‘ milestone post-script by Tcl command
prj_set_postscript par <eco.tcl>, then Radiant flow runs the ECO Tcl script
automatically after running place & route.
Example
See Also
Command Line Program Overview
Command Line Data Flow
Example
See Also
Command Line Program Overview
Command Line Data Flow
Here are some guidelines when you should observe when creating command
files:
Arguments (executables and options) are separated by space and can be
spread across one or more lines within the file.
Place new lines or tabs anywhere white space would otherwise be
allowed on the Linux or DOS command line.
Place all arguments on the same line, or one argument per line, or any
combination of the two.
There is no line length limitation within the file.
The –f Option
Use the –f option to execute a command file from any command line tool. The
–f option allows you to specify the name of a command file that stores and
then executes commonly used or extensive command arguments for a given
FPGA command line executable tool. You can then execute these arguments
at any time by entering the Linux or DOS command line followed by the name
of the file containing the arguments. This can be useful if you frequently
execute the same arguments each time you perform the command, or if the
command line becomes too long. This is the recommended way to get around
the DOS command line length limitation of 127 characters. (Equivalent to
specifying a shell Options file.)
par -f <command_file>
where:
where:
Here are some guidelines when you should observe when creating shell
scripts:
It is recommended that all shell scripts with “#!” followed by the path and
name of the target shell on the first line, for example, #!/bin/ksh. This
indicates the shell to be used to interpret the script.
It is recommended to specify a search path because oftentimes a script
will fail to execute for users that have a different or incomplete search
path. For example:
PATH=/home/usr/lsmith:/usr/bin:/bin; export PATH
Arguments (executables and options) are separated by space and can be
spread across one or more lines within the file.
Place new lines or tabs anywhere white space would otherwise be
allowed on the Linux command line.
Place all arguments on the same line, or one argument per line, or any
combination of the two.
There is no line length limitation within the file.
Using shell scripts can be advantageous in terms of saving time for tasks that
are often used, in reducing memory usage, giving you more control over how
the FPGA design flow is run, and in some cases, improving performance.
Scripts for the PC are referred to as batch files in the DOS environment and
the common practice is to ascribe a .bat file extension to these files. Just like
Linux shell scripts, batch files are interpreted as a sequence of commands
and executed. The COMMAND.COM or CMD.EXE (depending on OS)
program executes these commands on a PC. Batch file commands and
operators vary from their Linux counterparts. So, if you wish to convert a shell
script to a DOS batch file or vice-versa, we suggest you find a good general
reference that shows command syntax equivalents of both operating systems.
Examples
Architecture: iCE40UP
Device: iCE40UP3K
Package: UWG30
-romstyle auto
-dsp_utilization 100
-use_dsp 1
-use_carry_chain 1
-carry_chain_length 0
-force_gsr Auto
-resource_sharing 1
-propagate_constants 1
-remove_duplicate_regs 1
-mux_style Auto
-max_fanout 1000
-fsm_encoding_style Auto
-twr_paths 3
-fix_gated_clocks 1
-loop_limit 1950
-use_io_reg auto
-use_io_insertion 1
-resolve_mixed_drivers 0
-sdc "impl1.ldc"
-path "C:/lscc/radiant/1.0/ispfpga/ice40tp/data" "impl1"
-ver "C:/lscc/radiant/1.0/ip/pmi/pmi.v"
-ver "count_attr.v"
-path "."
-top count
-udb "counter_impl1.udb"
-output_hdl "counter_impl1.vm"
Command 3: Mapper
map "counter_impl1_syn.udb" "impl1.pdc" -o "counter_impl1.udb"
Command 5: Timer
timing -sethld -v 10 -u 10 -endpoints 10 -nperend 1 -html -rpt
"counter_impl1_twr.html" "counter_impl1.udb"
The Radiant software supports Tcl (Tool Command Language) scripting and
provides extended Radiant software Tcl commands that enable a batch
capability for running tools in the Radiant software’s graphical/console
interface. The command set and the Tcl Console used to run it affords you the
speed, flexibility and power to extend the range of useful tasks that the
Radiant software tools are already designed to perform.
In addition to describing how to run the Radiant software’s Tcl Console, this
guide provides you with a reference for Tcl command line usage and syntax
for all Radiant software point tools within the graphical user interface so that
you can create command scripts, modify commands, or troubleshoot existing
scripts.
using the core Radiant software engines. The Radiant software command
interpreter does not prevent use of the underlying transformation tools. You
can use either the Tcl commands described in this section or you can use the
core engines described in the Command Line Reference Guide.
Additional References
If you are unfamiliar with the Tcl language you can get help by visiting the Tcl/
tk web site at https://www.tcl.tk. If you already know how to use Tcl, see the
Tcl Manual supplied with this software. For information on command line
syntax for running core tools that appear as Radiant software processes, such
as synthesis, map, par, backanno, and timing, see the Command Line
Reference Guide.
On Windows
In Windows you can interact with the Tcl Console by anyone of the following
methods:
To launch the Radiant software GUI from the Windows Start menu,
choose Start > Lattice Radiant Software (version_number) > Radiant
Software.
After the Radiant software loads, you can click on the Tcl Console tab.
With the Tcl Console tab active, you are able to start entering standard
syntax TCL commands or the Radiant software-specific support
commands.
To launch the Tcl Console independently from the Radiant software GUI
from the Windows Start menu choose Start > Lattice Radiant Software
(version_number) > Tcl Console.
A Windows command interpreter will be launched that automatically runs
the Tcl Console.
To run the interpreter from the command line, type the following:
c:/lscc/radiant/<version_number>/bin/nt64/pnmainc
Note
The arrangement and location of each of the programs in the Windows Start menu will
differ depending on the version of Windows you are running.
On Linux In Linux operating systems you can interact with the Tcl Console
by one of the following methods:
To launch the Radiant software GUI from the command line, type the
following:
/usr/<user_name>/radiant/<version_number>/bin/lin64/radiant
The path provided assumes the default installation directory and that the
Radiant software is installed. After the Radiant software loads you can
click on the Tcl Console tab. With the Tcl Console tab active, you are
able to start entering standard syntax Tcl commands or the Radiant
software specific support commands.
To launch the Tcl Console independently from the Radiant software GUI
from the command line, type the following:
/usr/<user_name>/Radiant/<version_number>/bin/lin64/radiantc
The path provided assumes the default installation directory and that the
Radiant software is installed, and that you have followed the Radiant
software for Linux installation procedures. The Radiant Tcl Console is
now ready to accept your input.
The advantage of running the Tcl Console from an independent
command interpreter is the ability to directly pass the script you want to
run to the Tcl interpreter. Another advantage is that you have full control
over the Tk graphical environment, which allows you to create you own
user interfaces.
Attributes
In Radiant Tcl system, attributes are used for objects, such as system, design,
or instance.
For example:
des_set_attribute is used to set design attributes.
des_list_attribute is used to list the current design attributes.
2. In project flow, you need to add project files. The time stamps of these
files are checked for any new commands. If there are any changes in the
project files, the flow will ask you to rerun the design at the right stages.
For example, if you change a post-synthesis constraint (.pdc) file, you
need to rerun technology mapping. However, if you change any RTL files
or the pre-synthesis constraint files, you need to rerun logic synthesis.
In non-project flow, the input file is a Radiant database (.udb) file, and the
time stamp of such file is not checked during the design flow.
3. You cannot skip any design stage from the run commands in non-project
flow.
For example, you need to run placement (plc_run) before you run routing
(rte_run) in non-project flow. However, you can use one of the prj_run
commands (prj_run_bitstream, prj_run_map, prj_run_par,
prj_run_synthesis) in project flow to run the design flow automatically from
the current stage to the target stage.
4. Implementation strategies are used in project flow and implementation
options in non-project flow.
Implementation strategy is a subset of implementation options.
For instance, if you click Place & Route Design Settings from the list, it
redirects to the Place & Route Design section in the Strategies dialog
box.
For instance, you can see the postsyn run result after opening the
mydb_syn.rdf project by using the commands listed below.
The design is currently in memory, and you can report and save it as a
Radiant database (.udb) file.
prj_open mydb_syn.rdf
prj_open_milestone -postsyn
des_report
des_write_udb -w mydb_syn.udb
With one of the two methods described above, you can change from project
flow to non-project flow. Once the design is in memory (i.e., in non-project flow
mode), it is not advised to use project commands.
Note:
Milestone refers to processing tasks, which include synthesizing, mapping, placing,
and routing a design.
To rerun par_run with new par options, you need to do the following:
% par_run
% des_write_udb -w mydb_par.udb
% des_reload_milestone -postmap <your_mapped_udb>
% par_set_option (set your par run option)
% par_run
To modify timing constraints for logical synthesis, change your constraint file
and restart the process from the beginning.
Certain GUI views require a post-synthesis netlist as the netlist view, which
can be added by incrementally reloading the post-synthesis udb.
>radiantc -gui
% des_read_udb <your_post_par.udb>
% des_reload_milestone -inc -postsyn <your_synthesized_udb>
% gui_start
Note:
Pure-project design flow is saved as disk file and not kept in memory. As a
result, you cannot run any non-project commands in a project flow. For
further information, refer to Opening a Post-Synthesis Milestone.
Open your console and type the following commands to create, add, run
and exit the program:
To create a project, use prj_create command followed by choosing the
right device and synthesis tool name:
Note:
It is not recommended to run the flow with any of the prj_run commands
(prj_run_synthesis, prj_run_map, prj_run_par, prj_run_bitstream) once switched to
non-project flow.
des_report
To run the map tool, use map_run command, followed by
des_write_udb -w command to save the current design:
map_run
des_write_udb -w mydb_map.udb
To run the placement tool and show the report placement information,
use plc_run and plc_report commands followed by des_write_udb -w
command to save the current design:
plc_run
plc_report
des_write_udb -w mydb_plc.udb
To run the routing tool and show the routing result, use rte_run and
rte_report commands followed by des_write_udb -w command to save
the current design:
rte_run
rte_report
des_write_udb -w mydb_rte.udb
To view the detailed report or summary timing, use the following
command:
sta_report_timing -summary
To generate bitsream file, use bit_generate command followed by -w
command to force to overwrite the existing file:
bit_generate -w mydb_bit
To end the program, quit the command to end the flow:
quit
plc_run
plc_report
des_write_udb -w myrdbsyn_plc.udb
To run the routing tool and show the routing result, use rte_run and
rte_report commands followed by des_write_udb -w command to save
the current design:
rte_run
rte_report
des_write_udb -w myrdbsyn_rte.udb
To view the detailed report or summary timing, use sta_report_timing -
summary command:
sta_report_timing -summary
To generate bitstream file, use bit_generate command followed by -w
command to force to overwrite the existing file:
bit_generate -w mydb_bit
To end the program, quit the command to end the flow:
quit
4. Reading the Post-Map UDB File
This section shows you how to read a post-map .udb file and continue the
design process.
To read the post-map UDB file, use des_read_udb command followed
by the database file name. In the next line, use des_set_attribute
command followed by - impl_dir to define the directory where the
project file is stored:
des_read_udb mydb_map.udb
des_set_attribute -impl_dir impl_udb_map
To run the placement tool and show the report placement information,
use plc_run and plc_report commands followed by des_write_udb -w
command to save the current design:
plc_run
plc_report
des_write_udb -w myudbmap_plc.udb
To end the program, quit the command to end the flow:
quit
5. Reading and Routing the Post-Placement Design
This section describes the process of reading the post-placement
database, routing, and saving the design.
To read the post-synthesis database, use des_read_udb command
followed by the database file name. Execute using des_set_attribute
command followed by - impl_dir to define the directory where the
project file is stored.
des_read_udb mydb_plc.udb
des_set_attribute -impl_dir impl_rdb_plc
To run the routing tool and show the routing result, use rte_run and
rte_report commands followed by des_write_udb -w command to save
the current design.
Use sta_report_timing - summary command to view the detailed report
or timing summary and use des_write_udb command with -w
command to overwrite or save the design.
rte_run
rte_report
sta_report_timing –summary
des_write_udb -w myrdbplc_rte.udb
To end the program, quit the command to end the flow.
quit
6. Opening a Post-Synthesis Milestone
This section shows how to open a post-synthesis milestone in a project,
and load the run result in memory. When the design is in memory, you can
continue to use non-project commands to continue the flow and access
the design data.
To open a project, use prj_open command followed by the file name.
prj_open mydb_syn.rdf
To open a project milestone, use prj_open_milestone command
followed by - postsyn to open the logical netlist.
prj_open_milestone -postsyn
To run the map tool and write the design as a .udb file, use map_run
command followed by des_write_udb and save using -w command to
run the design.
map_run
des_write_udb -w myprjsyn_map.udb
To end the program, quit the command to end the flow
quit
See Also
Launching the Tcl Console
Running Radiant Tcl
Accessing Command Help and Command Options in the Tcl Console
Creating and Running Custom Tcl Scripts
Running Tcl Scripts When Launching the Radiant Software
Radiant Software Tool Tcl Command Syntax
Tcl Manual
Note
In interactive mode, you can use command -help to get the list of command
information. However, most commands in the -help option are not true option, and the
Tcl interpreter interprets command -help as a usage error, which prevents a script from
finishing execution if it encounters this option. It is recommended to use help
{command} as this works in both interactive and script settings.
See Also
Launching the Tcl Console
Running Radiant Tcl
Accessing Command Help and Command Options in the Tcl Console
Creating and Running Custom Tcl Scripts
Running Tcl Scripts When Launching the Radiant Software
Radiant Software Tool Tcl Command Syntax
Tcl Manual
There are a couple of different methods you can use to create the Radiant
software Tcl scripts. This section will discuss each one and provide step-by-
step instructions for you to get started Tcl scripting repetitious Radiant
software commands or entire workflows.
One method you have available is to use your favorite text editor to enter a
sequence of the Radiant software Tcl commands. The syntax of each the
Radiant software Tcl commands is available in later topics in this portion of the
Help. This method should only be used by very experienced Radiant software
Tcl command line users.
The preferred method is to let the Radiant software GUI assist you in getting
the correct syntax for each Tcl command. When you interact with the Radiant
software user interface each time you launch a scriptable process and the
corresponding Radiant software Tcl command is echoed to the Tcl Console.
This makes it much simpler to get the correct command line syntax for each
Radiant software command. Once you have the fundamental commands
executed in the correct order, you can then add additional Tcl code to perform
error checking, or customization steps.
Note
In most all cases, you will have to clean up the script you saved and remove any
invalid arguments or any commands that cannot be performed in the Radiant
software environment due to some conflict or exception. You will likely have to
revisit this step later if after running your script you experience any run errors due
to syntax errors or technology exceptions.
The following the Radiant software Tcl script shows a very simple script that
opens a project, runs the entire design flow through the Place & Route
process, then closes the project. A typical script will contain more tasks and
will check for failure conditions. Use this simple example as a general
guideline.
The Radiant software Tcl scripts are run exclusively from the Radiant Tcl
Console. You can use either the Tcl Console integrated into the Radiant
software UI, or by launching the stand-alone Tcl Console.
See Also
Launching the Tcl Console
Running Radiant Tcl
Accessing Command Help and Command Options in the Tcl Console
Creating and Running Custom Tcl Scripts
Running Tcl Scripts When Launching the Radiant Software
Radiant Software Tool Tcl Command Syntax
Tcl Manual
Refer to Creating and Running Custom Tcl Scripts for more information on
creating custom Tcl scripts.
To launch the Radiant software and run a Tcl script from a command line
shell or the stand-alone Tcl console:
Enter the following command:
On Windows:
pnmain.exe -t <tcl_path_file>
On Linux:
radiant -t <tcl_path_file>
Sample Radiant software Tcl Script The following Radiant software Tcl
script shows a very simple script, running in Windows, that opens a project
and runs the design flow through the MAP process. Use this simple example
as a general guideline.
The above example is saved in Windows as the file mytcl.tcl in the directory
C:/test. By running the following command from either a DOS shell or the Tcl
console in Windows, the Radiant software GUI starts, the project io1.rdf
opens, and the MAP process automatically runs.
pnmain.exe -t c:/test/mytcl.tcl
See Also
Launching the Tcl Console
Running Radiant Tcl
Accessing Command Help and Command Options in the Tcl Console
Creating and Running Custom Tcl Scripts
Running Tcl Scripts When Launching the Radiant Software
Radiant Software Tool Tcl Command Syntax
Tcl Manual
The Radiant software tries to make it easy to develop Tcl scripts by mirroring
the correct command syntax in the Tcl Console based on the actions
performed by you in the GUI. This process works well for most designs, but
there are times when a greater degree of control is required. More control
over the build process is made available through additional command line
switches. The additional switches may not be invoked by actions taken by you
when using the GUI. This section provides additional information about all of
the Tcl commands implemented in the Radiant software.
The Tcl Commands are broken into major categories. The major categories
are:
Radiant Software Tcl Console Commands
Radiant Software Timing Constraints Tcl Commands
Radiant Software Physical Constraints Tcl Commands
Technology Mapping Tcl Commands
Synthesis Tcl Command
Design Object Tcl Commands
System Tcl Commands
Radiant Software Project Tcl Commands
Design Tcl Commands
Place & Route Tcl Commands
Device Tcl Commands
Place & Route Tcl Commands
Timing Analysis Tcl Commands
Simulation Libraries Compilation Tcl Commands
Reveal Inserter Tcl Commands
Reveal Analyzer Tcl Commands
Power Calculator Tcl Commands
Programmer Tcl Commands
Engineering Change Order Tcl Commands
IP Version Update Tcl Commands
Message Control Tcl Commands
Placement Tcl Commands
Routing Tcl Commands
Bitstream Generation Tcl Commands
Note:
Tcl Command Log is always listed after the project is closed. You can find it in the
Reports section under Misc Report > Tcl Command Log.
The following table provides a listing of all valid Radiant software Tcl Console-
related commands.
reset Clear the Tcl Console pane and erase all entries in
the command line history.
**This command is only used in the GUI Tcl
console and not supported in the standalone Tcl
console.
This section illustrates and describes a few samples of Radiant Tcl Console
commands.
Example 1
To save a script, use the save_script command in the Tcl Console window
with a name or file path/name argument. In the first example command line,
the file path is absolute, that is, it includes the entire path. Here you are saving
“myscript.tcl” to the existing current working directory. The second example
creates the same “myscript.tcl” file in the current working directory.
save_script C:/lscc/radiant/myproject/scripts/myscript.tcl
save_script myscript.tcl
See Creating and Running Custom Tcl Scripts for details on how to save and
run scripts in the Radiant software.
Example 2
Example 3
The following history command will print all of the command history that was
recorded in the current Tcl Console session.
history
The following table provides a listing of all valid Radiant software timing
constraints-related Tcl command options and describes option functionality.
create_clock
% help create_clock
create_clock - Commands to new clock object
Usage:
create_clock -period <period_value> [-name <clock_name>] [-
waveform <edge_list>] [<port_list|pin_list|net_list>]
create_generated_clock
% help create_generated_clock
create_generated_clock - Commands to new generated clock
object
Usage:
create_generated_clock [-name <clock_name>] -source
<master_pin> [-edges <edge_list>] [-edge_shift <shift_list>] [-
divide_by <factor>] [-multiply_by <factor>] [-duty_cycle
<percent>] [-invert] [-add] <pin_list|net_list|port_list>
set_clock_groups
% help set_clock_groups
set_clock_groups - Commands to set clock groups
Usage:
set_clock_groups <-logically_exclusive | -
physically_exclusive | -asynchronous> -group <clock_list>
set_clock_latency
% help set_clock_latency
set_clock_latency - Commands to defines a clock's source or
network latency
Usage:
set_clock_latency [-rise] [-fall] [-early | -late] -source
<latency> [<object_list> | all_clocks]
set_clock_uncertainty
% help set_clock_uncertainty
set_clock_uncertainty - Commands to set clock uncertainty.
Usage:
set_clock_uncertainty [-setup] [-hold] [-from <clock>] [-to
<clock>] <uncertainty> [<clock_list>]
set_false_path
% help set_false_path
set_false_path - Commands to define false path.
Usage:
set_false_path [-from
<port_list|pin_list|instance_list|net_list|clock_list>]
[-to
<port_list|pin_list|instance_list|net_list|clock_list>]
[-through
<port_list|pin_list|instance_list|net_list>]
[-rise_from <clock_list>] [-rise_to
<clock_list>]
[-fall_from <clock_list>] [-fall_to
<clock_list>]
set_input_delay
% help set_input_delay
set_input_delay - Commands to set input delay on ports.
Usage:
set_input_delay -clock <clock_name> [-clock_fall] [-max | -
min] [-add_delay] <delay> [<port_list> | all_inputs]
set_load
% help set_load
set_load - Commands to set capacitance on ports
Usage:
set_load <capacitance> <objects>
set_max_delay
% help set_max_delay
set_max_delay - Commands to specify maximum delay for timing
paths.
Usage:
set_max_delay [-from
<port_list|pin_list|instance_list|net_list|clock_list>]
[-to
<port_list|pin_list|instance_list|net_list|clock_list>]
[-through
<port_list|pin_list|instance_list|net_list>] [-datapath_only]
[-rise_from <clock_list>] [-rise_to
<clock_list>]
[-fall_from <clock_list>] [-fall_to
<clock_list>] <delay>
set_max_skew
% help set_max_skew
set_max_skew - Commands to define max skew of path.
Usage:
set_max_skew <net_list|pin_list> <skew_value>
set_min_delay
% help set_min_delay
set_min_delay - Commands to specify minimum delay for timing
paths.
Usage:
set_min_delay [-from
<port_list|pin_list|instance_list|net_list|clock_list>]
[-to
<port_list|pin_list|instance_list|net_list|clock_list>]
[-through
<port_list|pin_list|instance_list|net_list>]
[-rise_from <clock_list>] [-rise_to
<clock_list>]
[-fall_from <clock_list>] [-fall_to
<clock_list>] <delay>
set_multicycle_path
% help set_multicycle_path
set_multicycle_path - Commands to define multicycle path.
Usage:
set_multicycle_path [-from
<port_list|pin_list|instance_list|net_list|clock_list>]
[-to
<port_list|pin_list|instance_list|net_list|clock_list>]
[-through
<port_list|pin_list|instance_list|net_list>]
[-rise_from <clock_list>] [-rise_to
<clock_list>]
[-fall_from <clock_list>] [-fall_to
<clock_list>]
[-setup | -hold] [-start | -end]
<path_multiplier>
set_output_delay
% help set_output_delay
set_output_delay - Commands to set output delay on ports.
Usage:
set_output_delay -clock <clock_name> [-clock_fall] [-max |
-min] [-add_delay] <delay> [<port_list> | all_outputs]
set_hierarchy_separator
The following table provides a listing of all valid Radiant software physical
constraints-related Tcl command options and describes option functionality.
ldc_set_vcc Set the voltage and/or derate for the bank, core or
dphy.
ldc_create_group
% help ldc_create_group
ldc_create_group - Commands to create group
Usage:
ldc_create_macro
% help ldc_create_macro
ldc_create_macro - Commands to create macro
Usage:
ldc_create_macro [-name <macro_name>] [-use_pio
<ports_list>] <instance>
ldc_create_region
% help ldc_create_region
ldc_create_region - Commands to create region
Usage:
ldc_create_region -name <region_name> (–anchor <anchor>|-
site <site>) -width <width> -height <height> [–buffer_left
<left> –buffer_right <right> –buffer_top <top> –buffer_bottom
<bottom>] [-exclusive] [-routing_exclusive]
ldc_create_vref
% help ldc_create_vref
ldc_create_vref - Commands to create a voltage vref
Usage:
ldc_create_vref -name <vref_name> -site <site_name>
ldc_define_attribute
% help ldc_define_attribute
ldc_define_attribute - Commands to define LSE attribute
Usage:
ldc_define_attribute -attr <attr_type> -value <attr_value>
-object_type <object type> -object <object> [-disable] [-
comment <comment>]
ldc_define_global_attribute
% help ldc_define_global_attribute
ldc_define_global_attribute - Commands to define gloabl LSE
attribute
Usage:
ldc_define_global_attribute -attr <attr_type> -value
<attr_value> [-disable] [-comment <comment>]
ldc_delete_constraint
% help ldc_delete_constraint
ldc_delete_constraints - Commands to clear constraints by given
IDs.Delete all constraints if ID is'-1'
Usage:
ldc_delete_constraint [-all] <id> [<id>...]
ldc_get_groups
% help ldc_get_groups
ldc_get_groups - Commands to return group objects
Usage:
ldc_get_groups [-regexp] [-nocase] <patterns>
ldc_list_constraint
% help ldc_list_constraint
ldc_list_constraints - Commands to list constraints from
database
Usage:
ldc_list_constraint [-all]
ldc_prohibit
% help ldc_prohibit
ldc_prohibit - Commands to probibit site or region
Usage:
ldc_prohibit -site <site> | -region <region>
ldc_read
% help ldc_read
ldc_read - Commands to read constraint file
Usage:
ldc_read <file>
ldc_set_attribute
% help ldc_set_attribute
ldc_set_attribute - Commands to set attribute
Usage:
ldc_set_attribute <key-value list> [objects]
ldc_set_location
% help ldc_set_location
ldc_set_location - Commands to set location.
Usage:
ldc_set_location [-site <site_name>] [-bank <bank_num>] [-
region <region_name>] <object>
ldc_set_port
% help ldc_set_port
ldc_set_port - Commands to set port constraint attributes
Usage:
ldc_set_port [-iobuf [-vref <vref_name>]]|[-sso] <key-value
list> <ports>
ldc_set_sysconfig
% help ldc_set_sysconfig
ldc_set_sysconfig - Commands to set sysconfig attributes
Usage:
ldc_set_sysconfig <key-value list>
ldc_set_vcc
% help ldc_set_vcc
ldc_set_vcc - Commands to set the voltage and/or derate for
the bank, core or dphy
Usage:
ldc_set_vcc [-bank bank|-core|-dphy DPHY0/DPHY1] [-derate
derate] [voltage]
ldc_write
% help ldc_write
ldc_write - Commands to write constraint file
Usage:
ldc_write [-overwrite|w] [-sdc] [-exclude_sdc] [-
include_error] <file>
Example 1
Example 2
Example 3
The following table provides a listing of all valid Radiant software mapping-
related Tcl command options and describes option functionality.
map_list_option
% help map_list_option
Usage information:
Var/FlagName Type Value Help
------------ ---- ----- ----
(-help gives this help)
map_run
% help map_run
Usage information:
Var/FlagName Type Value Help
------------ ---- ----- ----
(-help gives this help)
map_set_option
% help map_set_option
Usage information:
Var/FlagName Type Value Help
------------ ---- ----- ----
(-help gives this help)
?key_values? list () Option <key, value> pairs
The following table provides a listing of all valid Radiant software synthesis-
related Tcl command options and describes option functionality.
syn_run
% help syn_run
syn_run - Run synthesis tool
Usage:
syn_run
The following table provides a listing of all valid Radiant software design
object-related Tcl command options and describes option functionality.
Clock Object
get_clocks
% help get_clocks
get_clocks - Commands to get clocks
Usage:
get_clocks [-regexp] [-nocase] <patterns>
all_clocks
% help all_clocks
all_clocks - Commands to get a list of all clocks in the
current design
Usage:
all_clocks
This section illustrates and describes a few samples of Radiant clock object
Tcl commands.
Example 1
<target name> is the name of the clock. Clock is either given a name or gets
its name from the port/net on which it is defined.
get_clocks <target name>
[get_clocks clock_fast]
[all_clocks]
Port Object
get_port_info
% help get_port_info
get_port_info - Commands to return port info
Usage:
get_port_info [-name] [-is_inout] [-is_input] [-is_output]
<port_object>
get_ports
% help get_ports
get_ports - Commands to get ports
Usage:
get_ports [-regexp] [-nocase] <patterns>
all_inputs
% help all_inputs
all_inputs - Commands to get a list of all input ports in the
current design
Usage:
all_inputs
all_outputs
% help all_outputs
all_outputs - Commands to get a list of all output ports in
the current design
Usage:
all_outputs
This section illustrates and describes a few samples of Radiant port object Tcl
commands.
Example 1
Cell Object
get_cell_info
% help get_cell_info
get_cell_info - Commands to return cell info
Usage:
get_cell_info [-name] [-inpins] [-outpins] [-pins]
<cell_object>
get_cells
% help get_cells
get_cells - Commands to get instances
Usage:
get_cells [-hierarchical] [-regexp] [-nocase] [-of_objects
<objects>] <patterns>
This section illustrates and describes a few samples of Radiant cell object Tcl
commands.
Example 1
Net Object
get_net_info
% help get_net_info
get_net_info - Commands to return net info
Usage:
get_net_info [-name] [-pin] <net_object>
get_nets
% help get_nets
get_nets - Commands to get nets
Usage:
get_nets [-hierarchical] [-regexp] [-nocase] [-of_objects
<objects>] <patterns>
This section illustrates and describes a few samples of Radiant net object Tcl
commands.
Example 1
The command returns collection of a design net that matches <target name>.
Hierarchy is specified using regular expression.
[get_nets <target name>]
[get_nets clk1]
Pin Object
get_pin_info
% help get_pin_info
get_pin_info - Commands to return pin info
Usage:
get_pin_info [-name] [-is_clock] [-is_input] [-is_output]
[-net] [-parent_cell] <pin_object>
get_pins
% help get_pins
get_pins - Commands to get pins
Usage:
get_pins [-hierarchical] [-regexp] [-nocase] [-of_objects
<objects>] <patterns>
This section illustrates and describes a few samples of Radiant pin object Tcl
commands.
Example 1
The command returns collection of design pin that matches <instance name>
| <pin name>. Hierarchy is specified using regular expression.
[get_pins <instance name> | <pin name>]
[get_pins ff2/D]
Wildcard Support
Multiple wildcard (*) is supported. In addition, the wildcard should be at the
end or beginning of the object name string. For example:
ab* matches abc, ab, abdefg, etc.
*bc matches abc, bbc, debc, etc.
Note:
1. Wildcard * can be used in any position of object name such as a*, *b, a*b etc.
2. Wildcard * cannot cross hierarchical separator /. For example get_cells sub1/* only
returns sub1/sub2 and does not return sub1/sub2/sub1 or sub1/sub2/sub1/sub2.
3. When -hierarchical is set, it will search all levels of the design hierarchy starting at
the current instance.
sys_install_path
% help sys_install_path
sys_install_path - Return Radiant executable path
Usage:
sys_install_path
sys_install_version
% help sys_install_version
sys_install_version - Return Radiant version
Usage:
sys_install_version
sys_list_attribute
% help sys_list_attribute
Usage information:
Var/FlagName Type Value Help
------------ ---- ----- ----
(-help gives this help)
sys_set_attribute
% help sys_set_attribute
Usage information:
Var/FlagName Type Value Help
------------ ---- ----- ----
(-help gives this help)
-echo choice ("" on off) Allows you to enable or
disable the command summary line.
-reg choice ("" on off) Allows you to output
RAT_REG_RECORD_ON or RAT_REG_RECORD_OFF.
-gui choice ("" on off) The run is called from gui
if its value = on.
-msg string () The msg setting file.
The following table provides a listing of all valid Radiant software project-
related Tcl command options and describes option functionality.
prj_activate_impl
% help prj_activate_impl
prj_activate_impl - Activate implementation in the current
project
Usage:
prj_activate_impl <impl name>
prj_add_source
[-work <VHDL lib name>]: Assigns the source code to the specified library
name space.
[-format <format name>]: This switch is used to add a source file format is
Verilog or VHDL.
[-opt name=value]: The -opt argument allows you to set a custom, user-
defined option. See Example 7 for guidelines and usage.
<sre file>...: One or more VHDL source files to add to the specified
implementation.
% help prj_add_source
prj_add_source - Add sources to the current project
Usage:
prj_add_source [-impl <implement name>] [-simulate_only|-
synthesis_only] [-include <path list for Verilog include search
path>] [-work <VHDL lib name>] [[-opt <name=value>] ...] [-
exclude] <src file>...
prj_archive
% help prj_archive
prj_archive - Archive the current project
Usage:
prj_archive [-includeAll] <archive_file>
: Archive the current project into the archive_file
prj_archive -extract -dir <destination directory>
<archive_file>
: Extract the archive file and load the project
prj_clean_impl
% help prj_clean_impl
prj_clean_impl - Clean up the implementation result files in
the current project
Usage:
prj_clean_impl [-impl <implement name>]
prj_clone_impl
The -copyRef argument is used to copy source files from the original
implementation source folder to a new implementation source folder. If this is
not used, the existing implementation source files will be referenced in the
new implementation.
% help prj_clone_impl
prj_clone_impl - Clone an existing implementation
Usage:
prj_clone_impl <new impl name> [-dir <new impl directory>]
[-copyRef] [-impl <original impl name>]
prj_close
% help prj_close
prj_close - Close the current project
Usage:
prj_close
prj_copy_strategy
% help prj_copy_strategy
prj_copy_strategy - Create a new strategy by copying from an
existing strategy
Usage:
prj_copy_strategy -from <source strategy name> -name <new
strategy name> -file <strategy file name>
prj_create
This command creates a new project inside the current working directory. The
new command can only be used when no other project is currently open.
The -name <project name> argument specifies the name of the project. This
creates a <project name>.rdf file in the current working directory.
The -dir <project directory> argument defines the directory where project file
.rdf is stored. If this is not specified, the current working directory is used.
The -dev <device name> argument specifies the FPGA family, density,
footprint, performance grade, and temperature grade to generate designs for.
Use the Lattice OPN (Ordering Part Number) for the <device name>
argument.
prj_create_impl
The new implementation will use the current active implementation’s strategy
as the default strategy if no valid strategy is set.
% help prj_create_impl
prj_create_impl - Create a new implementation in the current
project
Usage:
prj_create_impl <new impl name> [-dir <implementation
directory>] [-strategy <default strategy name>] [-synthesis
<synthesis tool name>]
prj_create_reveal_impl
% help prj_create_reveal_impl
prj_create_reveal_impl - Create an reveal implementation from
existed implementation
Usage:
prj_create_reveal_impl [<new reveal impl name>] [-dir <new
impl directory>] -impl <original impl name>
prj_create_strategy
% help prj_create_strategy
prj_create_strategy - Create a new strategy with default
setting
Usage:
prj_create_strategy -name <new strategy name> -file
<strategy file name>
prj_device
% help prj_device
prj_device - List the device
Usage:
prj_device [-family|-device|-package|-performance|-
operation|-part]
: List the device information of the current
project in family, device, package, performance, operation,
part, ASC sequence Tcl list
prj_disable_source
This command disables the excluded design sources from the current project,
that is, it will activate a source file for synthesis, to be used as a constraint or
for Reveal debugging.
% help prj_disable_source
prj_disable_source - Disable the design sources from the
current project
Usage:
prj_disable_source [-impl <implement name>] <src file> ...
prj_enable_source
This command enables the excluded design sources from the current project,
that is, it will activate a source file for synthesis, to be used as a constraint, or
for Reveal debugging.
% help prj_enable_source
prj_enable_source - Enable the design sources from the current
project
Usage:
prj_enable_source [-impl <implement name>] <src file> ...
prj_get_impl_path
% help prj_get_impl_path
prj_get_impl_path - Return active or given implementation
folder path
Usage:
prj_get_impl_path [-impl <implement>]
prj_get_strategy_value
% help prj_get_strategy_value
prj_import_strategy
% help prj_import_strategy
prj_import_strategy - Import an existing strategy file
Usage:
prj_import_strategy -name <new strategy name> -file
<strategy file name>
prj_list_source
% help prj_list_source
prj_list_source - List source files in current project
Usage:
prj_list_source [-o <output_file>]
prj_list_strategy
prj_open
% help prj_open
prj_open - Open a project file
Usage:
prj_open <project file>
prj_open_milestone
% help prj_open_milestone
Usage information:
Var/FlagName Type Value Help
------------ ---- ----- ----
(-help gives this help)
-postsyn boolflag (false) Open post-syn logical netlist
-postmap boolflag (false) Open post-map physical
netlist
-postpar boolflag (false) Open post-par physical
netlist
prj_remove_impl
% help prj_remove_impl
prj_remove_source
This command removes the specified source files from the specified
implementation. If an implementation is not listed explicitly the source files are
removed from the active implementation. The source files are not removed
from the file system, they are only removed from consideration in the
specified implementation.
% help prj_remove_source
prj_remove_source - Remove design source from the current
project
Usage:
prj_remove_source [-impl <implement name>] -all
: Remove all the design sources in project
prj_remove_source [-impl <implement name>] <src file> ...
: Remove the specified sources from the current
project
prj_remove_strategy
% help prj_remove_strategy
prj_remove_strategy - Delete an existing strategy
Usage:
prj_remove_strategy <strategy name>
prj_run_bitstream
% help prj_run_bitstream
prj_run_bitstream - Run bitstream process
Usage:
prj_run_bitstream
prj_run_map
% help prj_run_map
prj_run_map - Run map process
Usage:
prj_run_map
prj_run_par
% help prj_run_par
prj_run_par - Run place & route process
Usage:
prj_run_par
prj_run_synthesis
% help prj_run_synthesis
prj_save
This command updates the project with all changes made during the current
session and the project file is saved.
% help prj_save
prj_save - Save the current project
Usage:
prj_save [project file]
prj_saveas
prj_set_device
% help prj_set_device
prj_set_device - Set the device
Usage:
prj_set_device [-family <family name>] [-device <device
name>] [-package <package name>] [-performance <performance
grade>] [-operation <operation>] [-part <part name>]
: Change the device to the specified family,
device, package, performance, operation, part or ASC
prj_set_impl_opt
If the -rem option is used, the following option names appearing after it will be
removed.
If only the <option name> argument is used (i.e., “prj_impl option <option
name>), then the value of that option in the project will be returned.
If the <option name> is VerilogStandard, then the valid option value must be
Verilog 95, Verilog 2001 or System Verilog.
The command will set the option value to the option specified by <option
name>. If the <option value> is empty then the option will be removed and
ignored (e.g., prj_impl option -rem).
The -run_flow argument allows you to switch from the normal mode to an
“initial” incremental flow mode and “incremental” which is the mode you
should be in after an intial design run during the incremental design flow. With
no value parameters specified, -run_flow will return the current mode setting.
% help prj_set_impl_opt
prj_set_impl_opt - List, set or remove implementation options
in the current project
Usage:
prj_set_impl_opt [-impl <implement name>]
: List all the options in the specified
implementation
prj_set_impl_opt [-impl <implement name>] <option name>
[option value list]
: List or set the implementation's option value
prj_set_impl_opt [-impl <implement name>] -append <option
name> <option value>
: Append a value to the specified option value
prj_set_impl_opt [-impl <implement name>] -rem <option
name>...
: Remove the the options in the implementation
prj_set_opt
% help prj_set_opt
prj_set_opt - List, set or remove a project option
Usage:
prj_set_opt
: List all the options in the current project
prj_set_opt <option name> [option value list]
: List or set the option value
prj_set_opt -append <option name> <option value>
: Append a value to the specified option value
prj_set_opt -rem <option name>...
: Remove the options of the current project
prj_set_postscript
% help prj_set_postscript
prj_set_postscript - List or set user Tcl script after running
milestone
Usage:
prj_set_postscript [-impl <implement name>] <milestone
name> <script_file>
: milestone name can be ‘syn’, ‘map’, ‘par’,
‘export’
prj_set_prescript
% help prj_set_prescript
prj_set_prescript - List or set user Tcl script before running
milestone
Usage:
prj_set_prescript [-impl <implement name>] <milestone name>
<script_file>
: milestone name can be ‘syn’, ‘map’, ‘par’,
‘export’
prj_set_source_format
% help prj_set_source_format
prj_set_source_format - Set a source format
Usage:
prj_set_source_format -src <source name> [-impl <implement
name>] <format>
: Currently, only Verilog or VHDL is supported
prj_set_source_opt
% help prj_set_source_opt
prj_set_source_opt - List, set or remove a source option
Usage:
prj_set_source_opt -src <source name> [-impl <implement
name>]
: List all the options in the specified source
prj_set_source_opt -src <source name> [-impl <implement
name>]
<option name> [option value list]
: List or set the source's option value
prj_set_source_opt -src <source name> [-impl <implement
name>]
-append <option name> <option value>
: Append a value to the specified option value
prj_set_source_opt -src <source name> [-impl <implement
name>]
-rem <option name>...
: Remove the options of the source
prj_set_strategy
% help prj_set_strategy
prj_set_strategy - Associate the strategy with the specified
implementation
Usage:
prj_set_strategy [-impl <implementation name>] <strategy
name>
prj_set_strategy_value
% help prj_set_strategy_value
prj_set_strategy_value - Set value to a strategy item
Usage:
prj_set_strategy_value [-strategy <strategy name>] <option
name=option value> ...
prj_set_top_module
% help prj_set_top_module
prj_set_top_module - Set top module in the current
implementation
Usage:
prj_set_top_module <top module>
Example 1
To create a new project, your command may appear something like the
following which shows the creation of an iCE40 UltraPlus device.
prj_create -name "m" -impl "m" -dev iCE40UP3K-UWG30ITR
Example 2
To save a project and give it a certain name (save as), use the project save
command as shown below:
prj_save "my_project"
To simply save the current project just use the save function with no values:
prj_save
Example 3
To open an existing project, the command syntax would appear with the
absolute file path on your system as shown in the following example:
prj_open "C:/projects/radiant/adder/my_project.rdf"
Example 4
To add a source file, in this case a source LDC file, use the prj_src add
command as shown below and specify the complete file path:
prj_add_source "C:/my_project/radiant/counter/counter.ldc"
Example 5
Example 6
Example 7
Example 8
After you modify your strategy settings in the Radiant software interface the
values are saved to the current setting via a Tcl command. For example, a
command similar to the following will be called if Synplify frequency and area
options are changed.
prj_set_strategy_value -strategy strategy1 SYN_Frequency=300
SYN_Area=False
Example 9
Example 10
prj_list_strategy syn_*
des_list_attribute
% help des_list_attribute
Usage information:
Var/FlagName Type Value Help
------------ ---- ----- ----
(-help gives this help)
des_list_instance
% help des_list_instance
Usage information:
Var/FlagName Type Value Help
------------ ---- ----- ----
(-help gives this help)
?objects? string (*) List instances
des_list_net
% help des_list_net
Usage information:
Var/FlagName Type Value Help
------------ ---- ----- ----
(-help gives this help)
-clock boolflag (false) List clock nets only
-fanout int (0) List net with # of fanouts >=
specified value
-lsort int (0) Sorting method: 0 - id; 1 -
all pins; 2 - clk pins; 3 - global control pins; 4 - normal
pins
-lsize int (-1) The # of listed nets
?objects? string (*) Net names
des_list_port
% help des_list_port
Usage information:
Var/FlagName Type Value Help
------------ ---- ----- ----
(-help gives this help)
?objects? string (*) List ports
des_read_udb
% help des_read_udb
Usage information:
Var/FlagName Type Value Help
------------ ---- ----- ----
(-help gives this help)
-logview string () Logical view UDB file name
-phyview string () Physical view UDB file name
des_reload_milestone
% help des_reload_milestone
Usage information:
Var/FlagName Type Value Help
------------ ---- ----- ----
(-help gives this help)
-force boolflag (false) Force to open the milestone
-inc boolflag (false) Loading the milestone result
incrementally
-postsyn boolflag (false) Open postsyn milestone
-postmap boolflag (false) Open postmap milestone
-postplc boolflag (false) Open postplc milestone
-postrte boolflag (false) Open postrte milestone
-postpar boolflag (false) Open postpar milestone
?udb_name? string () Milestone udb name
des_report
% help des_report
Usage information:
Var/FlagName Type Value Help
------------ ---- ----- ----
(-help gives this help)
des_report_flow_status
% help des_report_flow_status
Usage information:
Var/FlagName Type Value Help
------------ ---- ----- ----
(-help gives this help)
des_report_instance
% help des_report_instance
Usage information:
Var/FlagName Type Value Help
------------ ---- ----- ----
(-help gives this help)
-file string () File name
?objects? string () List instances
des_report_net
% help des_report_net
Usage information:
Var/FlagName Type Value Help
------------ ---- ----- ----
(-help gives this help)
-file string () File name
?objects? string () Report the given nets
des_report_operating_condition
% help des_report_operating_condition
Usage information:
Var/FlagName Type Value Help
------------ ---- ----- ----
(-help gives this help)
des_report_port
% help des_report_port
Usage information:
Var/FlagName Type Value Help
------------ ---- ----- ----
(-help gives this help)
?objects? string () List ports
des_set_attribute
% help des_set_attribute
Usage information:
Var/FlagName Type Value Help
------------ ---- ----- ----
(-help gives this help)
-impl_dir string () implementation name
des_set_operating_condition
% help des_set_operating_condition
Usage information:
Var/FlagName Type Value Help
------------ ---- ----- ----
(-help gives this help)
-temperature int (-1000) Temperature in Celsius
-speed_grade string () Set the design speed grade
des_write_udb
% help des_write_udb
Usage information:
Var/FlagName Type Value Help
------------ ---- ----- ----
(-help gives this help)
-w boolflag (false) Force to overwrite the
existing file
-logview boolflag (false) Output logical view
-phyview boolflag (false) Output physical view
?udbFileName? string () UDB file name
The following table provides a listing of all valid Radiant software device-
related Tcl command options and describes option functionality.
dev_list_device
% help dev_list_device
dev_list_device - List device
Usage:
dev_list_device -family <family> [-p <pattern>]
dev_list_family
% help dev_list_family
dev_list_family - List family
Usage:
dev_list_family [-p <pattern>]
dev_list_operation
% help dev_list_operation
dev_list_operation - List operation
Usage:
dev_list_operation -family <family> -device <device> -
package <package> -performance <performance>
dev_list_package
% help dev_list_package
dev_list_package - List package
Usage:
dev_list_package -family <family> -device <device> [-p
<pattern>]
dev_list_performance
% help dev_list_performance
dev_report
% help dev_report
Usage information:
Var/FlagName Type Value Help
------------ ---- ----- ----
(-help gives this help)
The following table provides a listing of all valid Radiant software place &
route-related Tcl command options and describes option functionality.
par_list_option
% help par_list_option
Usage information:
Var/FlagName Type Value Help
------------ ---- ----- ----
(-help gives this help)
par_run
% help par_run
Usage information:
Var/FlagName Type Value Help
------------ ---- ----- ----
par_set_option
% help par_set_option
Usage information:
Var/FlagName Type Value Help
------------ ---- ----- ----
(-help gives this help)
?key_values? list () par_opt option <key, value> pairs
sta_get_terms Get a list of ports and pins that satisfy the name.
sta_get_clocks
This command provides a list of clocks that satisfy the name including
wildcard characters.
% help sta_get_clocks
Usage information:
Var/FlagName Type Value Help
------------ ---- ----- ----
(-help gives this help)
name string () Name of clocks
sta_get_coverage
This command returns the percent of connections with valid slack. The
removed connections are not part of a complete timing path and are not
considered in the computation. False path on their own do not contribute to
the coverage.
% help sta_get_coverage
Usage information:
Var/FlagName Type Value Help
------------ ---- ----- ----
(-help gives this help)
sta_get_info
sta_get_paths
% help sta_get_paths
Usage information:
Var/FlagName Type Value Help
------------ ---- ----- ----
(-help gives this help)
-n int (-2) Number of paths to report
-from string () Name/s of ports and/or pins
-from_clock string () Name/s of clocks
-to string () Name/s of ports and/or pins
-to_clock string () Name/s of clocks
-hold boolflag (false) Report hold paths
sta_get_slack
The various flags associated with the command determine the returned slack.
% help sta_get_slack
Usage information:
Var/FlagName Type Value Help
------------ ---- ----- ----
(-help gives this help)
-tns boolflag (false) Get the total negative setup
or hold slack
-worst boolflag (false) Get the worst setup or hold
slack of the design
-hold boolflag (false) Get hold slack if this flag
is true
-terminal string () Get the worst slack for the
given pin or port. The name has to represent exactly one port
or pin
sta_get_terms
sta_path_info
% help sta_path_info
Usage information:
Var/FlagName Type Value Help
------------ ---- ----- ----
(-help gives this help)
-path string () Path in question
-slack boolflag (false) The slack of the path
-constraint boolflag (false) The constraint of the path
-skew boolflag (false) The clock skew -- common
skew not removed
sta_report_clocks
% help sta_report_clocks
Usage information:
Var/FlagName Type Value Help
------------ ---- ----- ----
(-help gives this help)
-clocks string () The clock name
sta_report_constraints
The command returns a list of the sdc commands associated with the design
and constraints generated by the timing engine.
% help sta_report_constraints
Usage information:
Var/FlagName Type Value Help
------------ ---- ----- ----
(-help gives this help)
sta_report_timing
This command takes a list of ports or pins for a detailed report. The summary
option dumps the number of endpoints with negative slack and the total
negative slack. While the endpoints option dumps a table of endpoints and
associated slacks. Hold data is dumped if the hold option is used.
% help sta_report_timing
Usage information:
Var/FlagName Type Value Help
------------ ---- ----- ----
(-help gives this help)
-n int (-2) Number of paths to report
-endpoints boolflag (false) Report the endpoints only
-from string () Name/s of ports and/or pins
-from_clock string () Name/s of clocks
-to string () Name/s of ports and/or pins
-to_clock string () Name/s of clocks
-hold boolflag (false) Report hold paths
-summary boolflag (false) Report the timing summary
sta_report_unconstrained
sta_set_option
% help sta_set_option
Usage information:
Var/FlagName Type Value Help
------------ ---- ----- ----
(-help gives this help)
-name string (logical) Use logical or physical
names in reports
-worst_delays boolflag (false) Enable worst case delay if
true
The following table provides a listing of all valid Radiant software Simulation
Libraries Compilation-related Tcl command options and describes option
functionality.
Note:
Running cmpl_libs may take a long time and may cause the Radiant software to hang.
It is recommended to run cmpl_libs using the Radiant Tcl Console (Start Menu >
Lattice Radiant Software > Accessories > TCL Console).
or,
Run cmpl_libs.tcl using the command line console. Refer to Running cmpl_libs.tcl
from the Command Line.
cmpl_libs
The -sim_path argument specifies the path to the simulation tool executable
(binary) folder. This option is mandatory. Currently, only ModelSim and
QuestaSim simulators from Mentor, Xcelium simulator from Cadence and
Active-HDL simulator from Aldec are supported.
Note:
If you are a Windows user and prefer the \ notation in the path, you must surround
it with {}. And "" or {} will be needed if the path has spaces.
To execute this script error free, Siemens Questa 2020.4 or a later version should
be used for compilation.
The -target_path argument specifies the target path, where you want the
compiled libraries and modelsim.ini file to be located. This argument is
optional, and the default target path is the current folder.
Note:
This argument is recommended if you did not change the current folder from the
Radiant software startup (binary) folder, or if the current folder is write-protected.
If you are a Windows user and prefer the \ notation in the path, you must surround
it with {}. And "" or {} will be needed if the path has spaces.
% cmpl_libs
Usage: cmpl_libs -sim_path <sim_path> [-sim_vendor
{mentor<default>|cadence|aldec}] [-device
{ice40up|lifcl|lfcpnx|lfd2nx|lfmxo5-25|lfmxo5-15d|lfmxo5-
100t|lfmxo5-55t|lavat|ut24c|ut24cp|all<default>}] [-target_path
<target_path>]
sim_generate_script
This command does not support modifying the original file list of the Radiant
project. Simulation Wizard does not call this command to generate the .mdo
file. If you want to modify simulation files, you can edit the .mdo file manually.
Note:
The sim_generate_script command does not launch ModelSim as the Simulation
Wizard. However, as long as ModelSim executes the command correctly, it can
generate any type of file as an extension of the script.
% help sim_generate_script
sim_generate_script - Generate a simulation script for use with
ModelSim or QuestaSim
Usage:
sim_generate_script -top <top module> [-stage
<rtl|postsyn|postroute|timing>] [-inst <instance name>]
[-run <timesteps><time_units>|0] [-t
<multiplier><time_unit>] [-w] -o <do file>
-top : top module for simulation.
-stage: (optional) valid types are 'rtl', 'postsyn',
'postroute', 'timing'. 'rtl' is default.
-inst : (optional) specify instance for the associated SDF
file.
-run : (optional) specify the number of timesteps for the
simulation to run.
valid <time_unit> must be one of the fs, ps, ns, us, ms,
sec. '0' means 'run -all'.
-t : (optional) specify the simulator time resolution.
<multiplier> is optional.
<time_unit> must be one of the fs, ps, ns, us, ms, sec.
-w : (optional) allow to overwrite existed simulation do
file.
-o : specify simulation do file path.
Example 1
The following command will compile all the Lattice FPGA libraries for both
Verilog and VHDL simulation, and place them under the folder specified by -
target_path. The path to Modelsim is specified by -sim_path.
cmpl_libs -sim_path C:/questasim64_10.4e/win64 -target_path c:/
mti_libs
Example 2
rvl_add_controller
% help rvl_add_controller
rvl_add_controller - Add the Controller Core into current
project
Usage:
rvl_add_controller
rvl_add_core
% help rvl_add_core
rvl_add_core - Add a new core in current project
Usage:
rvl_add_core <core name>
rvl_add_serdes
% help rvl_add_serdes
rvl_add_serdes - Add the Serdes Core into current project
Usage:
rvl_add_serdes
rvl_add_te
% help rvl_add_te
rvl_add_te - Add a new trigger expression to a debug core in
current project
Usage:
rvl_add_te [-core <core name>] [-ram <EBR|Slice>] [-name
<new TE name>] [-expression <expreesion string>] [-
max_seq_depth <max depth>] [-max_event_count <max event count>]
A default trigger expression name will be created if it's
omitted in command.
rvl_add_trace
% help rvl_add_trace
rvl_add_trace - Add signals in a debug core in current project
Usage:
rvl_add_trace [-core <core name>] [-insert_at <position>]
<signals list>
You can specify an existing trace signal/bus name or a
position number in a trace bus as the inserting position. For
example "signal1", "Bus1<1>", "Bus1<.end.>"...
rvl_add_tu
% help rvl_add_tu
rvl_add_tu - Add a new trigger unit to a debug core in current
project
Usage:
rvl_add_tu [-core <core name>] [-radix <bin|oct|dec|hex>]
[-name <new TU name>] <TU definition>
TU definition format: "{signal list} Operator Value"
Operator must be "==", "!=", ">", ">=", "<", "<=",
".RE."(rising edge), ".FE."(falling edge) and ".SC."(serial
compare).
A default trigger unit name will be created if it's omitted
in command.
rvl_close_project
% help rvl_close_project
rvl_close_project - Close the current reveal insert project
Usage:
rvl_close_project [-force>
rvl_del_controller
% help rvl_del_controller
rvl_del_controller - Remove the Controller Core from current
project
Usage:
rvl_del_controller
rvl_del_core
% help rvl_del_core
rvl_del_core - Remove an existing core from current project
Usage:
rvl_del_core <core name>
rvl_del_serdes
% help rvl_del_serdes
rvl_del_serdes - Remove the Serdes Core from current project
Usage:
rvl_del_serdes
rvl_del_te
% help rvl_del_te
rvl_del_te - Delete an existing trigger expression in a debug
core in current project
Usage:
rvl_del_te [-core <core name>] [TE name]
rvl_del_trace
% help rvl_del_trace
rvl_del_trace - Delete trace signals in a debug core in current
project
Usage:
rvl_del_trace [-core <core name>] <signals list>
rvl_del_tu
% help rvl_del_tu
rvl_del_tu - Delete an existing trigger unit in a debug core in
current project
Usage:
rvl_del_tu remove [-core <core name>] <TU name>
rvl_group_trace
% help rvl_group_trace
rvl_group_trace - Group specified trace signals in a debug core
in current project into a bus
Usage:
rvl_group_trace [-core <core name>] -bus <bus name>
<signals list>
rvl_list_core
% help rvl_list_core
rvl_list_core - List the default core in current project
Usage:
rvl_list_core
rvl_list_te
% help rvl_list_te
rvl_list_trace
% help rvl_list_trace
rvl_list_trace - List all trace signals in a debug core in
current project
Usage:
rvl_trace list_sig [-core <core name>]
rvl_list_tu
% help rvl_list_tu
rvl_list_tu - List all trigger units in a debug core in current
project
Usage:
rvl_list_tu [-core <core name>]
rvl_move_trace
% help rvl_move_trace
rvl_move_trace - Move and rearrange the order of signals in a
debug core in current project
Usage:
rvl_move_trace [-core <core name>] [-move_to <position>]
<signals list>
You can specify an existing trace signal/bus name or a
position number in a trace bus as the new position. For example
"signal1", "Bus1<1>", "Bus1<.end.>"...
rvl_new_project
% help rvl_new_project
rvl_new_project - Create a new reveal insert project
Usage:
rvl_new_project [-overwrite] [<new rvl file name>]
rvl_open_project
% help rvl_open_project
rvl_open_project - Open a reveal insert project file
Usage:
rvl_open_project <rvl file name>
rvl_rename_core
% help rvl_rename_core
rvl_rename_core - Rename an existing core in current project
Usage:
rvl_rename_core <core name> <new name>
rvl_rename_te
% help rvl_rename_te
rvl_rename_te - Rename an existing trigger expression in a
debug core in current project
Usage:
rvl_rename_te [-core <core name>] <old name> <new name>
rvl_rename_trace
% help rvl_rename_trace
rvl_rename_trace - Change the name of a trace bus in a debug
core in current project
Usage:
rvl_rename_trace [-core <core name>] -bus <bus name> <new
bus name>
rvl_rename_tu
% help rvl_rename_tu
rvl_rename_tu - Rename an existing trigger unit in a debug core
in current project
Usage:
rvl_rename_tu [-core <core name>] <old name> <new name>
rvl_run_project
% help rvl_run_project
rvl_run_project - Run inserting debug core task or DRC checking
on the current reveal insert project
Usage:
rvl_run_project [-save] [-saveAs <file_name>] [-overwrite]
[-drc] [-insert_core <core_name>]...
-save: Save the project before run command
-saveAs: Save as a different file before run command
-overwrite: Overwrite the existing file if the saved as to
file exists already
-drc: Run DRC checking only
-insert_core: Specify the core to be inserted
All cores will be inserted if none is specified.
rvl_save_project
% help rvl_save_project
rvl_save_project - Save the current reveal insert project
Usage:
rvl_save_project [-overwrite] [<new rvl file name>]
rvl_set_controller
% help rvl_set_controller
rvl_set_controller - List or set options of Controller items in
current project
Usage:
rvl_set_controller [-item
LED|Switch|Register|PLL1|PLL2|...] [-set_opt {opt_list}] [-
set_sig {sig_list}]
You can set opt_list with the following:
Insert=[on|off] for all item
Width=[1..32] for LED and Switch
You can set sig_list with the following:
SWn=signal where n=1 to Width for Switch
LEDn=signal where n=1 to Width for LED
Clock=clk_signal for Register
Clock_enable=en_signal for Register
Wr_Rdn=wr_rdn_signal for Register
Address=addr_bus for Register
WData=wdata_bus for Register
RData=rdata_bus for Register
rvl_set_core
% help rvl_set_core
rvl_set_core - Set a core as the default core in current
project
Usage:
rvl_set_core [core name]
rvl_set_serdes
% help rvl_set_serdes
rvl_set_serdes - List or set options of Serdes debug core
Usage:
rvl_set_serdes [<clk=clock name> [<rst=reset signal,
default value is VLO>]
rvl_set_te
% help rvl_set_te
rvl_set_te - Change an existing trigger expression in a debug
core in current project
Usage:
rvl_set_te [-core <core name>] [-ram <EBR|Slice>] [-
expression <expreesion string>] [-max_seq_depth <max depth>] [-
max_event_count <max event count>] <TE name>
rvl_set_traceoptn
rvl_set_trigoptn
% help rvl_set_trigoptn
rvl_set_trigoptn - List or set trigger options of a debug core
in current project
Usage:
rvl_set_trigoptn [-core <core name>] [option=value]
You can set the following option:
DefaultRadix = [bin|oct|dec|hex]
EventCounter = [on|off]
CounterValue = [2,4,8,16,...,65536] (depend on
FinalCounter is on)
TriggerOut = [on|off]
OutNetType = [IO|NET|BOTH] (depend on TriggerOut is on)
OutNetName = [net name] (depend on TriggerOut is on)
OutNetPri = [Active_Low|Active_High] (depend on
TriggerOut is on)
OutNetMPW = [pulse number]\n (depend on TriggerOut is
on)
rvl_set_tu
% help rvl_set_tu
rvl_set_tu - Set a trigger unit in a debug core in current
project
Usage:
rvl_set_tu [-core <core name>] [-radix <bin|oct|dec|hex>] -
name <TU name> [-add_sig <signal list>] [-del_sig <signal
list>] [-set_sig <signal list>][-expr <TU definition>] [-op
operator] [-val value]
TU definition format: "{signal list} Operator Value"
Operator must be "==", "!=", ">", ">=", "<", "<=",
".RE."(rising edge), ".FE."(falling edge) and ".SC."(serial
compare).
rvl_ungroup_trace
% help rvl_ungroup_trace
rvl_ungroup_trace - Ungroup trace signals in a trace bus in a
debug core in current project
Usage:
rvl_ungroup_trace [-core <core name>] <bus name>
This section illustrates and describes a few samples of Reveal Inserter Tcl
commands.
Example 1
To create a new Reveal Inserter project with the .rvl file extension in your
project directory, use the rvl_project command as shown below using the new
option.
rvl_new_project my_project.rvl
Example 2
The following table provides a listing of all valid Radiant software Reveal
Analyzer-related Tcl command options and describes option functionality.
rva_add_token
% help rva_add_token
rva_add_token - Add a token with new name and value in a
specific token set
Usage:
rva_add_token <tokenset name> <name=value>
rva_add_tokenset
% help rva_add_tokenset
rva_add_tokenset - Add a token set
Usage:
rva_add_tokenset [-tokenset <tokenset name>] [-bits <token
bits>] [-token <name=value>]
-tokenset: Set token set name
-bits: Set token set bits
-token: Add extra token
If no arguments specified, add a token set with default
name and bits.
rva_close_controller
% help rva_close_controller
rva_close_controller - Close Controller connection to Lattice
device after read/write finished
Usage:
rva_close_controller
rva_close_project
% help rva_close_project
rva_close_project - Close the current Reveal Analyzer project
Usage:
rva_close_project
rva_del_token
% help rva_del_token
rva_del_token - Delete a specific token in a specific token set
Usage:
rva_del_token <tokenset name> <token name>
rva_del_tokenset
% help rva_del_tokenset
rva_del_tokenset - Delete the specific token set
Usage:
rva_del_tokenset <tokenset name>
rva_export_project
% help rva_export_project
rva_export_project - Export waveform in VCD or TEXT from the
current Reveal Analyzer project
Usage:
rva_export_project <-vcd|-txt> <file name> [option]
You can set the following option:
-vcd <file name> [module <title>]
-txt <file name> [-siglist <signal list>]
By default, the module title is "<unknown>" and all signals
are exported.
rva_export_tokenset
% help rva_export_tokenset
rva_export_tokenset - Export all token set to a specific file
Usage:
rva_export_tokenset <file name>
rva_get_trace
% help rva_get_trace
rva_get_trace - Lists all trace signals in Analyzer core
Usage:
rva_get_trace
rva_import_tokenset
% help rva_import_tokenset
rva_import_tokenset - Import and merge all token set from a
specific file
Usage:
rva_import_tokenset <file name>
rva_manualtrig
% help rva_manualtrig
rva_manualtrig - Manual Trigger Reveal Analyzer to capture data
Usage:
rva_manualtrig
rva_new_project
% help rva_new_project
rva_new_project - Create a new Reveal Analyzer project
Usage:
rva_new_project -rva <file name> -rvl <file name> -dev
<val> -cable <val> -port <val> [-xcf <file name>]
-rva: Set the new rva file name
-rvl: Set the associated rvl file name
-dev: Set the device name
-cable: Set type of cable as USB or USB2
-port: Set logical port of cable as integer
-xcf: Optional xcf file name for multiple device chain
rva_open_controller
% help rva_open_controller
rva_open_controller - Open Controller connection to Lattice
device before read/write began
Usage:
rva_open_controller
rva_open_project
% help rva_open_project
rva_open_project - Open a Reveal Analyzer project file
Usage:
rva_open_project <rva file name>
rva_read_controller
% help rva_read_controller
rva_read_controller - Read data from 32bit address in hex
Usage:
rva_read_controller -addr <addr32>
rva_rename_te
% help rva_rename_te
rva_rename_te - Rename an existing trigger expression in a
debug core in current project
Usage:
rva_rename_te <name> <new name>
rva_rename_tu
% help rva_rename_tu
rva_rename_tu - Rename an existing trigger unit in a debug core
in current project
Usage:
rva_rename_tu <name> <new name>
rva_run
% help rva_run
rva_run - Run Reveal Analyzer until trigger condition to
capture data
Usage:
rva_run
rva_run_controller
% help rva_run_controller
rva_run_controller - Run command for Virtual LED, Virtual
Switch, User Memory and Hard IP Run command for User Control
Register and User Status Register
Usage:
rva_run_controller -read_led|-read_switch|-write_switch
<data>|-dump_memfile <mem_file>|-load_memfile <mem_file>|
-read_ip <ipname>|-write_ip <ipname>|-
eye_monitor <ipname>|
-read_status <regname>|-read_control
<regname>|-write_control <regname> -data <data>|-toggle_control
<regname>|
-dump_status <reg_file>|-dump_control
<reg_file>|-load_control <reg_file>
-read_led: Read data from Virtual LED
-read_switch: Read data from Virtual Switch
-write_switch: Write data to Virtual Switch
-dump_memfile: Dump data from User Memory to mem_file
-load_memfile: Load data from mem_file to User Memory
rva_save_project
% help rva_save_project
rva_save_project - Save the current Reveal Analyzer project
Usage:
rva_save_project [<new rva file name>]
rva_set_controller
% help rva_set_controller
rva_set_controller - Set the options for Controller core
Usage:
rva_set_controller [-option <value>]
-cable_type: Set type of cable as USB or USB2
-cable_port: Set logical port of cable as integer
If no arguments specified, then return list of options and
values.
rva_set_core
% help rva_set_core
rva_set_core - Set a core as the default core in current
project
Usage:
rva_set_core [-name <name>] [-run <on|off>]
-name: Select core. Needed for other actions
rva_set_project
% help rva_set_project
rva_set_project - Set the current Reveal Analyzer project
options
Usage:
rva_set_project [-frequency <val>] [-period <val>] [-
tckdelay <val>] [-cabletype <val>] [-cableport <val>]
-frequency: Set the frequency value for sample clockin MHz
-period: Set the period value for sample clock in ns or ps
-tckdelay: Set the TCK clock pin pulse width delay value
-cabletype: Set the type of cable. Values must be
"LATTICE","USB","USB2"
-cableport: Set the port number as integer >=0
rva_set_te
% help rva_set_te
rva_set_te - Change an existing trigger expression in a debug
core in current project
Usage:
rva_set_te [-name <name>] [-expression <expression list>]
[-enable <on|off>]
-name: Select TE. If no options specified, return options
and values for the selected TE.
-expression: Set TE expression
-enable: Enable/disable TE
If no arguments specified, then return list of TE.
rva_set_token
% help rva_set_token
rva_set_token - Select a specific token in a specific token set
Usage:
rva_set_token <tokenset name> <token name> -name <new token
name> -value <new token value>
-name: Set token name
-value: Set token value
rva_set_tokenset
% help rva_set_tokenset
rva_set_tokenset - Select a specific token set
Usage:
rva_set_tokenset <tokenset name> [-name <new token set
name>] [-bits <new token bits>]
-name: Rename a token set
-bits: Set number of bits in token
rva_set_trigoptn
help rva_set_trigoptn
rva_set_tu
% help rva_set_tu
rva_set_tu - Set a trigger unit in a debug core in current
project
Usage:
rva_set_tu [-name <name>] [-operator {== | != | > | >= | <
| <= | "rising edge" | "falling edge"}][-value <value>] [-radix
{bin | oct | dec | hex | <token>}]
-name: Select TU. If no options specified, return options
and value for the selected TU.
-operator: Sets TU comparison operator
-value: Sets TU value
-radix: Sets TU radix
If no arguments specified, return list of TU.
rva_stop
% help rva_stop
rva_stop - Stop Reveal Analyzer without capturing data
Usage:
rva_stop
rva_target_controller
rva_write_controller
% help rva_write_controller
rva_write_controller - Write data to 32bit address in hex
Usage:
rva_write_controller -addr <addr32> -data <data>
This section illustrates and describes a few samples of Reveal Analyzer Tcl
commands.
Example 1
The following command line example shows how to specify a new project that
uses a parallel cable port.
rva_new_project –rva untitled –rvl "count.rvl" –dev "LFXP2-
5E:0x01299043" –port 888 –cable LATTICE
Example 2
The following table provides a listing of all valid Radiant software Power
Calculator-related Tcl command options and describes option functionality.
pwc_set_afpervcd Open vcd file and set frequency and activity factor.
pwc_add_inactiveimpl
% help pwc_add_inactiveimpl
pwc_add_inactiveimpl - Add inactive implementation name
Usage:
pwc_add_inactiveimpl [<implementation name>]
pwc_add_ipblock
% help pwc_add_ipblock
pwc_add_ipblock - Add IP Block row
Usage:
pwc_add_ipblock -iptype <iptype name>
pwc_calculate
% help pwc_calculate
pwc_calculate - Run power calculation for current project
Usage:
pwc_calculate
pwc_close_project
% help pwc_close_project
pwc_close_project - Close the current project
Usage:
pwc_close_project
pwc_gen_htmlreport
% help pwc_gen_htmlreport
pwc_gen_htmlreport - Generate HTML report and write to file
Usage:
pwc_gen_htmlreport <report file>
pwc_gen_report
% help pwc_gen_report
pwc_gen_report - Generate text report and write to file
Usage:
pwc_gen_report <report file>
pwc_new_project
% help pwc_new_project
pwc_new_project - Create a new project
Usage:
pwc_new_project <project file>
pwc_open_project
% help pwc_open_project
pwc_open_project - Open a project file
Usage:
pwc_open_project <project file>
pwc_remove_ipblock
% help pwc_remove_ipblock
pwc_remove_ipblock - Remove IP Block row
Usage:
pwc_remove_ipblock -iptype <iptype name> -matchkeys {<key1>
<value1>}+
pwc_save_project
% help pwc_save_project
pwc_save_project - Save the current project
Usage:
pwc_save_project <project file>
pwc_set_af
% help pwc_set_af
pwc_set_af - Set default activity factor
Usage:
pwc_set_af <activity factor>
pwc_set_afpervcd
% help pwc_set_afpervcd
pwc_set_afpervcd - Open vcd file and set frequency and activity
factor
Usage:
pwc_set_afpervcd <vcd file>
pwc_set_ambienttemp
% help pwc_set_ambienttemp
pwc_set_ambienttemp - Set ambient temperature value
Usage:
pwc_set_ambienttemp <ambient temperature>
pwc_set_device
% help pwc_set_device
pwc_set_device - Set device information
Usage:
pwc_set_device -family <family name>
: Set family
pwc_set_device -device <device name>
: Set device
pwc_set_device -package <package name>
: Set package
pwc_set_device -speed <speed name>
: Set speed
pwc_set_device -operating <operating name>
: Set operating
pwc_set_device -part <part name>
: Set part
pwc_set_estimation
% help pwc_set_estimation
Usage:
pwc_set_estimation <estimated routing option>
pwc_set_freq
% help pwc_set_freq
pwc_set_freq - Set frequency
Usage:
pwc_set_freq <frequency>
: Set default frequency
pwc_set_freq <clock> <frequency>
: Set clock frequency
pwc_set_freq -freq <frequency> -usefreqtwr <0|1> -
freqtwropt <min|pref|trace>
: Set frequency by importing timing report
pwc_set_ipblock
% help pwc_set_ipblock
pwc_set_ipblock - Set IP Block row
Usage:
pwc_set_processtype
% help pwc_set_processtype
pwc_set_processtype - Set device power process type
Usage:
pwc_set_processtype <process type>
pwc_set_supply
% help pwc_set_supply
pwc_set_supply - Set multiplication factor and voltage of named
power supply
Usage:
pwc_set_supply -type <type> -voltage <voltage> -dpm <dpm>
pwc_set_thetaja
% help pwc_set_thetaja
pwc_set_thetaja - Set user defined theta JA
Usage:
pwc_set_thetaja <theta JA>
This section illustrates and describes a few samples of Power Calculator Tcl
commands.
Example 1
The follow command below creates a PWC project (.pcf) file namced “abc.pcf”
from an input UDB file named “abc.UDB”:
pwc_new_project abc.pcf -udb abc.udb
Example 2
Example 3
pwc_save_project newname.pcf
Example 4
To create an HTML report, you would run a command like the one shown
below:
pwc_gen_htmlreport c:/abc.html
The following table provides a listing of all valid Radiant software ECO-related
Tcl command options and describes option functionality.
eco_config_block
% help eco_config_block
eco_config_block - Config general IP
Usage:
eco_config_memory
% help eco_config_memory
eco_config_memory - Update memory initial value
Usage:
eco_config_memory -mem_id <memory_id> {-init_file
<mem_file> -format HEX|BIN|ADDR} | -all_0 | -all_1
eco_config_sysio
% help eco_config_sysio
eco_config_sysio - Config sysio setting
Usage:
eco_config_sysio -comp <comp_name> {<key=value>}...
eco_save_design
% help eco_save_design
eco_save_design - Save cuurent design to disk
Usage:
eco_save_design [-udb <udb_file>]
This section illustrates and describes a few samples of ECO Tcl commands.
Example 1
Example 2
The following table provides a listing of all valid Radiant software IP version
update-related Tcl command options and describes option functionality.
ip_catalog_list
% help ip_catalog_list
ip_catalog_list - Return a list of IP, it contains the IP from
Radiant install package, IP server and customer's packaged IP.
Usage:
ip_catalog_list [-name <IP name>]
ip_upgrade
% help ip_upgrade
ip_upgrade - Upgrade and regenerate the IP in a project with a
more recent version
Usage:
ip_upgrade -all [-force_update]
: Upgrade all IPs to the latest version that can be
found locally.
ip_upgrade -ipx <ipx file path> [-force_update] [-version
<version number>]
: Upgrade one IP to the latest version or specified
version that can be found locally.
Example 1
The following demonstrates the ip_upgrade to update one ipx file command.
ip_upgrade -ipx {D:\temp\ip_upgrade_test\i3c102\i3c102.ipx}
Example 2
The following demonstrates the ip_upgrade to update all ipx files command.
ip_upgrade -all
The following table provides a listing of all valid Radiant software message
control-related Tcl command options and describes option functionality.
Note:
Run the msg_save command after entering msg_promote. Otherwise, the information
will not be saved.
msg_clean
% help msg_clean
msg_clean - Reset the setting of promoted and disabled
message(s) from the current project
Usage:
msg_clean <message Id>|-all
msg_demote
% help msg_demote
msg_demote - Demote the message from the current project
Usage:
msg_demote <message Id>
msg_disable
% help msg_disable
msg_disable - Disable the message from the current project
Usage:
msg_disable <message Id>
msg_list_status
% help msg_list_status
msg_list_status - List all promoted or disabled messages from
the current project
Usage:
msg_list_status [-promoted|-disabled]
msg_load
% help msg_load
msg_load - Load the setting of all promoted and disabled
messages from the file, default is promote.xml
Usage:
msg_load [<message xml or pmt file>]
msg_promote
% help msg_promote
msg_promote - Set the message promotion type, 0is error, 1 is
critical, 2 is warning, and 3 is info
Usage:
msg_promote <message Id> [-type <0|1|2|3>]
msg_save
Default is promote.xml.
% help msg_save
msg_suppress
%help msg_suppress
msg_suppress - Suppress the message from the current project,
set maximum display count
Usage:
msg_suppress <message Id> -cnt <0|10>
: Set maximum display count for the
message, 0 is disabled, and 10 means only display the message
10 times
This section illustrates and describes a few samples of Message Control Tcl
commands.
Example 1
The following demonstrates how to promote the message to error from the
current project.
msg_promote 70001926 -type 0
Example 2
The following demonstrates how to show all promoted messages from the
current project.
msg_list_status –promoted
Example 3
The following demonstrates how to save the settings of all promoted and
disabled messages to defaut promote.xml file.
msg_save
The following table provides a listing of all valid Radiant software placement-
related Tcl command options and describes option functionality.
plc_list_option
% help plc_list_option
Usage information:
Var/FlagName Type Value Help
------------ ---- ----- ----
(-help gives this help)
plc_output_instance_location
% help plc_output_instance_location
Usage information:
Var/FlagName Type Value Help
------------ ---- ----- ----
(-help gives this help)
-all boolflag (false) All instance types
-pio boolflag (false) PIO instance types
-dsp boolflag (false) DSP instance types
-ebr boolflag (false) EBR instance types
-slice boolflag (false) Slice instance types
-all_constraint boolflag (false) Include all constraints
-file string () File name
?inst_names? list () Instance names
plc_report
% help plc_report
Usage information:
Var/FlagName Type Value Help
------------ ---- ----- ----
(-help gives this help)
plc_run
% help plc_run
Usage information:
Var/FlagName Type Value Help
------------ ---- ----- ----
(-help gives this help)
plc_set_option
% help plc_set_option
Usage information:
Var/FlagName Type Value Help
------------ ---- ----- ----
(-help gives this help)
?key_values? list () Placement <key, value> pairs
The following table provides a listing of all valid Radiant software routing-
related Tcl command options and describes option functionality.
rte_list_option
% help rte_list_option
Usage information:
Var/FlagName Type Value Help
------------ ---- ----- ----
(-help gives this help)
rte_report
% help rte_report
Usage information:
Var/FlagName Type Value Help
------------ ---- ----- ----
(-help gives this help)
-net boolflag (false) Report the nets
rte_run
% help rte_run
Usage information:
Var/FlagName Type Value Help
------------ ---- ----- ----
(-help gives this help)
rte_set_option
% help rte_set_option
Usage information:
Var/FlagName Type Value Help
------------ ---- ----- ----
(-help gives this help)
?key_values? list () Routing options
The following table provides a listing of all valid Radiant software bitstream
generation-related Tcl command options and describes option functionality.
bit_generate
% help bit_generate
Usage information:
Var/FlagName Type Value Help
------------ ---- ----- ----
(-help gives this help)
bit_list_option
% help bit_list_option
Usage information:
Var/FlagName Type Value Help
------------ ---- ----- ----
(-help gives this help)
bit_set_option
% help bit_set_option
Usage information:
Var/FlagName Type Value Help
------------ ---- ----- ----
(-help gives this help)
?key_values? list () bitgen options
Chapter 10
Advanced Topics
There is one shared database that contains the device, design, and constraint
information in system memory.
External tools referenced from within the Radiant software, such as those for
synthesis and simulation, use their own memory in addition to what is used by
the Radiant software.
Because it is accessing shared memory, the initial tool view launch will take
longer than the launch of subsequent views.
If you have open tool views that will be affected by clearing the tool memory, a
confirmation dialog box will open to give you the opportunity to cancel the
memory clear.
Tcl Scripts
The Radiant Extended Tcl language enables you to create customized scripts
for tasks that you perform often in the Radiant software. Automating these
operations through Tcl scripts not only saves time, but also provides a uniform
approach to design. This is especially useful when you try to find an optimal
solution using numerous design implementations.
2. Open the project and perform the commands that you want to save as a
script.
3. Optionally, enter the history command in the Tcl Console window to
ensure that the commands you wish to save are in the console’s memory.
In the Tcl Console window type
save_script <filename.tcl>
The <filename.tcl> can be any file identifier that has no spaces and
contains no special characters except underscores. For example,
myscript.tcl or design_flow_1.tcl are acceptable save_script values, but
my$script or my script are invalid. A file name with an extension of .ext
will not work.
The <filename.ext> entry can be preceded with an absolute or relative
path. Use the "/" (i.e. forward slash) symbol to delimit the path elements.
If the path is not specified, the script is saved in the current working
directory. The current working directory can be determined by using the
TCL pwd command.
4. Navigate to your script file and use the text editing tool of your choice to
make any necessary changes, such as deleting extraneous lines or
invalid arguments.
In most cases, you will need to edit the script you saved and take out any
invalid arguments or any commands that cannot be performed in the Radiant
software environment due to a conflict or exception. You will likely have to
revisit this step later if after running your script, you experience any run errors
due to syntax errors or technology exceptions.
To run a Tcl script that opens a project, runs processes and closes the
project:
1. Open the Radiant software but do not open your project. If your project is
open, choose File > Close Project.
2. If you are using the Radiant software main window, click the small arrow
pane switch in the bottom of the Radiant software main window, and then
click on the Tcl Console tab in the Output area at the bottom to open the
console.
3. If there are previously issued commands in the console, type reset in the
console command line to refresh your session and clear out all previous
commands.
reset
4. Use the TCL source command to load and run your TCL script. Since it’s
the only argument, the source command requires the filename of the
script you want to load and run. Prefix the script file name with any
required relative or absolute path information. To run the example script
shown in the previous section use the following:
source C:/lscc/radiant/<version_number>/examples/counter/
myscript2.tcl
5. As long as there are no syntax errors or invalid arguments, the script will
open the project, synthesize, map, and place-and-route the design. Once
the design finishes it closes the project. If there are errors in the script,
you will see the errors in red in the Tcl Console after you attempt to run it.
Go back to your script and correct the errors that prevented the script from
running.
Project Archiving
A Radiant software project archive is a single compressed file (.zip) of your
entire project. The project archive can contain all of the files in your project
directory, or it can be limited to source-related files. When you use the File >
Archive Project command, the dialog box provides the option to “Archive all
files under the Project directory.” When you select this option, the entire
project is archived. When you clear this option, only the project’s source-
related files, including strategies, are archived. Many of these source-related
files must be archived in order to achieve the same bitstream results for a fully
implemented design.
Whichever archiving method you select, if your project contains source files
stored outside the project folder, the remote files will be compressed under
the remote_files subdirectory in the archive; for example:
<project_name>/remote_files/sources
<project_name>remote_files/strategies
When unarchiving, you must manually move the archived remote files to the
original locations or the project will not work.
File Descriptions
This section provides a list of the file types used in the Radiant software,
including those generated during design implementation. The Archive column
indicates the files that must be archived in order to achieve the same
bitstream results.
.fdc FPGA Design Constraint file Used for specifying design constraints for
Synplify-Pro synthesis tool.
.ipk Radiant Software IP Package file. Package file for Radiant software Soft IP.
.ldc Lattice Design Constraint file Used for specifying timing constraints for LSE
synthesis flow. The .ldc contents will be
combined into design database file .udb.
.pcf Power Calculator project file Stores power analysis results from information
extracted from the design project.
.rdf Radiant Software Project file Used for managing and implementing all project
files in the Radiant software.
.rva Reveal Analyzer file Defines the Reveal Analyzer project and
contains data about the display of signals in
Waveform View.
.rvl Reveal Inserter debug file Defines the Reveal project and its modules,
identifies the trace and trigger signals, and
stores the trace and trigger options.
.spf Simulation project file, a script file Used for running the simulator for your project
produced by the Simulation Wizard from the Radiant software.
.sv SystemVerilog
.xcf Configuration chain file Used for programming devices in a JTAG daisy
chain.
<instName>_bb.v Verilog IP black box file Provides the Verilog synthesis black box
for the IP core and defines the port list.
<instName>.cfg IP parameter configuration file Used for re-creating or modifying the core
in the IP Catalog tool.
<instName>.svg Scalable Vector Graphics file A graphic file used to display module/IP
schematic and ports.
<instName>_tmpl.vhd VHDL module template file A template for instantiating the generated
module. This file can be copied into a
user VHDL file.
.ibs Post-Route I/O buffer information Used for analyzing signal integrity
specification file (IBIS) and electromagnetic compatibility
(EMC) on printed circuit boards.
.pad Post-Route PAD report file Lists all programmable I/O cells used
in the design and their associated
primary pins.
.par Post-Route Place & Route report file Summarizes information from all
iterations and shows the steps taken
to achieve a placement and routing
solution.
<Design name>_vo.sdf Post-Route SDF simulation file for Used for timing simulation.
Verilog
.udb Unified Design Database file Compiled from HDL design source. It
may contain both design netlist and
constraints.
Revision History
The following table gives the revision history for this document.