Introduction
In this guide, you will establish a point-to-point connection between two MGTs (ie. Loopback or
board-to-board) via the SATA connectors on the XUP Virtex-2 Pro board. The XUP Virtex-2 Pro
Development System contains a Virtex-2 Pro XC2VP30 that is equipped with eight Rocket IO
Multi-Gigabit Transceivers. Four of the eight transceivers have been brought out to connectors
(Figure 1) on the XUP board: three to Serial ATA connectors and one to a user-supplied SMA
connector. The SATA channels are split into two interface formats, two HOST ports and a
TARGET port. The TARGET port interchanges the transmit and receive differential pairs to
allow two XUP Virtex-2 Pro boards to be connected as a simple network, or multiple boards to be
connected in a ring.
SATA 0
Host
SATA 1
Target
SATA 2
Host User Supplied
SMA Connectors
Requirements
• XUP Virtex-2 Pro development System
• Low cost Serial ATA cable
• v7.1 ISE Foundation + SP3 (or latest service pack)
• Latest IP Update – should contain Aurora Core 2.3
• v7.1 Chipscope-Pro
• MTI Modelsim SE or PE (v5.7 or later)
References
• XUP Virtex-2 Pro User Guide (www.xilinx.com/univ)
• Rocket IO Transceiver User Guide (http://www.xilinx.com/bvdocs/userguides/ug024.pdf)
• Aurora Core User Guide (provided with generation of aurora core via CORE Generator)
• Constraints Guide (http://www.xilinx.com/support/software_manuals.htm → 7.1i Software
Manuals → Select PDF/HTML → Constraints Guide on left side)
• Chipscope Pro 7.1 User Manual (http://www.xilinx.com/literature/literature-chipscope.htm)
Deliverables
User to create directory called /quickstart (ie. C:/xupv2p/quickstart) and unzip aurora.zip here. After
unzipping, you should see the following directories along with contents:
../quickstart/aurora/docs
• Aurora_QuickStart.doc (Aurora Quick Start Guide)
• Simulation_Waveforms.ppt (Modelsim Simulation Results)
• IP_Aurora.ppt (Aurora overview presentation)
../quickstart/aurora/source
• Aurora_sample_onefpga.v (top-level design used for this quick start)
../quickstart/aurora/sim
• Aurora_sample_tb_onefpga.v (test fixture that performs HDL simulation emulating loopback
with a serial ATA cable; this one is used in the quick start)
• sim_onefpga.do (simulation script file for Modelsim; this one used to perform simulation on
using aurora_sample_tb_onefpga.v)
../quickstart/aurora/cs_proj
• Chipscope project that contains signal and net names according to the
aurora_sample_onefpga.v design
../quickstart/aurora/UCF
• Constraints file that contains pin locations and timing for aurora_sample_onefpga.v design
../quickstart/aurora/test
Aurora Aurora
Lane 1 Channel
User User
Application Aurora Aurora Application
User
Interface Interface User
Interface Interface
Aurora
Lane n
Each high-speed serial connection between MGTs is called a lane. Any number of lanes can be
bonded to create an Aurora channel. When the aurora channel is not being used to send data, it is
filled with a random idle sequence. Aurora uses the same idle characters as the XAUI protocol,
randomized for low EMI. Aurora uses 8B/10B encoding for DC balance, error detection, and to
allow control characters in the data stream.
The Aurora core can be downloaded free of charge from the Xilinx web site at:
http://www.xilinx.com/products/design_resources/conn_central/grouping/aurora.htm
Click on the Aurora Core link and follow the instructions to register, download, and install the
Aurora core. The deliverables include
y Protocol Specification
y Bus Functional Model (support for Modelsim, VerilogXL, VCS, and NCVerilog
simulators)
y Reference Designs (Key for free Xilinx Core Generator reference designs)
Design Overview
The sample design instantiates the generated Aurora core twice. One instantiation interfaces to the SATA
0 host and the other to the SATA 1 target on the MGT side, which enables a loopback test using a Serial
ATA cable. On the FPGA side, they interface to a counter which feeds the transmit and an error checking
module on the receive.
Aurora Module 2
tx_di_2
Counter MGT SATA 1
Transmit Target
Error
Check rx_di_2
Receive
You will invoke Core Generator to specify parameters and generate the Aurora core.
p Browse to ..\quickstart\aurora\core directory, enter aurora_link as the name, and click Next
to continue
p Enter the following options to target the Virtex-2 Pro device on the XUP board and click OK
y Family: Virtex2P
y Device: xc2vp30
y Package: ff896
y Speed Grade: -7
q Expand Communications & Networking Æ Serial Interfaces, and select Aurora v2.3
Note: Refer to the “Using the Multi-Gigabit Transceivers” section of the XUP Virtex-2 Pro
user guide for information on available MGT clocks. The MGT connectors are in order
across the top row as follows: SATA 0 Host, SATA 1 Target, SATA 2 Host, SMAs
r Review the README dialog that lists the directories created along with a description of each
directory. For convenience, the file names, locations and descriptions are listed in the table
below. Click <OK> when finished.
Note: You may view the generated directory structure in windows explorer
In this step, you will verify that the SWIFT models are properly setup on your
system.
n Go to www.xilinx.com/support and browse for the following solution records:
Solution record #15338 which explains the Xilinx Modelsim library installation process
y Using the CompXlib utility via command prompt (ie. compxlib –s mti_se –f all – l all -0
c:\modeltech_6.0b\xilinx_libs)
There are two Modelsim *.do files provided that enable to you simulate the
design. These files perform the following tasks:
y Maps to the relevant Xilinx Modelsim libraries
y Compiles the Verilog files
y Loads relevant signals into the wave viewer
y Executes for 120us
You will modify the file(s) according to your Modelsim installation path and
project directories. Next, you will open up Modelsim and simulate the design.
There are two test benches available:
p Open Modelsim and change to the /sim directory. For example, you may use the cd command
as follows:
> cd c:/quickstart/aurora/sim
> do sim_onefpga.do
Note: The Aurora protocol provides a compensating mechanism for clock rate differences between
the transmitter and receiver. The cc_manager.v file triggers 6 clock compensation transfers every
5000 cycles
Launch the ISE Project Navigator and create a new design project.
o In the Project Navigator, select File → Open Project, and browse to the /ise subdirectory
q Double-click on the device line and review the settings and tool options. Click <OK> when
finished.
You will instantiate the generated Aurora core in the design. The design includes
two instances of the Aurora Core, one that connects to the SATA host 0 port and
one that connects to the SATA Target 1 port. An ever increasing count sequence
drives the data input to the transmitters on both instances. You will also add the
UCF, which is the user constraints file. This file contains location constraints for
the MGT, as well as timing and location constraints for the clock signals. Refer
to Appendix A for more information on adding the constraints for the Aurora
design.
o Browse to the \src subdirectory created when running CORE generator, select all files using
CTRL + Shift keys, and add them to the project
p Go to Project → Add Source, browse to the \cc_manager subdirectory, and add the
standard_cc_module.v as a Verilog Design File to the ISE project
q Expand User Constraints in the Processes for Source window and double-click on Edit
Constraints (Text) to view the constraints that are placed on the design.
Note that these constraints have been modified from the original copy generated from Core
Generator as there are two instances of the Aurora core in the design.
All the files are now added, and you should see the hierarchy similar to Figure 17.
The Chipscope cores have already been generated and pre-connected in the design
(refer to appendix B). Use the Chipscope Analyzer interfaces directly to the
ICON and ILA cores. You will configure the device, specify trigger options,
setup the console, and view results on the fly.
n Right-click on Translate in the Processes for Source window, and select Properties.
o Click on the Macro Search Path and browse to the /cs_proj directory.
Note: The ISE software will include the chipscope core netlists when implementing the
design.
p Double-click on Analyze Design Using Chipscope in the Processes for Source window of
the ISE Project Navigator.
Note: This may run through Synthesis, Implementation, and bitstream generation
q Connect the JTAG download and Serial ATA cables, and power up the board.
s Click <OK> in the JTAG Chain Device Order dialog, which lists all the devices detected in
the JTAG chain on the target board.
t Review the various windows displayed in the Chipscope Analyzer, which include the ILA
units, Signal view, Trigger Setup, and Display windows.
Note: The Data and Trigger port signals to not reflect the signal names in the design.
u Go to File → Open Project and select aurora_link_cs.proj from the \cs_proj directory.
Note: A chipscope pro project has been created for you, which includes all of the appropriate
signal names for the trigger/data port connections.
v Select the Click the Apply Settings and Arm Trigger icon
Note: The trigger stays armed until the trigger condition is satisfied. In this guide, we specify
the trigger condition as don’t care (X) values so the ILA/ICON cores will automatically
capture data when armed.
w Right-click on a value (ie. 16770) for tx_d_i_1 in the waveform view and select Place O
Cursor.
w Scroll through the waveform and find the same value for the rx_d_i_2, right-click on the
waveform, and select Place X Cursor.
Note the (X-O) value in the bottom right-hand side of the waveform view, which indicates the
number of clock pulses between the transmit and receive. This will help to determine the
latency of the cable.
Transmit2 Receive
16770 16770
Latency
of 38 clock
cycles
The UCF (user constraints file) is an ASCII file specifying constraints on the
logical design. You create this file and enter your constraints in the file with a text
editor. You can also use the Constraints Editor to create constraints within a UCF
file. These constraints affect how the logical design is implemented in the target
device. The following figure illustrates the UCF flow.
The UCF file is an input to NGDBuild (see the preceding figure). The constraints
in the UCF file become part of the information in the NGD file produced by
NGDBuild. For FPGAs, some of these constraints are used when the design is
mapped by MAP and some of the constraints are written into the PCF (Physical
Constraints File) produced by MAP. The constraints in the PCF file are used by
each of the physical design tools (for example, PAR and the timing analysis
tools), which are run after your design is mapped.
MGT – SATA
Differential
75 MHz Serial Clock Output BREF_CLK_N
ATA Clock
Source BREF_CLK_P
Differential Clock
Buffer Global Clock
Buffer
IB
Top_BREF_CLK_i user clk_i
O
I
The UCF provided during the generation of the Aurora core from CoreGen
includes constraints for only one instance of the Aurora core. The UCF file has
been updated to include constraints for two instances of the Aurora core,
according to the design. This was accomplished by simply copying the and
pasting the constraints in the UCF file, so that there were two sets of identical
constraints. The constraint paths were then updated according to the instance
names in the top-level Verilog code. The MGT locations were also updated to
place the MGTs (and MGT pinouts) in their respective positions to interface to
the SATA 0 host and SATA 1 target connectors. Constraints were also added for
clock signals to provide a period constraint and clock pin location on the FPGA.
• Modified syntax for PERIOD constraints (This is due to error generated in software: perform
a search for solution record # 20971 at http://www.xilinx.com/support/mysupport.htm)
• Copied Initialization, Lane 0, and Attribute constraints, and then pasted at the bottom of UCF
file to create constraints for the second MGT in the design
• Modified paths to reflect location in design hierarchy for each MGT
• Modified location constraint for 2nd MGT (providing a simple line of text automatically
updates all pin locations for the MGT)
#When the FPGA powers up, the AURORA Module should reset itself once
and
#prepare its pseudorandom Idle sequence generators
ChipScope Pro inserts logic analyzer, bus analyzer, and Virtual I/O low-profile
software cores into your design. These cores allow you to view all the internal
signals and nodes within your FPGA, including the IBM CoreConnect Processor
Local Bus or On-Chip Peripheral Bus supporting the IBM PowerPC 405 inside
The Virtex-II Pro FGPA. Signals are captured at or near operating system speed
and brought out through the programming interface, freeing up pins for your
design, not debug. Captured signals can then be analyzed through the ChipScope
Pro Logic Analyzer.
The following steps were taken to generate and insert the integrated controller
(ICON) and integrated logic analyzer (ILA) into the design using the Chipscope-
Pro Core Generator.
p Set the path for the Output Netlist to a subdirectory called cs_cores in the project directory,
select Virtex2P as the Device Family, specify the Number of Control Ports as 2 and click
<next> to continue
q Verify that a check appears next to Generate HDL Example File, select Verilog as the HDL
Language, and click <Generate>
r Browse to the cs_cores directory and notice the following key files
u Open the icon_xst_example.v file with an editor such as Word Pad and review the
instantiation template
//-----------------------------------------------------------------
//
// ICON core wire declarations
//
//-----------------------------------------------------------------
wire [35:0] control0;
wire [35:0] control1;
//-----------------------------------------------------------------
//
// ICON core instance
//
//-----------------------------------------------------------------
icon i_icon
(
.control0(control0),
.control1(control1)
);
endmodule
//-------------------------------------------------------------------
//
// ICON core module declaration
//
//-------------------------------------------------------------------
module icon
(
control0,
control1
);
output [35:0] control0;
output [35:0] control1;
endmodule
Note: The ICON core is already instantiated in the design. Typically, this is a manual process
that must be completed by the designer.
o With the ILA (Integrated Logic Analyzer) option selected, click <Next>
s Specify the following options for the Trigger Input and Match Unit Settings and click
<Next>
s Click to place a check mark next to Data Same as Trigger and click <Next>
s Under HDL Example File Settings, click to place a check mark next to Generate HDL
Example File, select Verilog as the HDL Language, specify Xilinx XST as the synthesis
tool, and click Generate Core.
t Browse to the cs_cores directory and notice the following key files
y ila.edn (netlist that will be instantiated into the design as a black box)
y ila_xst_example.v (instantiation example)
u Open the icon_xst_example.v file (see figure below) with an editor such as Word Pad
v Copy the declaration and instantiations at the appropriate places in the top-level Verilog
design
//-----------------------------------------------------------------
//
// ILA Core wire declarations
//
//-----------------------------------------------------------------
wire [35:0] control;
wire clk;
wire [38:0] trig0;
//-----------------------------------------------------------------
//
// ILA core instance
//
//-----------------------------------------------------------------
ila i_ila
(
.control(control),
.clk(clk),
.trig0(trig0)
);
endmodule
//-------------------------------------------------------------------
//
// ILA core module declaration
//
//-------------------------------------------------------------------
module ila
(
control,
clk,
trig0
);
input [35:0] control;
input clk;
input [38:0] trig0;
endmodule