1i
NOTES
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
Objectives
After completing this module, you will be able to:
Describe the ChipScope Pro tool and the on-chip debugging and verification
strategy of Xilinx
Specify how to include ChipScope Pro cores into a design
Describe how the ChipScope Pro Analyzer can help you analyze your design
ChipScope Pro - 1 - 3
NOTES
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-3
Outline
ChipScope Pro - 1 - 4
Introduction
ChipScope Pro Design Flow
Core Generation
Core Insertion
Analyzer
Summary
NOTES
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-4
Increases overhead
IP
Core
Hard IP cores
Pads
IOIO
Pads
Custom
Logic
Embedded System Bus
CPU
Core
Custom
Core
IO Pads
IO Pads
Memory
Array
Co-verification
ChipScope Pro - 1 - 5
NOTES
Traditional board-level testing methods are not enough. You need internal access to signals,
nodes, and system buses.
Integrated IP means wider, faster buses, which means you need more I/O pins dedicated to
debug.
You have no direct access to IP within the FPGA. It is difficult to drive high-speed clocks and
signals off-chip without introducing new problems.
The high pin count and the fine-pitch packaging makes accessing pins nearly impossible.
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-5
IP
Core
ILA
IBA Custom
Logic
Embedded System Bus
PPC405
Core
Custom ILA
Core
Memory
Array
IO Pads
Pads
IOIO
Pads
ILA
IO Pads
ILA
ICON
Boundary Scan TAP Controller
ChipScope Pro - 1 - 6
NOTES
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-6
For what?
ChipScope Pro - 1 - 7
NOTES
This example shows a single ILA core with a single trigger port, a single basic match unit,
data same as trigger, and 512 data samples.
For block RAM utilization, also note that one extra bit per sample is required for the trigger
mark (e.g., a trigger/data width of 8 bits requires a sample width of 9 bits, etc.).
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-7
System Requirements
ChipScope Pro - 1 - 8
NOTES
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-8
Outline
ChipScope Pro - 1 - 9
Introduction
ChipScope Pro Design Flow
Core Generation
Core Insertion
Analyzer
Summary
NOTES
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-9
ChipScope Pro - 1 - 10
Core
Generator
Or
Core
Inserter
ChipScope
ChipScopePro
Pro
Core
CoreGenerator
Generator
Instantiate
InstantiateCores
Coresinto
into
Source
SourceHDL
HDL
Connect
ConnectInternal
InternalSignals
Signals
to
toCore
Core(in
(inSource
SourceHDL)
HDL)
Synthesize
Synthesize
ChipScope
ChipScopePro
ProCore
Core
Inserter
Inserter(into
(intonetlist)
netlist)
Synthesize
Synthesize
Implement
Implement
Download
Download&&Debug
Debug
Using
UsingChipScope
ChipScopePro
ProAnalyzer
Analyzer
NOTES
ChipScope Pro in-circuit verification may require that your verification be run at slower
speeds to accommodate the ChipScope Pro cores. This still provides faster functional
verification than simulation and greater internal visibility than traditional board-level in-circuit
verification.
Timing will change when the cores are removed. There is no way to predict how the timing
will change, but due to the removal of the ChipScope Pro core resources, the timing results
will change. If you were meeting timing while using ChipScope Pro cores, you must still be
able to meet timing. If you were not meeting timing while using ChipScope Pro cores, your
timing may improve. However, it should be noted that there is no way to accurately state what
will happen for certain. That is, your timing may get worse.
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-10
ChipScope
ChipScopePro
Pro
Core
CoreGenerator
Generator
Instantiate
InstantiateCores
Coresinto
into
Source
SourceHDL
HDL
Connect
ConnectInternal
InternalSignals
Signals
to
toCore
Core(in
(inSource
SourceHDL)
HDL)
Synthesize
Synthesize
Implement
Implement
Download
Download&&Debug
Debug
Using
UsingChipScope
ChipScopePro
ProAnalyzer
Analyzer
ChipScope Pro - 1 - 11
NOTES
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-11
ChipScope Pro - 1 - 12
Synthesize
Synthesize
ChipScope
ChipScopePro
ProCore
Core
Inserter
(into
Inserter (intonetlist)
netlist)
Implement
Implement
Download
Download&&Debug
Debug
Using
UsingChipScope
ChipScopePro
ProAnalyzer
Analyzer
NOTES
The IBA/OPB, IBA/PLB and VIO cores are currently not supported in the Core Inserter.
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-12
Core Types
The ICON core interfaces between the JTAG interface and the capture cores
Capture cores: Customizable cores for creating triggers and data storage
ChipScope Pro - 1 - 13
ILA (Integrated Logic Analyzer core): Capture core for HDL designs
ILA/ATC (Integrated Logic Analyzer with Agilent Trace Core): Similar to the ILA
core, but data is captured off-chip by the Agilent Trace Port Analyzer
IBA/OPB (Integrated Bus Analyzer for the IBM CoreConnect On-Chip
Peripheral Bus core): This is the capture core for debugging CoreConnect OPB
buses
IBA/PLB (Integrated Bus Analyzer for CoreConnect Processor Local Bus core):
Similar to the IBA/OPB core, except for the PLB bus
VIO (Virtual Input/Output core): Defines and generates virtual I/O ports
NOTES
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-13
Up to 16 match units
( No more than 16 total)
ChipScope Pro - 1 - 14
NOTES
Ports and match units are more flexible than they were in 4.2i. The total can be up to 16, in
ANY configuration.
Gap information is the amount of time elapsed between triggers. There is a 32, 40, or 48 bit
counter that you can set. Time begins at the first trigger. Max value is about a weekend, give
or take.
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-14
ChipScope Pro - 1 - 15
JTAG
Trace
FPGA TPA
LAN
ChipScope
Pro
NOTES
The ATC data sheet and the user manual are available on the Web at
www.xilinx.com/chipscope.
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-15
ChipScope Pro - 1 - 16
VIO
ASYNC_IN
ASYNC_OUT
SYNC_IN
SYNC_OUT
CLK
NOTES
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-16
Outline
ChipScope Pro - 1 - 17
Introduction
ChipScope Pro Design Flow
Core Generation
Core Insertion
Analyzer
Summary
NOTES
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-17
ICON Core
ChipScope Pro Core Generator
1 Start the ChipScope Pro Core
Generator, select Core Type
ChipScope Pro - 1 - 18
NOTES
Number of Control Portsup to 15.
Disable Boundary Scan Component Instance: The boundary scan component extends the
JTAG interface of the FPGA device so that up to two internal scan chains can be created. The
ChipScope Pro Analyzer communicates with the ChipScope Pro cores by using one of the two
internal scan chains (USER1 or USER2).
The boundary scan component is instantiated inside the ICON core by default. Use the
Disable Boundary Scan Component Instance checkbox to disable the instantiation of the
boundary scan component.
Disabling JTAG Clock BUFG Insertion: By default, this clock is placed on a global clock
resource (BUFG). To disable this BUFG insertion, check the Disable JTAG Clock BUFG
Insertion checkbox. This must checked only when global resources are very scarce; placing
the JTAG clock on regular routing introduces skew. Ensure the design is adequately
constrained to minimize this skew.
Including Boundary Scan Ports: The ICON core uses only one of the USER1 or USER2
scan chain ports. The unused USER2 or USER1 port signals are available for use by other
design elements. If the boundary scan component is instantiated inside the ICON core, then
selecting the Include Boundary Scan Ports checkbox provides access to the unused USER1
or USER2 scan chain interfaces. Note: The boundary scan ports must be included only if the
design needs them. If they are included and not used, it can cause errors during synthesis or
implementation.
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-18
ChipScope Pro - 1 - 19
control0
control1
control2
control3
control4
control5
...
control15
NOTES
You can create a batch mode argument example file (for example, icon.arg) by selecting the
Generate Batch Mode Argument Example File (.arg) checkbox. The icon ARG file is used
with the command line program called generate.exe. The icon ARG file contains all of the
arguments necessary for generating the ICON core, without using the ChipScope Pro Core
Generator GUI tool.
Note: An ICON core can be generated by running generate.exe icon_pro -f=icon.arg at the
command prompt on Windows systems or by running generate.sh icon_pro -f=icon.arg
at the UNIX shell prompt on Solaris systems.
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-19
ChipScope Pro - 1 - 20
NOTES
Output Netlist: Browse to set the location where the netlist must be saved.
Device Settings: Use SRL16s will reduce the amount of logic used. Use RPMs will create a
faster core.
Clock Settings: Trigger on the rising or falling edge of the clock.
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-20
Trigger Options
Equals: TRIG0TRIGn
#Trigger Ports * #Match Units
From 1 to 256
ChipScope Pro - 1 - 21
NOTES
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-21
Match Type
3
ChipScope Pro - 1 - 22
NOTES
Trigger width: The number of input signals used in the triggerfrom 1 to 256.
Counter Width: The match unit counter is a configurable counter on the output of the each
match unit in a trigger port. This counter can be configured at run time to count a specific
number of match unit events. To include a match counter on each match unit in the trigger
port, select a counter width from 1 to 32. The match counter will not be included on each
match unit if the Counter Width combo box is set to Disabled. The default Counter Width
setting is Disabled.
Enable Trigger Output Port : The output of the ILA-trigger-condition module can be
brought out to a port signal by checking the Enable Trigger Output Port checkbox. The
trigger output port is used to trigger external test equipment by attaching the port signal to a
device pin in the HDL design. The trigger output port can also be attached to other logic or to
ChipScope Pro cores in the design to be used as a trigger, an interrupt, or another control
signal. The shape (level or pulse) and sense (active-High or active-Low) of the trigger output
can also be controlled at run time. The clock latency of the ILA trigger output port is 10 clock
(CLK) cycles, with respect to the trigger input ports.
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-22
Trigger Sequencer
ChipScope Pro - 1 - 23
Maximum of 16 levels
NOTES
The sequencer match units and states are set in ChipScope Pro Analyzer.
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-23
ChipScope Pro - 1 - 24
If data is not same as trigger, a 32bit data port is created for storing
data
NOTES
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-24
Generate Core
5 Set Template Options
control
clk
trig0
trig1
trig2
trig3
ILA
...
trig15
ChipScope Pro - 1 - 25
NOTES
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-25
ChipScope Pro - 1 - 26
- ------------------------------------------------------------------------------------------------------------------------------------ -- - ILA
ILAcore
coreinstance
instance
- -----------------------------------------------------------------------------------------------------------------------------------i_ila
i_ila: :ila
ila
port
portmap
map
(control
(control =>
=>control,
control,
clk
=>
clk
=>clk,
clk,
trig0
=>
trig0,
trig0
=> trig0,
trig1
=>
trig1
=>trig1,
trig1,
trig2
=>
trig2
=>trig2,
trig2,
trig3
=>
trig3
=>trig3,
trig3,
trig4
=>
trig4
=>trig4,
trig4,
trig5
=>
trig5
=>trig5,
trig5,
trig6
=>
trig6
=>trig6,
trig6,
trig7
=>
trig7
=>trig7);
trig7);
NOTES
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-26
Instantiate cores
Connect the CONTROL port signal of the ILA core to an unused control
port of the ICON core instance in the design
ChipScope Pro - 1 - 27
Connect all unused bits of the data and trigger port signals of the ILA core to
0
This prevents the mapper from removing the unused trigger or data
signals, and it avoids any DRC errors during the implementation process
Ensure the data and trigger source signals are synchronous to the ILA clock
signal (CLK)
NOTES
Other cores (ILA/ATC, IBA/OPB, IBA/PLB, and VIO), similarly, must be connected to the
ICON control ports.
Similarly, for other cores, connect inputs to 0 so that the mapper does not remove the unused
inputs.
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-27
Outline
ChipScope Pro - 1 - 28
Introduction
ChipScope Pro Design Flow
Core Generation
Core Insertion
Analyzer
Summary
NOTES
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-28
ChipScope Pro - 1 - 29
NOTES
The ChipScope Pro Inserter tool can be used with an HDL-based design or used with an
existing EDIF netlist.
ChipScope Pro Inserter can also be used separately from ISE. That is, you can create the core
by starting ChipScope Pro Core Inserter outside of ISE.
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-29
ChipScope Pro - 1 - 30
NOTES
Disabling JTAG Clock BUFG Insertion: By default, this clock is placed on a global clock
resource (BUFG). To disable this BUFG insertion, check the Disable JTAG Clock BUFG
Insertion checkbox. This should be done only when global resources are very scarce; placing
the JTAG clock on regular routing introduces skew. Ensure the design is adequately
constrained to minimize this skew.
Useful Project Navigator Settings when using ChipScope Pro Core Inserter
The following are useful Project Navigator settings to help you implement a design with the
ChipScope Pro Core Inserter (not required with the Core Generator):
1. If you use the XST synthesis tool, enable the Keep Hierarchy option, to preserve the
design hierarchy. Using the Keep Hierarchy option preserves the names of nets and other
recognizable components, which otherwise could be optimized away. To keep the design
hierarchy:
a. Right-click Synthesize and select the Properties option.
b. Ensure the Keep Hierarchy option is checked, and click OK.
2. Prior to using the ChipScope Pro Analyzer to download your bitstream into your device,
ensure the Bitstream Generation options are set properly:
a. In the Project Navigator, right-click Generate Programming File and select the
Properties option.
b. Select the Startup options tab.
c. Set the FPGA Start-Up Clock dropdown to JTAG Clock.
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-30
ChipScope Pro - 1 - 31
NOTES
These parameters are the same as those shown for the ChipScope Pro Core Generator flow.
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-31
Modify Connections
7 Click the Net Connections tab, then click Modify Connections
ChipScope Pro - 1 - 32
NOTES
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-32
Specify the signal connections to the Trigger/Data ports of the capture core
A Select triggers
ChipScope Pro - 1 - 33
NOTES
For the Core Generator flow, complete this step when you instantiate the ILA core into the
design and connect the internal signals to the instantiated component.
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-33
Implement with
Inserted Cores
9 Click Return to Project Navigator to implement the design
with inserted cores
ChipScope Pro - 1 - 34
NOTES
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-34
ChipScope Pro - 1 - 35
NOTES
Given that you only need ICON, ILA, and ILA/ATC cores, the Core Inserter flow is the
simpler flow to use.
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-35
Outline
ChipScope Pro - 1 - 36
Introduction
ChipScope Pro Design Flow
Core Generation
Core Insertion
Analyzer
Summary
NOTES
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-36
FPGA download
ILA capture setup and trigger modifications
Waveform display for captured traces
Can write the waveforms to VCD format for other waveform viewers
= (equal to), <> (not equal to), > (greater than), >= (greater than or
equal to), < (less than), <= (less than or equal to)
Match values
ChipScope Pro - 1 - 37
NOTES
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-37
ChipScope Pro - 1 - 38
NOTES
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-38
ChipScope Pro - 1 - 39
NOTES
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-39
ChipScope Pro - 1 - 40
NOTES
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-40
ChipScope Pro - 1 - 41
8 Double-click Trigger
Condition Equation to
enable additional
Boolean equations or
sequence of events for
a trigger condition. Click
OK
NOTES
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-41
ChipScope Pro - 1 - 42
NOTES
Type: The Type combo box in the capture settings defines the type of windows to use. If
Window is selected, the number of samples in each window must be a power of two.
However, the trigger can be in any position in the window. If N Samples is selected, the
buffer will have as many windows as possible, with the defined samples per trigger. The
trigger will always be the first sample in the window if N Samples is selected.
Windows (Windows): The number of windows is specified in this field and can be any
positive integer from 1 to the depth of the capture buffer.
Windows Depth: The Depth combo box defines the depth of each capture window. It is
automatically populated with valid selections when values are typed into the Windows text
field. Only powers of two are available.
Windows Position: The Position field defines the position of the trigger in each window.
Valid values are integers from 0 to the depth of the capture buffer minus 1.
N Samples Samples Per Trigger: Samples per trigger defines how many samples to capture
once the trigger condition occurs. Valid values are any positive integer from 1 to the depth of
the capture buffer. The trigger mark will always appear as sample 0 in the window. There will
be as many sample windows captured as possible, given the overall sample depth.
Note: When occurring in at least n cycles or occurring for at least n consecutive cycles is
selected for a match unit, and that match unit is a part of the overall trigger condition, the
Window Depth or Samples Per Trigger cannot be less than 8. This is due to pipeline effects
inside the ILA, ILA/ATC, or IBA core.
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-42
Setup Waveform
10
Double-click Waveform
ChipScope Pro - 1 - 43
Signals can be
renamed and
grouped, right-click
and select
{Rename | Add to
Bus}
NOTES
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-43
Begin Acquisition
11 Select Trigger Setup Run (or F5) to begin acquisition
Triggers are shown, , with
corresponding data values
ChipScope Pro - 1 - 44
NOTES
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-44
Bus Plotting
Listing
ChipScope Pro - 1 - 45
The Listing
window displays
the sample buffer
as a list of values
in a table
2004 Xilinx, Inc. All Rights Reserved
NOTES
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-45
View
activity
View
internal
signal
values
Note, to use VIO cores, you must use the Core Generator Flow
ChipScope Pro - 1 - 46
NOTES
Whenever a new input value is entered, it is updated at once. However, if you want all inputs
updated simultaneously (except pulse train), select Update Static button.
Input Types
Text Field: Enter the text value of the input.
Push Button: Select either high or low as default value. Click and hold the button to toggle
the value.
Toggle Button: Click button to toggle the value.
Pulse Train: Enter the train of values to run through on each clock cycle:
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-46
Outline
ChipScope Pro - 1 - 47
Introduction
ChipScope Pro Design Flow
Core Generation
Core Insertion
Analyzer
Summary
NOTES
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-47
Review Questions
What are the two flows for including ChipScope Pro cores into a design?
For each flow, how do you include the cores in the design?
ChipScope Pro - 1 - 48
NOTES
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-48
Answers
What are the two flows for including ChipScope Pro cores into a design?
ChipScope Pro - 1 - 49
Core Inserter
Core Generator
NOTES
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-49
Answers
ChipScope Pro - 1 - 50
NOTES
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-50
Answers
For each flow, how do you include the cores in the design?
Core Generator:
Core Inserter:
ChipScope Pro - 1 - 51
NOTES
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-51
Review Question
Given this simple FSM, buried deep in the design, answer the questions on the
following page:
ChipScope Pro - 1 - 52
We would like to control the state machine by driving the inputs find, bitstream,
and arst
NOTES
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-52
Review Questions
What type of cores are required and how many of each? Why?
How many trigger ports are required? Why? What is the width of each
trigger port?
ChipScope Pro - 1 - 53
NOTES
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-53
Answers
Core Generator, because we would like to drive the input signals, thus
requiring a VIO core, which can only be used through the Core Generator
What type of cores are required and how many of each? Why?
ChipScope Pro - 1 - 54
NOTES
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-54
Answers
Two. One for the ILA core and one for the VIO core
How many trigger ports are required? Why? What is the width of each
trigger port?
ChipScope Pro - 1 - 55
NOTES
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-55
Summary
ChipScope Pro - 1 - 56
NOTES
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-56
ChipScope Pro - 1 - 57
NOTES
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-57
Trademark Information
"Xilinx" and the Xilinx logo are registered trademarks of Xilinx, Inc. Any rights not expressly granted herein are reserved.
The shadow X shown above is a trademark of Xilinx, Inc.
CoolRunner, RocketChips, Rocket IP, Spartan, StateBENCH, StateCAD, Virtex, XACT, XC2064,XC3090, XC4005, XC5210 are registered Trademarks of
Xilinx, Inc.
ACE Controller, ACE Flash, A.K.A Speed, AllianceCORE, Alliance Series, Bencher, ChipScope, Configurable Logic Cell, CORE Generator, CoreLINX,
Dual Block, EZTag, Fast CLK, Fast CONNECT, Fast FLASH, FastMap, Fast Zero Power, Foundation, Gigabit Speeds...and Beyond!, HardWire, HDL
Bencher, IRL, JBits, J Drive, LCA, LogiBLOX, Logic Cell, LogiCORE, LogicProfessor, MicroBlaze, MicroVia, MultiLINX, NanoBlaze, PicoBlaze,
PLUSASM, PowerGuide, PowerMaze, QPro, Real-PCI, Rocket I/O, SelectI/O, SelectRAM, SelectRAM+, Silicon Xpresso, Smartguide, Smart-IP,
SmartSearch, SMARTswitch, System ACE, Testbench In A Minute, TrueMap, UIM, VectorMaze, VersaBlock, VersaRing, Wave Table, WebPACK,
WebFITTER, WebPOWERED, XABEL, XACT-Floorplanner, XACT-Performance, XACTstep Advanced, XACTstep Foundry, XAM, XAPP, X-BLOX +,
XChecker, XDM, XEPLD, XSI, XtremeDSP, Xilinx Foundation Series, Xilinx XDTV, Xinfo, XC designated products and ZERO+ are trademarks of Xilinx,
Inc.
The Programmable Logic Company is a service mark of Xilinx, Inc.
All other trademarks are the property of their respective owners.
Xilinx, Inc. does not assume any liability arising out of the application or use of any product described or shown herein; nor does it convey any license under
its trademarks, patents, copyrights, or maskwork rights or any rights of others.
Xilinx, Inc. reserves the right to make changes, at any time, in order to improve reliability, function or design and to supply the best product possible. Xilinx,
Inc. will not assume responsibility for the use of any circuitry described herein other than circuitry entirely embodied in its products. Xilinx, Inc. devices and
products are protected under one or more of the Patents in the United States and other foreign countries.
Xilinx, Inc. does not represent that devices shown or products described herein are free from patent infringement or from any other third party right. Xilinx,
Inc. assumes no obligation to correct any errors contained herein or to advise any user of this text of any correction if such be made. Xilinx, Inc.
will not assume any liability for the accuracy or correctness of any engineering or software support or
assistance provided to a user.
Xilinx products are not intended for use in life support appliances, devices, or systems. Use of a Xilinx
product in such applications without the written consent of the appropriate Xilinx officer is prohibited.
Copyright 1991-2004 Xilinx, Inc. All Rights Reserved.
ChipScope Pro - 1 - 58
NOTES
ChipScope Pro
www.xilinx.com
1-877-XLX-CLAS
1-58
ChipScope Pro
Labs
Introduction
NOTES
www.xilinx.com
1-877-XLX-CLAS
Objectives
After completing these labs, you will be able to:
NOTES
www.xilinx.com
1-877-XLX-CLAS
2a-3
Two clock dividers are used to reduce the four-bit counter frequency, such
that each bit can be viewed on LEDs
Inputs: clk, reset, sync_reset, load, load_data(3:0)
Outputs: cnt4(3:0)
NOTES
www.xilinx.com
1-877-XLX-CLAS
2a-4
Lab Design:
System Requirements
NOTES
www.xilinx.com
1-877-XLX-CLAS
2a-5
Lab Overview
Core Generator:
Core Inserter:
NOTES
www.xilinx.com
1-877-XLX-CLAS
2a-6
General Flow
Step 1:
Step 2:
Step 3:
Step 4:
Step 5:
NOTES
www.xilinx.com
1-877-XLX-CLAS
2a-7
General Flow
Step 1:
Step 2:
Step 4:
Step 5:
NOTES
www.xilinx.com
1-877-XLX-CLAS
2a-8
Evaluation
ftp://ftp.xilinx.com/pub/documentation/education/chipscope-6-rev1-prnt.zip
NOTES
www.xilinx.com
1-877-XLX-CLAS
2a-9
MultiLINX (JTAG mode only), Parallel Cable III, Parallel Cable IV, Agilent E5904B
TPA
Lab instructions are written for Windows users.
Objectives
After completing this lab, you will be able to:
Use the ChipScope Pro Core Generator
Instantiate ChipScope Pro cores into an HDL design
Verify a design by using the ChipScope Pro Analyzer
Procedure
This lab comprises five primary steps: you will create an ISE design, generate cores, instantiate
cores into the design, implement the design, and finally perform in-circuit verification. Below
each general instruction for a given procedure, you will find accompanying step-by-step directions
and illustrated figures providing more detail for performing the general instruction. If you feel
confident about a specific instruction, feel free to skip the step-by-step directions and move on to
the next general instruction in the procedure.
Note: You can download the lab files for this module from the Xilinx FTP site at
ftp://ftp.xilinx.com/pub/documentation/education/chipscope-6-rev1-prnt.zip
www.xilinx.com
1-877-XLX-CLAS
2b-3
Step 1
Click Next. Enter your device information, select XST as the synthesis tool, and select
VHDL or Verilog as your simulation language
Click Next two times. Under Add existing sources, click Add Source.
Browse to c:\training\chipscope_pro\labs\CSPro_CoreGen and select counter.v/.vhd and
counter.ucf. Click Open
When the Choose Source Type window pops up, select VHDL/Verilog Design File, and
click OK
Click Next, click Finish
Generate Cores
Step 2
Start the ChipScope Pro Core Generator. Create an ICON core with the following
parameters:
Output netlist: c:\training\chipscope_pro\labs\CSPro_CoreGen
Device Family: This is dictated by the device you are using
Number of Control Ports: 2
Generate HDL Example File: Checked
HDL Language: Based on your design preferences
Synthesis Tool: Xilinx XST
Click Start Programs ChipScope Pro 6.1 ChipScope Pro Core Generator
Under Select Core Type To Generate, select ICON, click Next
For Design Files Output Netlist, click Browse and browse to
c:\training\chipscope_pro\labs\CSPro_CoreGen. Click Save
Select the correct Device Family based on your device
Under Icon Parameters, Number of Control Ports, select 2. Click Next
www.xilinx.com
1-877-XLX-CLAS
2b-4
Check Generate HDL Example File. Select the correct HDL Language for your design
(VHDL or Verilog). For Synthesis Tool, select Xilinx XST.
Click Generate Core. Click Start Over
This will start this tool over again for the next core we create.
www.xilinx.com
1-877-XLX-CLAS
2b-5
Edit each trigger to match the following settings (also shown in Figure 1):
www.xilinx.com
1-877-XLX-CLAS
2b-6
Click Next. For Data Depth, select 512 Samples. Check Data Same As Trigger. Results
are as shown in Figure 2. Click Next
www.xilinx.com
1-877-XLX-CLAS
2b-7
For Input/Output Port Settings, select the following settings (shown in Figure 3):
Step 3
Using your favorite HDL editor, copy and paste the ICON module (Verilog only),
component (VHDL only), signal or wire declarations, and instance from
c:\training\chipscope_pro\labs\CSPro_CoreGen\icon_xst_example(.v/.or .vhd) to
the file c:\training\chipscope_pro\labs\CSPro_CoreGen\counter(.v/.vhd).
Use your favorite HDL editor to open the file
c:\training\chipscope_pro\labs\CSPro_CoreGen\counter.v/.vhd
Use your favorite HDL editor to open the file
c:\training\chipscope_pro\labs\CSPro_CoreGen\icon_xst_example.v/.vhd
www.xilinx.com
1-877-XLX-CLAS
2b-8
For Verilog users: copy and paste the ICON module to the top of the counter.v file.
For VHDL users: copy and paste the ICON component to the declarative region of the
counter architecture (rtl).
For Verilog users: copy and paste the ICON wire declarations to the module.
For VHDL users: copy and paste the ICON signal declarations to the declarative region
of the counter architecture (rtl).
For Verilog users: copy and paste the ICON instance to the module.
For VHDL users: copy and paste the ICON instance into counter architecture (rtl).
Save counter.v/.vhd
Using your favorite HDL editor, copy and paste the ILA module (Verilog only),
component (VHDL only), and instance from
c:\training\chipscope_pro\labs\CSPro_CoreGen\ila_xst_example(.v/.vhd) into the
file c:\training\chipscope_pro\labs\CSPro_CoreGen\counter(.v/.vhd). Edit the
VHDL and Verilog port connections to match the code snippets shown in Figure
4 (Verilog) and Figure 5 (VHDL).
Use your favorite HDL editor to open the file
c:\training\chipscope_pro\labs\CSPro_CoreGen\ila_xst_example.v/.vhd
Copy and paste
For Verilog users: copy and paste the ILA module to the top of the counter.v file.
For VHDL users: copy and paste the ILA component to the declarative region of the
counter architecture (rtl).
For Verilog users: copy and paste the ILA instance to the module
For VHDL users: copy and paste the ILA instance into counter architecture (rtl).
www.xilinx.com
1-877-XLX-CLAS
2b-9
Edit the Verilog and VHDL port connections to match those below, in Figure 4 (Verilog) or
Figure 5 (VHDL)
Using your favorite HDL editor, copy and paste the VIO module (Verilog only),
component (VHDL only), and instance from
c:\training\chipscope_pro\labs\CSPro_CoreGen\vio_xst_example(.v/.vhd) into the
file c:\training\chipscope_pro\labs\CSPro_CoreGen\counter(.v/.vhd). Edit the
VHDL and Verilog port connections to match the code snippets shown in Figure
6 (Verilog) and Figure 7 (VHDL).
Use your favorite HDL editor to open the file
c:\training\chipscope_pro\labs\CSPro_CoreGen\vio_xst_example.v/.vhd
www.xilinx.com
1-877-XLX-CLAS
2b-10
For Verilog users: copy and paste the VIO module to the top of the counter.v file.
For VHDL users: copy and paste the VIO component to the declarative region of the
counter architecture (rtl).
For Verilog users: copy and paste the VIO instance to the module
For VHDL users: copy and paste the VIO instance into counter architecture (rtl).
Edit the Verilog and VHDL port connections to match those below, in Figure 6 (Verilog) or
Figure 7 (VHDL)
www.xilinx.com
1-877-XLX-CLAS
2b-11
Verilog users: In the counter.v file, scroll to the top of the module (declarative region)
and add the following core wire declarations, as shown in Figure 8.
VHDL users: In the counter.vhd file, scroll to the end of the architecture declarative
region and add the following core signal declarations, as shown in Figure 9.
Verilog users: In the counter.v file, scroll to the continuous assignments, and edit the
assignments to match the following figure, Figure 10.
www.xilinx.com
1-877-XLX-CLAS
2b-12
VHDL users: In the counter.vhd file, scroll to the beginning of the architecture (after the
begin statement), and edit the signal assignments to match the following figure, Figure
11.
Step 4
Edit the UCF file to match your board I/O and clock speed. Implement the design
and generate the programming file.
In the Project Navigator Sources in Project window, select counter.ucf
In the Processes for Source window, expand User Constraints, double-click Edit
Constraints (Text)
Edit the I/O pin constraints to match your board-level I/O
Edit the Period and Offset In/Out constraints to match your clock period. Generally, the
Offset In/Out should be safe if set and one-half of the period of the clock
In the Sources in Project window, select counter.vhd
In the Processes for Source window, double-click Generate Programming File
This will synthesize the design, implement the design, and generate the programming file.
Now you are ready to start using the ChipScope Pro Analyzer.
www.xilinx.com
1-877-XLX-CLAS
2b-13
Step 5
www.xilinx.com
1-877-XLX-CLAS
2b-14
www.xilinx.com
1-877-XLX-CLAS
2b-15
Deselect Enable for M0 Match Unit and Enable the M1 Match Unit (result shown in
Figure 15). Click OK
www.xilinx.com
1-877-XLX-CLAS
2b-16
Edit Waveform signal names and create buses, as shown in Figure 18. Save the
ChipScope Pro Analyzer project as cs_analyzer.cpj.
If the Waveform window is not open, in the New Project window (upper-left corner),
expand JTAG Chain, expand Device (your device number), expand ILA Unit, and doubleclick Waveform window.
The DataPorts represent the following HDL connections:
DataPort[0]: reset
DataPort[4:1]: cnt4
DataPort[12:5]: div_cntr2
To edit the names, in the Signals window, in the left-hand pane of the Analyzer window,
expand Trigger Ports, and expand each trigger port. For Trigger Port 0, right-click CH: 0,
and select Rename. Enter reset and click Enter (or Return) on your keyboard
Repeat instruction 2 for Trigger Port1 and Trigger Port 2, using the names shown below in
Figure 17
Select the individual cnt4 signals and press Delete on your keyboard
www.xilinx.com
1-877-XLX-CLAS
2b-17
Repeat instructions 4 and 5 for div_cntr2, creating a bus named div_cntr2[7:0]. The
resulting Waveform Bus/Signal pane should look like that shown in Figure 18
www.xilinx.com
1-877-XLX-CLAS
2b-18
Edit VIO Console signal names to match those shown in Figure 21, on page 20.
Open the VIO console by double-clicking VIO Console in the Project pane, as shown below
in Figure 20
SyncIn[3:0]: cnt4[3:0]
SyncIn[11:4]: div_cntr2[7:0]
SyncIn[27:12]: div_cntr1[15:0]
The SyncOut outputs represent the following HDL input signals:
SyncOut[3:0]: load_data
SyncOut4: load
SyncOut5: sync_reset
Shift-click SyncIn[0] to SyncIn[3]. Right-click and select Add to Bus New Bus. Rightclick the newly created bus, BUS_0, and select Rename. Enter cnt4 and select OK
Repeat instruction 2 for SyncIn[4] to SyncIn[11]. Name this bus div_cntr2
Repeat instruction 2 for SyncIn[12] to SyncIn[27]. Name this bus div_cntr1
Repeat instruction 2 for SyncOut[0] to SyncOut[3]. Name this bus load_data
Right-click SyncOut[4] and select Rename. Enter load and click OK
Repeat instruction 6 for SyncOut[5]. Name this signal sync_reset
Right-click Load and select Type Toggle Button
This will allow you to toggle the value of load by clicking the button to the right.
Right-click sync_reset and select Type Push Button High
This creates a push button that will toggle the value of this signal while you click and hold
this signal. The active value of this signal is High. The default, therefore, is Low.
www.xilinx.com
1-877-XLX-CLAS
2b-19
Click-and-drag the signals to match what is shown below, in Figure 21
Change the values of the VIO signals and view the results in the console.
Edit the load_data text value to hex F. Click Load. View the change to cnt4. It should now
have the value hex F. Click the Load value again to enable the counter to count up
Click and hold the sync_reset value button. This should reset the cnt4 value to 0. Release
sync_reset, and cnt4 should continue to count
Experiment with different values of load data. Experiment with different types for the
sync_reset, load, and load_data signals
Click File Save Project
For more experimenting, change the code to create an up/down counter, or count by 2, or
various other things. Add an up/down control signal to the VIO core and experiment.
Conclusion
ChipScope Pro is an extremely powerful tool that will you save time and money. The
capabilities covered in this lab are just the tip of the iceberg. Have fun with this powerful tool!
www.xilinx.com
1-877-XLX-CLAS
2b-20
MultiLINX (JTAG mode only), Parallel Cable III, Parallel Cable IV, Agilent E5904B
TPA
Lab instructions are written for Windows users
Objectives
After completing this lab, you will be able to:
Use the ChipScope Pro Core Inserter
Make ChipScope Pro Core connections
Verify a design by using the ChipScope Pro Analyzer
Procedure
This lab comprises four primary steps: you will create an ISE design, generate the cores,
implement the design, and finally perform in-circuit verification. Below each general instruction
for a given procedure, you will find accompanying step-by-step directions and illustrated figures
providing more detail for performing the general instruction. If you feel confident about a specific
instruction, feel free to skip the step-by-step directions and move on to the next general instruction
in the procedure.
Note: You can download the lab files for this module from the Xilinx FTP site at
ftp://ftp.xilinx.com/pub/documentation/education/chipscope-6-rev1-prnt.zip
www.xilinx.com
1-877-XLX-CLAS
2c--3
Step 1
Click Next. Enter your device information, select XST as the synthesis tool, and select
VHDL or Verilog as your simulation language.
Click Next two times. Under Add existing sources, click Add Source. Browse to
c:\training\chipscope_pro\labs\CSPro_CoreIns and select counter.v/.vhd and counter.ucf.
Click Open. When the Choose Source Type window pops up, select VHDL/Verilog Design
File, and click OK
Click Next, click Finish
Generate Cores
Step 2
www.xilinx.com
1-877-XLX-CLAS
2c--4
In the New Source window, select ChipScope Definition and Connection File in the lefthand pane. Enter a File Name of cs_pro. The location should be
c:\training\chipscope_pro\labs\CSPro_CoreIns. Make sure Add to project is checked, click
Next (Figure 1)
Generate ChipScope cores through the Core Inserter. Create an ILA core with
the following parameters:
Use SRL16s and RPMs: Checked
Number of Input Trigger Ports: 3
TRIG0 Trigger Width: 1
TRIG1 Trigger Width: 4
TRIG2 Trigger Width: 8
Data Depth: 512
Data Same as Trigger: Checked
In the Sources in Project window, double-click cs_pro.cdc
This will open the ChipScope Pro Core Inserter after it has synthesized the design.
In the ChipScope Pro Core Inserter window, select ICON in the left-hand pane. Click Next
This will start the creation process for generating an ILA core.
For Number of Input Trigger Ports, select 3
www.xilinx.com
1-877-XLX-CLAS
2c--5
Edit each trigger to match the following settings (also shown in Figure 2):
www.xilinx.com
1-877-XLX-CLAS
2c--6
Click Next. For Data Depth, select 512 Samples. Check Data Same As Trigger. Results
are as shown in Figure 3, below. Click Next
www.xilinx.com
1-877-XLX-CLAS
2c--7
In the ChipScope Pro Core Inserter window, click Return to Project Navigator. Click
Yes to save the project
This will save to appropriate cores and insert them into the netlist.
www.xilinx.com
1-877-XLX-CLAS
2c--8
Implement Design
Step 3
Edit the UCF file to match your board I/O and clock speed. Implement the design
and generate the programming file.
In the Project Navigator Sources in Project window, select counter.ucf. In the Processes
for Source window, expand User Constraints, double-click Edit Constraints (Text)
Edit the I/O pin constraints to match your board-level I/O
Edit the Period and Offset In/Out constraints to match your clock period
Generally, the Offset In/Out should be safe if set and one-half the period of the clock.
In the Sources in Project window, select counter.vhd
In the Processes for Source window, double-click Generate Programming File
This will implement the design and generate the programming file. Now we are ready to start
using the ChipScope Pro Analyzer.
Step 4
www.xilinx.com
1-877-XLX-CLAS
2c--9
This will program the device and initialize the Trigger Setup window and the Waveform
window.
www.xilinx.com
1-877-XLX-CLAS
2c--10
Deselect Enable for M0 Match Unit and Enable the M1 Match Unit (result shown in
Figure 7). Click OK
Note: You can create Boolean equations by combining multiple match units to create a
trigger. You can also create a sequence of events for the trigger by selecting the Sequencer
tab.
www.xilinx.com
1-877-XLX-CLAS
2c--11
Repeat instructions 4 and 5 and create a trigger for Match Unit M2. Click the Active button
for Trigger Condtion2
This will set this as the active triggeronly one trigger can be active at any one timewhen
we setup and run the triggers.
Your Trigger Setup Window should now look like Figure 8.
Edit the Waveform signal names and create buses as shown in Figure 9. Save
the ChipScope Pro Analyzer project as cs_analyzer.cpj.
If the Waveform window is not open, in the New Project window (upper-left corner),
expand JTAG Chain, expand Device (your device number), expand ILA Unit, double-click
Waveform window. (If only DataPort[0] is available, you will have to go back and open the
Core Inserter and ensure all of the Trigger ports are included as Data (checked) in the
Capture Parameters tab, as shown in Figure 2.)
The DataPorts represent the following HDL connections:
DataPort[0]: reset
DataPort[4:1]: cnt4
DataPort[12:5]: div_cntr2
To edit the names, in the Signals window in the left-hand pane of the Analyzer window,
expand Trigger Ports, and expand each trigger port. For Trigger Port 0, right-click CH: 0,
and select Rename. Enter reset and click Enter (or Return) on your keyboard
www.xilinx.com
1-877-XLX-CLAS
2c--12
Repeat instruction 2 for Trigger Port1 and Trigger Port 2, using the names shown in Figure
9, below
Select the individual cnt4 signals and press Delete on your keyboard
Repeat instructions 4 and 5, for div_cntr2, creating a bus named div_cntr2[7:0]. The
resulting Waveform Bus/Signal pane, should look like that shown in Figure 10
www.xilinx.com
1-877-XLX-CLAS
2c--13
Conclusion
ChipScope Pro is an extremely powerful tool that will save you time and money. The
capabilities covered in this lab are just the tip of the iceberg. Have fun with this powerful tool!
www.xilinx.com
1-877-XLX-CLAS
2c--14