Identify Debugger Ug Synplify
Identify Debugger Ug Synplify
Identify®
Instrumentor and Debugger
for Microchip User Guide
January 2024
Disclaimer
SYNOPSYS, INC., AND ITS LICENSORS MAKE NO WARRANTY OF ANY
KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS MATERIAL,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
Trademarks
Synopsys and certain Synopsys product names are trademarks of Synopsys,
as set forth at
http://www.synopsys.com/Company/Pages/Trademarks.aspx.
LO
All other product or company names may be trademarks of their respective
owners.
Third-Party Links
Any links to third-party websites included in this document are for your
convenience only. Synopsys does not endorse and is not responsible for such
websites and their practices, including privacy practices, availability, and
content.
Synopsys, Inc.
690 East Middlefield Road
Mountain View, CA 94043
www.synopsys.com
January 2024
LO
Contents
LO
You can use the hardware platforms from the Synopsys HAPS® proto-
typing products for debug. You can also use the Identify functionality
with third-party hardwares or on your own boards. The Identify
LO
documentation does not cover these custom design flows.
If you need to iterate, use incremental runs. After synthesis, you can
view the results in the HDL source code or in the waveform viewer.
For information about running the debugger, see Launching the Identify
Tool, on page 15.
LO
On launching the instrumentor tool, the design hierarchy and the RTL file
content with all the potential instrumentation marked and available for selec-
tion are displayed.
To run a Tcl startup file and open the instrumentor in the graphical user
interface:
• identify_instrumentor -f fileName.tcl
If the optional -version argument is included, the above command displays the
software version without opening the instrumentor.
LO
box, click the Browse for Project.. button, navigate to the project directory
and open the corresponding project (prj) file.
To run the debugger from a Tcl startup file that opens the tool in the graph-
ical user interface:
• identify_debugger -f fileName.tcl
If the optional -version argument is included, the above command reports the
software version without opening the tool.
To explicitly invoke the tool from a Windows operating system, do one of the
following:
LO
The first step to debug is to instrument the design, which prepares the design
for debugging. Instrumentation consists of adding specific logic, which is
used to run on-chip debugging, after programming the FPGA. It is best to
instrument early and reserve the resources needed for instrumentation,
instead of doing it after the design is in place.
To include the original HDL source with the exported design files, select Instru-
mentor > Instrumentor Preferences and enable the Save original source in
instrumentation directory check box. If the original source is to be encrypted,
additionally enable the Use encryption check box.
LO
Finally, select the File > Save from the main menu to capture your instrumen-
tation.
LO
identify_instrumentor
For few guidelines on instrumenting the design and debug planning, see
Instrumenting a Netlist After Compile, on page 25.
4. Save the design by clicking the Save/Save All button from the main menu.
The tool writes out an idc file with information about the instrumented
design. You can open this file on subsequent runs with the edit idc
command.
See the scripts provided with the tool for examples of simple scripts you
LO
can use to automate instrumentation tasks. Also refer to the example in
Adding Instrumentation, on page 28.
6. Click the Run button to compile the instrumented design or use the
following command.
From the GUI, click the RTL view icon to view the data schematic by
clicking the RTL view icon ( ) in the GUI or using the view schematic
command, which allows you trace nodes back to the original RTL.
You can also instrument signals in the schematic. The schematic instru-
mentation can be in addition to the RTL-based instrumentation that was
done earlier, or as an alternative to it.
This approach offers slightly less visibility into the design than pre-compile
instrumentation, but the design is at a more stable stage, with the RTL elabo-
rated. You can use complex trigger and muxing options for the instrumenta-
tion. The downside to post-compile instrumentation is that some compiler
optimizations might affect the observability and affect mapping to RTL. You
could create a script to check post-compile signals against the RTL to instru-
ment the design and flag mismatches.
With a compiled netlist, you can instrument the signals directly in the
compiled netlist file, outside the instrumentor. This allows you to update
instrumentation that was inserted previously. It also allows you to instru-
ment signals within a parameterized module, which were unavailable for
instrumentation before compilation.
2. Click the RTL view icon to view the schematic of the compiled project.
LO
5. Run pre-map. This will re-run the entire synthesis flow till map.
Adding Instrumentation
The following sections describe basic procedures to add instrumentation.
• Selecting Signals for Data Sampling, on page 28
• Instrumenting Buses, on page 30
• Adding Partial Instrumentation, on page 33
• Adding Multiplexed Groups, on page 34
• Sampling Signals in a Folded Hierarchy, on page 35
• Instrumenting the Verdi Signal Database, on page 37
• Selecting Breakpoints, on page 38
• Selecting Breakpoints in Folded Hierarchies, on page 38
• Configuring the IICE, on page 39
• Synthesizing Instrumented Designs, on page 40
• Capturing Commands from the Tcl Script Window, on page 40
1. In the RTL tab, click the watchpoint icon next to the signal name.
2. Select the signals for sampling, triggering, or both from the pop-up
menu.
LO
When the watchpoint icon is clear (unfilled), the signal has not been
instrumented. The colors of the filled icons are described in the following
table:
You can use Find to recursively search for signals and then instrument
selected signals directly from the Find dialog box (see Capturing
Commands from the Tcl Script Window, on page 40).
– Never instrument the following input and output buffer signals, as
they cause an error in the synthesis tool during subsequent mapping:
input of IBUF or IBUFG, and output of OBUF or OBUFT. These
signals either drive or are driven by user logic.
– To control the overhead for the trigger logic, always instrument
signals that are not needed for triggering with the Sample only selection
(the watchpoint icon is blue for sample-only signals).
– Specify a qualified clock signals as the sample clock (see the Debug
Environment Reference Manual). You can also specify bus segments
individually (see Instrumenting Buses, on page 30). In addition,
signals specified as Sample and trigger or Sample only can be included in
multiplexed groups as described in Adding Multiplexed Groups, on
page 34.
The example below shows how signal grant1 is enabled for sample and
trigger.
The TCL Script window at the bottom displays the Tcl command that
implements the selection and the results of executing the command.
To disable a signal for sampling or triggering, select the signal from the
RTL tab and then select Not instrumented from the popup menu; the
watchpoint icon will again be clear (unfilled).
Instrumenting Buses
Entire buses, individual bits, or groups of bits of a bus can be individually
instrumented.
• Instrumenting a Partial Bus, on page 30
• Instrumenting Single Bits of a Bus, on page 31
• Instrumenting Non-Contiguous Bits or Bit Ranges, on page 32
• Changing the Instrumentation Type, on page 32
1. Place the cursor over a LO bus that is not fully instrumented and select Add
Partial Instrumentation. The following dialog box is displayed.
2. In the dialog box, enter the most- and least-significant bits in the MSB
and LSB fields.
When specifying the MSB and LSB values, the index order of the bus
must be followed. For example, when defining a partial bus range for
bus [63:0] (or “63 downto 0”), the MSB value must be greater than the
LSB value. Similarly, for bus [0:63] (or “0 upto 63”), the MSB value must
be less that the LSB value.
3. Select the type of instrumentation for the specified bit range from the
radio buttons and click OK.
When you click OK, a large letter “P” is displayed to the left of the bus
name in place of the watchpoint icon. The color of this letter indicates if
the partial bus is enabled for triggering only (red), for sampling only
(blue), or for both sampling and triggering (green).
1. Enter the bit value in the MSB field of the Add partial bus dialog box.
1. Instrument the first bit range or bit. See Instrumenting a Partial Bus, on
page 30.
2. Re-position the cursor over the bus, right-click and select Add partial
instrumentation to redisplay the Add partial bus dialog box.
2. Highlight the bit range or bit to be changed and select the new
instrumentation type from the menu.
LO
3. Enter the most- and least-significant bits in the MSB and LSB fields and
select type of instrumentation.
Instance Color
All instances sample only Blue
The figure below shows the partial instrumentation icon on signal tt. The
yellow color indicates that the individual fields (tt.r2 and tt.c2) are
assigned different types of instrumentation.
The Search Panel also uses the partial instrumentation icon to show the state
of instrumentation on fields of partially instrumented records (see Capturing
Commands from the Tcl Script Window, on page 40).
2. In the Add mux group dialog box displayed, select a corresponding group
by checking the group number.
LO
For information on using multiplexed groups in the debugger, see Using Mux
Sets, on page 119.
2. Click the watchpoint icon or the signal name to get the list of instances
of the signal.
3. Select one or all instances of the signal by selecting the signal instance
and then sliding the cursor over to select the type of sampling to be
instrumented.
Instance Color
All instances sample only Blue
2. Select the instance from the list displayed, and select Not instrumented.
2. Parse the essential signal list from the ESDB using the command:
verdi instrument
Limitation
The instrumentation of all signals in the essential signal database may not be
possible due to changes in the original signal names during optimization by
the synthesis tool or differences in the signal naming conventions between
the instrumentor and Verdi tools.
Selecting Breakpoints
Breakpoints are used to trigger data sampling. Only the breakpoints that
are instrumented in the instrumentor can be enabled as triggers in the
debugger.
2. Click the breakpoint icon to get the list of instances of the breakpoint
are available for sampling.
The lines in the list of breakpoint instances act to toggle the selection of an
instance of the breakpoint. To disable an instance of a breakpoint that has
been previously selected, simply select the appropriate line in the list box.
LO
Adding IICE
Either of the following action opens the Add IICE dialog box to define the type
and name of the new IICE unit.
• Click Add IICE icon on the instrumentor graphical window to define
an additional IICE unit for the current design.
• Select Instrumentor > IICE > Add IICE from the menu bar.
When you click OK, the HDL source code in the RTL window is redisplayed
without any signals instrumented. The Instrumentation window is cleared,
and the IICE selection reported in the status panel on the left is updated with
the name of the IICE unit. When creating a new IICE unit:
• Select Regular (the default) to add a normal IICE unit.
• Optionally enter a name for the IICE unit in the Name field. By default,
the IICE name is formed by adding an _n suffix to IICE (for example,
IICE_0, IICE_1, etc.).
1. Select the name of the target IICE unit appears in the Control Panel tab.
2. Click the Edit IICE icon in the top menu bar or click the entry for the IICE
Type field in the Control Panel to display the Edit IICE Settings dialog box. For
detailed information on IICE settings, see the Debug Environment
Reference Manual.
LO
3. Select or define the required IICE settings in the following tabs:
– IICE Sampler Tab – Select buffer type for the external memory
configuration, define sample depth, and select allow qualified
sampling, always-armed triggering, and data compression checkbox
to perform the same in debugger.
– IICE Clock Tab – Select the sample clock and clock edge.
– IICE Controller Tab – Define complex counter trigger width specification
and state machine triggering specifications.
– IICE Options Tab – Set trigger-signal export and cross triggering.
For details description of the tabs, see Debug Environment Reference Manual.
2. Select Instrumentor > IICE > Delete IICE from the top menu or click on the
Delete IICE icon in the instrumentor GUI.
Saving a design generates an idc file and adds compiler pragmas in the form
of constraint files to the design RTL for the instrumented signals and break
points. This information is then used to incorporate the instrumentation logic
(IICE and COMM blocks) into the synthesized netlist.
LO
Adding Triggers
The triggering modes can be broadly classified as simple triggering mode and
the complex triggering mode. The simple mode allows comparing signals to
values (including don’t cares) and then triggering when the signals match
those values. This scheme can be enhanced by using breakpoints to denote
branches in control logic. If a breakpoint is enabled, this particular branch
must be active at the same time that the signals match their respective
values. The overall trigger logic involves signals and breakpoints in the
following way:
• Signals: All signals must match their respective comparison values in
order to trigger.
• Breakpoints: All breakpoints are OR connected, which means that any
one enabled breakpoint is enough to trigger.
• Signals and breakpoints are combined using AND, such that all signals
must match their values AND at least one enabled breakpoint must
occur.
In the advance triggering mode, you can define complex trigger conditions
using the advance triggering techniques. For instance, the state machine
based triggering enables you to trigger on a certain sequence of events like
“trigger if pattern A occurs exactly five cycles after pattern B, but only if
pattern C does not intervene.”
1. In the instrumentor tool, select Instrumentor > IICE > Edit IICE from the
menu bar or click the Edit IICE icon.
2. From the Edit IICE Settings dialog box, select the IICE Sampler tab, click the
Allow qualified sampling checkbox.
See also:
• Always-Armed based Triggering, on page 106
• Debug Environment Reference Manual
LO
1. In the instrumentor tool, select Instrumentor > IICE > Edit IICE from the
menu bar or click the Edit IICE icon.
2. From the Edit IICE Settings dialog box, select the IICE Sampler tab, click the
Allow always-armed triggering checkbox.
See also:
• Always-Armed based Triggering, on page 106
• Debug Environment Reference Manual
1. In the instrumentor tool, select Instrumentor > IICE > Edit IICE from the
menu bar or click the Edit IICE icon.
2. From the Edit IICE Settings dialog box, select the IICE Sampler tab, click the
Allow data compression checkbox or use the following command:
1. Select Instrumentor > IICE > Edit IICE from the menu bar or click the Edit IICE
icon.
2. From the Edit IICE Settings dialog box, select the IICE Controller tab.
3. Select the Complex counter triggering option and enter the Counter width.
See Debugging with the Complex Counter, on page 108, for details on how to
debug with complex counter.
1. Select Instrumentor > IICE > Edit IICE from the menu bar or click the Edit IICE
icon.
2. From the Edit IICE Settings dialog box, select the IICE Options tab.
Note: When using external triggers, the pin assignments for the corre-
sponding input ports must be defined in the synthesis or place
and route tool.
LO
1. Select Instrumentor > IICE > Edit IICE from the menu bar or click the Edit IICE
icon.
2. From the Edit IICE Settings dialog box, select the IICE Options tab.
1. Select Instrumentor > IICE > Edit IICE from the menu bar or click the Edit IICE
icon.
2. From the Edit IICE Settings dialog box, select the IICE Options tab, click the
Allow cross-triggering in IICE checkbox.
Remote Triggering
Remote triggering allows one debugger executable to send a software trigger
event to terminate data collection in the other debugger executables, effec-
tively creating a remote stop button. It is a scripting application. The IICE or
debugger targets are defined by the debugger remote_trigger command (see the
command description in the Debug Environment Reference Manual).
LO
To use an external logic analyzer for debug, set up real-time debug with a
new IICE (iice new command) instead of specifying a buffer type.
1. Set the buffer type from the GUI or the command line:
– In the instrumentor tool, select the IICE icon, from the IICE Sampler
tab, set the buffer type.
– To use the command line, include this command in the idc file:
– BRAM:
Instrumentor logic that uses distributed RAM blocks (part of the
FPGA resources) to store sample data. You can use this for
single-FPGA or multi-FPGA debug. See Using BRAM for Debugging, on
page 118 for details.
– DDR3 Daughter board:
Instrumentor logic that uses external DDR3 memory to store sample
data. Allows larger memory depth as compared to the BRAM based
instrumentation.
Support Limitations
The debug environment fully supports the synthesizable subset of both Ver-
ilog and VHDL design languages. Designs with a mixture of VHDL and Verilog
languages can be debugged – the software reads the design files in either lan-
guage.
There are some limitations on which parts of a design can be instrumented by
the instrumentor. However, in most cases you can always instrument all
other parts of your design.
The instrumentation limitations are usually related to language features.
These limitations are described in these sections.
• VHDL Instrumentation Limitations, on page 52
• Verilog Instrumentation Limitations, on page 54
• SystemVerilog Instrumentation Limitations, on page 57
Design Hierarchy
Entities that are instantiated more than once are supported for instrumenta-
tion with the exception that signals that have type characteristics specified by
unique generic parameters cannot be instrumented.
Subprograms
Subprograms such as VHDL procedures and functions cannot be instru-
mented. Signals and breakpoints within these specific subprograms cannot
be selected for instrumentation.
Loops
Breakpoints within loops cannot
LO be instrumented.
Generics
VHDL generic parameters are fully supported as long as the generic param-
eter values for the entire design are identical during both instrumentation
and synthesis.
Transient Variables
Transient variables defined locally in VHDL processes cannot be instru-
mented.
Or:
process begin
wait until clk’event and clk = '1'
synchronous_assignments;
end process;
The reset polarity and clock-edge specifications above are only exemplary.
The debug software has no restrictions with respect to the polarity of reset
and clock. A coding style that uses wait statements must have only one wait
statement and it must be at the top of the process.
Using any other coding style for flip-flop inferring processes will have the
effect that no breakpoints can be instrumented inside the corresponding
process. During design compilation, the instrumentor issues a warning when
the code cannot be instrumented.
Subprograms
Subprograms such as Verilog functions and tasks cannot be instrumented.
Signals and breakpoints within these specific subprograms cannot be
selected for instrumentation.
Loops
Breakpoints within loops cannot be instrumented.
Parameters
LO
Verilog HDL parameters are fully supported. However, the values of all the
parameters throughout the entire design must be identical during instru-
mentation and synthesis.
adder.v File
module adder (cout, sum, a, b, cin);
parameter size = 1;
output cout;
output [size-1:0] sum;
input cin;
input [size-1:0] a, b;
assign {cout, sum} = a + b + cin;
endmodule
adder8.v File
`include "adder.v"
module adder8 (cout, sum, a, b, cin);
output cout;
parameter my_size = 8;
output [my_size - 1: 0] sum;
input [my_size - 1: 0] a, b;
input cin;
adder #(my_size) my_adder (cout, sum, a, b, cin);
endmodule
adder16.v File
`include "adder.v"
module adder16 (cout, sum, a, b, cin);
output cout;
parameter my_size = 16;
output [my_size - 1: 0] sum;
input [my_size - 1: 0] a, b;
input cin;
adder #(my_size) my_adder (cout, sum, a, b, cin);
endmodule
There is a workaround for this limitation. Make a copy of the include file and
change one particular include statement to refer to the copy. Signals and
breakpoints that originate from the copied include file can now be instru-
mented.
Macro Definitions
The code inside macro definitions cannot be instrumented. If a macro defini-
tion contains important parts of some instrumentable code, that code also
cannot be instrumented. For example, if a macro definition includes the case
keyword and the controlling expression of a case statement, the case state-
ment cannot be instrumented.
Always Blocks
Breakpoints inside a synchronous flip-flop inferring an always block can only
be instrumented if the always block follows the coding styles outlined below:
LO
For flip-flops with asynchronous reset:
The reset polarity and clock-edge specifications and the use of begin blocks
above are only exemplary. The instrumentor has no restrictions with respect
to these other than required by the language.
For other coding styles, the instrumentor issues a warning that the code is
not instrumentable.
Typedefs
Create names for type definitions that you use frequently in your code.
SystemVerilog adds the ability to define new net and variable user-defined
names for existing types using the typedef keyword. Only typedefs of
supported types are supported.
Struct Construct
A structure data type represents collections of data types. These data types
can be either standard data types (such as int, logic, or bit) or, they can be
user-defined types (using SystemVerilog typedef). Signals of type structure
can only be sampled and cannot be used for triggering; individual elements of
a structure cannot be instrumented, and it is only possible to instrument
(sample only) an entire structure. The following code segment illustrates
these limitations:
Union Construct
A union is a collection of different data types similar to a structure with the
exception that members of the union share the same memory location.
Trigger-expression settings for unions are either in the form of serialized bit
vectors or hex/integers with the trigger bit width representing the maximum
available bit width among all the union members. Trigger expressions using
enum are not allowed.
The example below shows an acceptable sample code segment for a packed
union; the trigger expression for union d1 can be defined as:
module top (
input logic clk,
input logic rst,
input union_dt d1,
output union_dt q1,
...
st1[1][1][2]=0
st1[1][1][1]=0
st1[1][2][2]=1
st1[1][2][1]=1
st1[2][1][2]=0
st1[2][1][1]=1
st1[2][2][2]=1
st1[2][2][1]=0
Arrays
Partial instrumentation of multi-dimensional arrays and multi-dimensional
arrays of struct and unions are not permitted.
Interface
Interface and interface items are not supported for instrumentation and
cannot be used for sampling or triggering. The following code segment illus-
trates this limitation:
Packages
Packages permit the sharing of language-defined data types, typedef
user-defined types, parameters, constants, function definitions, and task
definitions among one or more compilation units, modules, or interfaces.
Instrumentation within a package is not supported.
Concatenation Syntax
The concatenation syntax on an array watchpoint signal is not accepted by
the debugger. To illustrate, consider a signal declared as:
To set a watchpoint on this signal, the accepted syntax in the debugger is:
The 4-bit vector cannot be divided into smaller vectors and concatenated (as
accepted in SystemVerilog). For example, the below syntax is not accepted:
LO
Before a design can be debugged, the instrumentor is first used to define the
specific signals to be monitored and then to generate an instrumentation
design constraints (idc) file containing the instrumented signals and break
points. The design is synthesized and the device is programmed with the
debuggable design. The debugger is then launched to analyze the design
while it is running in the target system.
This section outlines how to connect the debugger to most of the common
board configurations and addresses the following topics:
• Basic Communication Connection, on page 62
• JTAG Communication Interface, on page 71
For more information on cable settings, see the Debug Environment Reference
Manual.
In addition to selecting the cable type and port parameters, the following
additional requirements must be met to ensure proper communications.
• Configuring the Local Client-Server, on page 64
• Configuring a Remote Client-Server, on page 66
• License Consumption, on page 68
• Communications Cable Connections, on page 69
• Project File, on page 70
• JTAG Chain Description, on page 70
• Device Family, on page 70
• Device Programming, on page 70
1. In the debugger tool, select Debugger > Setup debugger. The Setup and
Preferences dialog box appears.
LO
2. In the Communications tab, click the Configure Client/Server button.
The default settings are usually correct for most configurations and
require changing only when the default server port address is already in
use or when the debugger is being run from a remote machine that is
not the same machine connected to the FPGA board/device (see Config-
uring a Remote Client-Server, on page 66).
1. In the debugger tool, select Debugger > Setup debugger. The Setup and
Preferences dialog box is displayed.
If this port is already in use, list the port status with the netstat command
and select an unused port. If possible, use a port address within the
listed range where there is usually ample room.
Note: Do not use the Start button as this creates a standalone server
which must then be manually stopped with the Stop button.
7. Start the debugger client-server session with a run or com check command
after loading the project. The local client-server application ends
automatically when the Identify debugger session ends.
8. Check the Cable type setting in the main page of the debugger after
loading the project.
LO
Once started, close the dialog box by clicking OK to save any changed
settings or simply click Cancel to close.
The following syntax shows the equivalent Tcl commands to configure the
server:
To view the existing server configuration settings, use the server get Tcl
command.
The client-server architecture may not always work within a WLAN. Also,
firewall restrictions as well as security software such as anti-virus or
anti-spyware can also impact client-server communications.
License Consumption
If you start a debugger session on the server machine, then load an instru-
mented project, and run a communications check, the server does not start
in standalone mode. With this method, you cannot terminate the debugger
session, and two licenses are consumed.
You can start the acteljtag process in stand-alone mode on the server/host
machine that interfaces to the HAPS hardware or on a Microchip device
system either from the debugger GUI or from the command line. Both
methods are described below.
LO
Through GUI
4. Verify that the acteljtag process is running, using systems tools such as
Task Manager or Process Explorer on Windows or ps, top, or htop on
Linux.
Using Commands
Use the - option with either of the commands to verify that the process is
running. For example: umrbus -. For usage information about these
commands, specify the -? option.
Cable-to-Host
The latest cable types use a USB connector to interface with the host and
require a USB driver to be installed. For details on installing the driver, see
the installation procedures in the release notes.
When using a parallel port, make sure that the parallel port where the cable
is connected corresponds to the lpt specified using the com port command. The
Identify debugger uses the “standard” I/O port definitions: lpt1:
0x378-0x37B, lpt2: 0x278-0x27B, lpt3: 0x3BC-0x3BF, and lpt4:
0x288-0x28B if it cannot determine the proper definitions from the operating
system. If the hardware address for your parallel port does not match the
addresses for lpt1 through lpt4, use the setsys set command variable lpt_ad-
dress to set the hardware port address (for example, setsys set lpt_address 0x0378
defines port lpt1).
Project File
Make sure that the project file you load into the debugger is the same one
used to create the instrumented version of your design. The debugger detects
any difference between the project and hardware versions when it first
attempts to communicate with the device.
Device Family
If you are using the Identify instrumentor/Identify debugger tool set in
stand-alone mode, make sure that the device family is correct for the type of
programmable chip being used. If this is incorrect, you must go back and
re-instrument your design using the proper device family.
Device Programming LO
Make sure that you program the device with the instrumented version of your
design, not the original version.
• The IICE can be configured (using the builtin option) to use the JTAG
controller that is built into the programmable chip. This approach has
the advantage that the built-in TAP controller already has hard-wired
connections and four dedicated pins. Accordingly, employing the debug
environment does not cost extra pins. In addition, the built-in TAP
controller does not require any user logic resources because it usually is
implemented in hard-wired logic on the chip. All devices do not have a
usable built-in TAP controller.
• The IICE can be configured (using the soft JTAG port option) to include a
complete, JTAG-compliant TAP controller. The TAP controller is
connected to external signals by using four standard I/O pins on the
programmable device. Any programmable device family can utilize this
type of cable connection since it only requires four standard I/O pins.
The following sections provide more detail on these two JTAG communication
options.
Using the built-in port is slightly more complicated than using the soft debug
port because the built-in port usually has special board-level connections
that facilitate the programming of the chip. Consequently, these program-
ming connections must be understood to properly connect the JTAG cable to
the board and to properly communicate with the IICE.
HAPS boards and other boards that connect the built-in JTAG port directly to
four header pins on the board allow the JTAG cable to simply be connected
directly to the header pins. This configuration works for both directly
connected devices and serially chained devices.
This configuration is well suited to the debugger and works just like any
other serially connected chain.
The debugger automatically LOdetects the JTAG chain at the beginning of the
debug session. You can review the JTAG chain settings by clicking the Show
Chain button in the Setup panel.
To enable the debugger to properly communicate with the target device, the
device chain must be configured correctly. If, for some reason, the JTAG
chain cannot be successfully configured, you must manually specify the
chain through a series of chain instructions entered in the console window.
Configuring a device chain is very similar to the steps required to program the
device with a JTAG programmer.
For the debugger, the devices in the chain must be known and specified. The
following information is required to configure the device chain:
• The number of devices in the JTAG chain.
• The length of the JTAG instruction register for each device.
Instruction register length information is usually available in the bsd file for
the particular device. Specifically, it is the Instruction_length attribute listed in
the bsd file.
For the board used in developing this documentation, the following sequence
of commands was used to specify a chain consisting of a PROM followed by
the FPGA. The instruction length of the PROM is 8 while the instruction
length of the FPGA is 5. Note that the chain select command identifies the
instrumented device to the system. Identifying the instrumented device is
essential when a board includes multiple FPGAs.
Note: The names PROM and FPGA have no meaning to the debugger –
they simply are used for convenience. The two devices could be
named device1 and device2, and the debugger would function
exactly the same.
Again, the sequence of chain commands is specific to the JTAG chain on your
board; these commands are the chain commands for the board used to
develop this document – the board you use will most likely be different.
chain clear
chain add prom 8
chain add fpga 5
chain select fpga
chain info
The following figure shows the results of the above command sequence.
The com cableoptions option allows you to select one among the multiple
FlashPro programmers connected to a common host:
1. Start FlashPro.
2. Scan the programmers that are connected to the host and note down the
port name (for example—usb32344).
3. Close FlashPro.
6. Define the cable option using the FlashPro programmer port name that
you identified in step 2. For example:
com cableoptions Microsemi_BuiltinJTAG_port usb32344
Note: For FlashPro4 programmer ports, the port name must include
the usb prefix, as shown in the example above. FlashPro5 ports
on the other hand, must NOT include the prefix. For example:
com cableoptions Microsemi_BuiltinJTAG_port S201R1NLS.
7. Check communication with the port using the com check command. If the
check is successful, you can start the debugger and debug the design.
Note that you cannot change to a different port by just re-running step 6 with
the new port’s name. To select a different port, you need to stop the server
and perform the following steps:
1. Stop the server using the server stop -forced 0 command. If this does not
work, use -forced 1.
1. Create two individual projects for two boards. For example, for boards
with port number usb92433 and usb88057. The port numbers are
provided to demonstrate the features.
– Synplifyusb92433.prj
– Synplifyusb88057.prj
3. From the Debugger menu, select Setup Debugger. The Setup and Preferences
window is displayed.
4. In the Setup and Preferences dialog box click the Communications tab and
click Cable Settings.
5. Click the Detect button (Ignore any warning or errors) and select the
JTAG port values.
LO
7. Select respective JTAG port for the opened project from available JTAG
ports and click Ok.
The last two errors can also be the result of a syn_tck signal that is not using a
high-fanout clock buffer resource, and thus may show large clock skew
properties. If you are using a parallel port, make sure that you have selected
the correct port.
The settings shown below are for a 2-device chain that has JTAG identifica-
tion register lengths of 8 and 10 bits. In addition, the device named fpga has
been enabled for debugging.
LO
This section describes the waveform settings and steps to install a waveform
viewer if not installed earlier.
• Waveform Settings, on page 84
• Installing the Waveform Viewer, on page 86
Waveform Settings
To define the waveform settings:
1. From the Debugger menu, select Setup debugger or click the Setup debugger
icon on the toolbar. The Setup and Preferences dialog box is displayed.
LO
Note: The Synopsys DVE and FSDB waveform viewers are available on
Linux platforms only.
2. Select the Automatically open waveform viewer checkbox, the waveform will
be displayed in the selected default waveform viewer.
3. Set the Period (ns) for the waveform display and it is independent of the
design speed.
6. Select the Show cycle in waveform checkbox to display the clock cycles in
the waveform.
8. Select the Separate data with ‘X’ in waveform for qualified triggering/sampling
checkbox to separate and display the data as specified.
9. Select the order of the unmapped LL signal bus from the drop-down list.
1. Open the Setup and Preferences dialog box (select Debugger > Setup
debugger).
Make sure that the selected simulator is installed on your machine and that
the path to the executable is set by your $PATH environment variable.
LO
Debugger Operations
This section describes the following debugger operations:
• Activating/Deactivating an Instrumentation, on page 87
• Selecting Multiplexed Instrumentation Sets, on page 89
• Activating/Deactivating Folded Instrumentation, on page 90
• Run Command, on page 92
• Sampled Data Compression, on page 93
• Sample Buffer Trigger Position, on page 94
• Sampled Data Display Controls, on page 95
• Saving and Loading Activations, on page 99
• Configuring Triggering Modes, on page 101
Activating/Deactivating an Instrumentation
The trigger conditions used to control the sampling buffer comprise break-
points, watchpoints, and counter settings. Activation and deactivation of
breakpoints and watchpoints are discussed in this section.
3. From the Set trigger expressions dialog box, enable the required condition
and provide values.
4. Click Ok.
For information on the trigger conditions, see the Debug Environment Refer-
ence Manual.
Deactivating a Watchpoint
By default, a watchpoint that does not have a watchpoint expression is
inactive. A watchpoint that has a watchpoint expression can be temporarily
deactivated. A deactivated watchpoint retains the expression entered, but is
not armed in the hardware and does not result in a trigger.
To deactivate a watchpoint:
• Click-and-hold on the signal or the associated watchpoint icon. The
watchpoint pop-up menu appears.
The Watch menu selection will have a check mark to indicate that the watch-
point is activated. Click on the Watch menu selection to toggle the check mark
and deactivate the watchpoint.
LO
Reactivating a Watchpoint
To reactivate an inactive watchpoint:
Clicking the P icon, lists the partial bus segments; select the bus
segment from the list displayed to display the watchpoint popup menu.
2. Click on the Watch menu selection to toggle the check mark and
reactivate the watchpoint.
Activating a Breakpoint
Instrumented breakpoints are shown in the debugger as green icons in the
left margin adjacent to the source-code line numbers. Green breakpoint icons
are inactive breakpoints, and red breakpoint icons are active breakpoints. To
activate a breakpoint, click on the icon to toggle it from green to red; to
deactivate an active breakpoint, click on the breakpoint icon to toggle it from
red to green.
1. Select Debugger > IICE > Configure IICE Settings or click the Configure IICE
Settings icon to display the dialog box.
2. From the drop-down menu in the Mux Group section, select the group
number to be active for the debug session.
The signals group command can be used to assign groups from the console
window (see signals in the Debug Environment Reference Manual).
/rtl/cnt_inst0/val
/rtl/cnt_inst1/val
2. Click on the appropriate line in the list box to bring up the watchpoint
menu to activate/deactivate the folded watchpoint.
/rtl/inst0/rtl/process_18/if_20/if_23/repeated_unit.vhd:24
/rtl/inst1/rtl/process_18/if_20/if_23/repeated_unit.vhd:24
Run Command
The Run command sends watchpoint and breakpoint activations to the IICE,
waits for the trigger to occur, receives data back from the IICE when the
trigger occurs, and then displays the data in the source window.
To execute the Run command for the active IICE (or a single IICE):
• Select Debugger > Run from the menu or click the Run button.
1. Enable the individual IICE units in the Run panel by checking their
corresponding boxes.
2. Click Run button or select Debugger > Run from the menu.
After the Run command is executed, the sample of signal values at the trigger
position is annotated to the HDL code in the RTL panel. This data can be
displayed in a waveform viewer with the waveform command or written out to
a file with the write vcd/fsdb command (see the corresponding command
descriptions in the Debug Environment Reference Manual).
Note: In a multi-IICE environment, you can edit and run other IICEs
while an IICE is running.
The following example shows a design with one breakpoint activated, the
breakpoint triggered, and theLOsample data displayed. The small green arrow
next to the activated breakpoint in the example indicates that this breakpoint
was the actual breakpoint that triggered. Note that the green arrow is only
present with simple triggering.
1.
2. Click the IICE button to display the Enhanced Settings for IICE Unit dialog
box
3. Click the Enable check box in the Data Compression section or enter the
following command:
Data compression must be set prior to executing the Run command and
applies to all enabled IICE units. Data compression is not available when
using state-machine triggering, or qualified sampling or always-armed
sampling.
For example, the following command masks bits 0 through 3 of vector signal
mybus[7:0] from consideration by the data compression mechanism:
Similarly, to reinstate the masked signals in the above example, use the
command:
4.
You can determine the correct setting for the trigger position, as required. For
example, if the design behavior of interest usually occurs after a particular
trigger event, set the trigger position to “early.” See the Debug Environment
LO
Reference Manual, for more information.
The sampled data displayed in the debugger is controlled by the value given in
the Cycle text field. You can manually change the cycle number by typing a
number in the entry field. Or use the up and down arrows to the right of the
cycle number increment or decrement the cycle number for each click.
To reset the cycle number to the default position (the zero time
position), use the Debug > Cycle > Home menu selection or click on the
Goto trigger event in sample history icon.
Radix
The radix of the sampled data displayed can be set to any of a number of
different number bases. To change the radix of a sampled signal:
3. Click OK.
Note: You can change the radix before the data is sampled. The watch-
point signal value will appear in the specified radix when the
sampled data is displayed.
Selecting default resets the radix to its initial intended value. Note that the
radix value is maintained in the “activation database” and that this informa-
tion will be lost if you fail to save or reload your activation. Also, the radix set
on a signal is local to the debugger and is not propagated to any of the
waveform viewers.
Note: Changing the radix of a partial bus changes the radix for all bus
segments.
LO
The example below consists of a top-level entity called top and two instances
of the repeated_unit entity. In the example, the source code of repeated_unit is
displayed, and both of the lists of instances of the signal val have been instru-
mented. The two instances are /rtl/inst0/val and /rtl/inst1/val, and their data
values are displayed in the pop-up window as shown in the following figure:
To display the instrumented values for the individual bus segments, position
the cursor over the composite bus value. The individual partial bus values
are displayed in a tooltip in the specified radix as shown in the following
figure.
In the above figure, the question marks (?) in the composite bus value (64'
h3fad7910d1????36) indicate that the corresponding segment (data_in [23:8]) has
not been instrumented.
LO
The Find dialog in the debugger shows a partially instrumented signal with
the P icon. You can set the trigger expressions on the fields instrumented for
triggering in the same manner as if the signal was fully instrumented (that is,
select the signal, right-click to bring up the dialog, and select the option to set
the trigger expression).
Saving an Activation
An activation can be explicitly saved or saved on exit. To explicitly save an
activation:
2. If the sample data set is to be included, run the debugger to collect the
sample data.
3. Select File > Save activations in the menu bar to bring up the following
dialog box.
Loading an Activation
To load an existing activation:
1. Click the Configure state machine icon in the debugger toolbar. Clicking
the icon displays the Configure State Machine dialog box for the selected
IICE.
2. Click the Add a new transition icon to define or redefine the state machine.
A panel is displayed on the right side to define the state machine.
LO
Each transition includes either one or two actions and a condition.
The conditions provided in the following table are available for defining
state transition expressions.
Condition Description
5. Select the Transition Actions and click Ok to save the defined triggering
conditions.
4. Click Create to set the defined macro settings to the state selected.
LO
5. Click OK after all of the parameters are entered in the Configure State
Machine dialog.
2. Click the Run button in the debugger project view or the following
command in the debugger console window:
For more information on state machine triggering, see the Debug Environment
Reference Manual.
Qualified Sampling
During qualified sampling, a single sample of all sampled signals is collected
each time the trigger condition is true. When a trigger condition occurs,
instead of filling the entire buffer, the IICE collects the single sample and then
waits for the next trigger to acquire the next sample. The following example
uses qualified sampling to examine the data for a given number of clock
cycles. To create a complex trigger event to perform qualified sampling:
1. Click the Setup debugger icon or select from Debugger > Setup Debugger, to
open the Setup and Preferences dialog box.
See the Debug Environment Reference Manual, for the example command
sequence samples the data every N cycles beginning with the first trigger
event.
With always-armed triggering, you always acquire the data associated with
the last trigger condition prior to the interrupt. This mode is helpful when
analyzing a design that uses a repeated pattern as a trigger (for example, bus
cycles) and then randomly freezes. You can retrieve the data corresponding to
the last time the repeated pattern occurred prior to freezing. Using
always-armed sampling includes a minimal area and clock-speed penalty.
Data compression must be set prior to executing the Run command and
applies to all enabled IICE units.
For example, the following command masks bits 0 through 3 of vector signal
mybus[7:0] from consideration by the data compression mechanism:
Similarly, to reinstate the masked signals in the above example, use the
command:
1. In the debugger tool, from the Setup and Preference dialog box, select the
Instrumentation tab.
2. Select the required Cross Trigger Mode from the drop-down list.
For the description of available options, see the Debug Environment Reference
Manual.
If the cross-trigger mode drop-down is not enabled, make sure that Allow
cross-triggering in IICE is enabled on the IICE Options tab of the instrumentor and
that you have defined more than one IICE unit. See Enabling
Complex-Counter Triggering, on page 47, for more information.
Finally, the counter sends a trigger event to the sample block when a termi-
nation condition occurs. The form of the termination condition depends on
the mode of operation of the counter and on the target value of the counter:
The following table provides a general description of the trigger behavior for
the various complex counter modes. Each mode is described in more detail in
individual subsections, and examples are included showing how the modes
are used. In both the table and subsection descriptions, the counter target
value setting is represented by the symbol n.
cycles Stop sampling on Stop sampling n cycles after the 1st trigger
1st trigger event event.
watchdog Illegal Stop sampling if the trigger condition is not
met for n consecutive cycles.
pulsewidth Illegal LO Stop sampling the first time the trigger
condition is met for n consecutive cycles.
For more description on counter modes, see the Debug Environment Refer-
ence Manual.
For information on using this feature with state-machine triggering, see the
Importing External Triggers application note available on the Synopsys
website.
Verdi-Identify Flow
The debugger is used to generate the fast signal database (FSDB) in the Verdi
platform and to display the results through the Verdi nWave viewer. To
generate this database:
1. Instrument the design with the essential signal list (see Instrumenting
the Verdi Signal Database, on page 37).
2. Run the instrumented design in the synthesis tool and load the project
into the debugger.
3. Use the Debugger Preferences dialog box and make sure that Synopsys Verdi
nWave is selected as the default waveform viewer.
4. Setup the trigger conditions and click the Run button to download the
sample buffer.
5. Generate the fast signal database using the following command syntax:
6. Click the Open Waveform Display icon to view the samples in the nWave
viewer.
The fast signal database file (fsdbFilename) can be imported directly back to
the Verdi platform after debugging.
LO
The icon is green when enabled ( ) and yellow when disabled. The
Data Expansion engine calculates combinational values on the fly, as
they are requested.
3. Open the nWave viewer and view signals that are not in the FSDB with
the Data Expansion engine.
– Click the New Waveform toolbar icon ( ) in the main Verdi window
– Click the Get Signals icon ( ) or select Signal > Get Signals in the
nWave window.
– In the Get Signals hierarchy browser pane, click the + icon to expand
items. The signals in bold are signals that are not in the FSDB, and
which can be expanded (calculated on the fly) by the Data Expansion
engine.
– Select the signals you want to view in the waveform viewer and click
OK to add them to the waveform. Drag left to select several signals;
make sure to include the top-level I/O port.
– In the main window, select Source > Active Annotation so that you can
see the values overlaid on the source code.
The values for all signals are now annotated. The text in purple color
are expanded signals which did not come from the FSDB file, but
were calculated. This is an example of the results:
LO
Since the tool set allows you to debug your design in the HDL, the debugger
must have access to the original source files. Depending on the type of your
network, the debugger may be able to access the original sources files directly
from the lab machine. If this is not possible or if the two computers are not
networked, you must also copy the original sources to the debug machine. If
the debugger cannot locate the original source files, it will open the design,
but an error will be generated for each missing file, and the corresponding
source code will not be visible in the source viewer.
Copying the source files to the debug machine can be done in two ways:
• The instrumentor can automatically include the original source files in
the exported runtime directory so that when you transfer the directory
to the lab machine, the original sources files (in the orig_sources subdi-
rectory) are included. The debugger automatically looks in this directory
for any missing source files. This preference can be set before compiling
the instrumented design by selecting Instrumentor > Instrumentation prefer-
ence and making sure that Save original source in instrumentation directory is
checked.
• The original source files can be manually copied to the lab machine or
may already exist in a different location on this machine. In this case, it
may be necessary to help locate the design files using the searchpath
command. Simply call this command from the command line before
loading the design file (debug.prj). The argument is a
semi-colon-separated (Windows) or colon-separated (Linux) list of direc-
tories in which to find the original source files.
The debugger only displays files that match the CRC generated at the time of
instrumentation.
LO
Note: If there are security issues with having the original source files
on the lab machine, the instrumentor can password-protect the
original sources on the development machine for use with the
debugger.
Simultaneous Debugging
When multiple debugger licenses are available, multiple FPGAs residing on a
single, non-HAPS board can be debugged concurrently through a single
cable. This capability is based on semaphores that allow more than one
debugger to share the common port.
LO
This chapter describes debugging using FPGA memory and using mux sets:
• Using BRAM for Debugging, on page 118
• Using Mux Sets, on page 119
• Using State-Based Triggering, on page 120
• Debugging Script Example, on page 121
You can use it for any sampling frequency, but it is best suited to
high-frequency debugging.
The tool uses four pins per slave IICE. It automatically inserts a
cross-trigger network.
3. Run debug.
The tool uses distributed RAM blocks to store sample data. You can view
the results in a single waveform view (FSDB, VCD). It generates a
balanced network where waveforms do not need to be post-processed.
LO
1. Select Debugger > IICE > Configure IICE Settings or click the Configure IICE
Settings icon to display the dialog box.
2. Use the drop-down menu in the Mux Group section to select the group
number to be active for the debug session.
3. The signals group command can be used to assign groups from the
console window (see the signals command in the Debug Environment
Reference Manual).
LO
H M
hierarchy multi-IICE
folded 33 tabs 130
multiple signal values 111, 112
I multiplexed groups
assigning 32
idc file selecting 102
editing 24
identification register 93 O
IICE
buffer type 54 original source files
cross triggering 119 searchpath 132
JTAG connection 83 original sources 132
IICE parameters
individual 130 P
IICE units
cross triggering 52, 121 parameterized modules
instrumenting 24
instrumentation
description 8 partial buses
partial records 31 instrumenting 28
post-compile 24 post-compile instrumentation 24
instrumentation directory 42 pre-configured triggers 106
instrumenting partial buses 28 project files 47
instrumentor projects
launching 21 instrumenting 47
running after compilation 24
Q
J
qualified sampling 119
JTAG
chain tests 94 R
communication block 83
communication test 92 radix
debugging 80, 92 sampled data 109
direct connection 85 records
serial connection 86 partially instrumented 31
JTAG chain registers
settings 94 boundary scan 86
JTAG registers 86 restrictions
instrumenting buffers 27
run command 105
S U
sample buffer 109 UMRBus 80
trigger position 108
sample modes 119 V
sampled data
Verdi nWave viewer 124, 127
changing radix 109
compressing 51, 107, 120 Verdi platform 35
display controls 109
masking 107 W
sampling
in folded hierarchy 33 watch icon
color coding 34
sampling signals 26, 27, 33, 36, 38, 41
watchpoints
settings activating 99, 101
JTAG chain 94 deactivating 100
signal values folded 104
displaying multiple 111, 112 waveform display 96
signals waveform viewers
disabling sampling 28 Verdi 124
exporting trigger 123
folded 111
instance selection 34
multiply instrumented 111, 112
partially instrumented 112
sampling selection 26, 27, 33, 36, 38, 41
source files
copying 132
state machines
triggering 138
synthesizing designs 42
T
TAP controller 84
tools
invoking Debugger 96
trigger signal
exporting 123
triggering
between IICEs 119
modes 49, 115
state machine 138
triggers
complex 51
pre-configured 106
LO