Professional Documents
Culture Documents
Objectives
After completing this lab, you will be able to:
Procedure
This lab is separated into steps that consist of general overview statements that provide information on
the detailed instructions that follow. Follow these detailed instructions to progress through the lab.
This lab comprises 4 primary steps: You will open the lab 6 project, instantiate Chipscope cores, setup
SDK and Chipscope, and, finally, perform hardware/software verification.
Design Description
You will extend the system created in the previous lab by adding Chipscope ICON and IBA cores. The
IBA core will be added to the AXI bus. You will set trigger conditions in the Chipscope Analyzer software
(running on PC) to capture bus transactions when the value of the count variable is written to the LEDs.
When the hardware trigger condition is met, you will see that the software debugger stops at the line of
code that was last executed. This lab comprises the following steps:
www.xilinx.com/university
xup@xilinx.com
Copyright 2012 Xilinx
Nexys3 6-1
Lab Workbook
Step 2:
Instantiate
Chipscope
cores
Step 3:
Setup SDK
and
Chipscope
Step 4:
Perform
hardware/sof
tware
verification
Step 1
1-1-1. Create a lab6 folder in the c:\xup\embedded\labs directory. If you wish to continue with your
completed design from lab5 then copy the contents of the lab5 folder into the lab6 folder,
otherwise copy the content of labsolution\lab5 folder into the lab6 folder.
1-1-2. Open XPS by clicking Start > All Programs > Xilinx Design Tools > ISE Design Suite 14.2 >
EDK > Xilinx Platform Studio
1-1-3. Browse to the lab6 directory and open the project system.xmp
Step 2
www.xilinx.com/university
xup@xilinx.com
Copyright 2012 Xilinx
Lab Workbook
Nexys3 6-3
Lab Workbook
2-1-3. Select led_ip_0.s_AXI from dropdown window as the Monitor Bus Signal and set the Select
the Number of signal samples you want to collect option to 1024.
Nexys3 6-4
www.xilinx.com/university
xup@xilinx.com
Copyright 2012 Xilinx
Lab Workbook
www.xilinx.com/university
xup@xilinx.com
Copyright 2012 Xilinx
Nexys3 6-5
Lab Workbook
Step 3
Export the project to SDK and establish a connection to the target using
XMD. Having successfully generated your design it is possible to begin
viewing it in operation using the SDK debugger and ChipScope Pro tools.
Starting the SDK debugger (Software Debug)
3-1-1. Open SDK by selecting Project > Export Hardware Design to SDK
3-1-2. Check Include Bitstream and BMM File option and click on Export & Launch SDK button.
3-1-3. Browse to c:\xup\embedded\labs\lab6\SDK\SDK_Export as the workspace, and click OK.
A debug perspective will open as that was the last view we had used in Lab5.
3-1-4. In Debug perspective, disable a breakpoint placed in the interrupt handler by right-clicking on the
line where breakpoint is present and select Disable Breakpoint.
3-1-5. With the board connected and powered, select Xilinx Tools > Program FPGA to update the
bitstream with the bootloop executable.
Nexys3 6-6
www.xilinx.com/university
xup@xilinx.com
Copyright 2012 Xilinx
Lab Workbook
3-1-6. Click on Browse buttons and select system.bit and system_bd.bmm files from
c:\xup\embedded\labs\lab6\SDK\SDK_Export\lab1_hw_platform directory. Select bootloop
as the application.
3-1-7. Click on Program.
3-1-8. Start the debugger by selecting Run > Debug.
The SDK Debugger should now be connected to the target and operation should be suspended.
Code operation will be halted at the first line following the main( ) routine
3-2.
3-2-1. Launch the ChipScope Pro Analyzer tool by selecting Start > All Programs > Xilinx Design
Tools > ISE Design Suite 14.2 > ChipScope Pro > ChipScope 64-bit (or 32-bit) > Analyzer.
3-2-2. Click
3-2-3. Click OK to open ChipScope Pro Analyzer with default Trigger Setup and Waveform signal
windows.
3-2-4. Select File > Import. In the Signal Import dialogue click on the Select New File button.
3-2-5. Browse to the implementation directory and select the following chipscope definition and
connection file (CDC) C:\xup\embedded\labs\lab6\implementation
\ chipscope_axi_monitor_0_wrapper\chipscope_axi_monitor_0.cdc and click OK
The CDC file contains signals associated with the LED core which should now be listed in the
Trigger Setup and Waveform signal windows.
www.xilinx.com/university
xup@xilinx.com
Copyright 2012 Xilinx
Nexys3 6-7
Lab Workbook
3-2-6. Click on the check-box of Auto-Create Buses (if not checked) and click OK.
3-2-7. In waveform window, select all signals except MON_AXI_AWADDR and MON_AXI_WDATA
buses In the Waveform window, right-click, and select Remove from Viewer.
Step 4
Setup the trigger to capture 32 data samples when count values greater
than 5 are written to the LEDs.
4-1-1. Change the Radix of M2 and M8 from binary (Bin) to Hexadecimal (Hex) by clicking on the
respective boxes and selecting Hex.
4-1-2. Set M2: MON_AXI_AWADDR == 7F40_0000 (or base address of led_ip peripheral) and M8:
MON_AXI_WDATA > 0000_0005 by selecting and adjusting the value box.
4-1-3. Click the field under Trigger Condition Equation, which opens the Trigger Condition:
TriggerCondition0 dialog box. Select M2 and Select M8, and then click OK to close.
The Trigger Condition Equation field should now display M2 && M8. Click OK.
4-1-4. Set the trigger window depth to 32 and position to 0
4-1-5. Set the Storage Qualification (M2&&M8) so that you capture count values greater than 5 when
written to the led_ip peripheral.
Your settings should be similar to what is shown next.
www.xilinx.com/university
xup@xilinx.com
Copyright 2012 Xilinx
Lab Workbook
4-1-6. Start the run to capture data by selecting Trigger Setup > Run.
The ChipScope should be waiting for the trigger condition to meet since the program is not
running and the LEDs are 0x00.
4-2.
4-2-1. In SDK, type con in the XMD window to run the program.
4-2-2. After Sample buffer is full, select Mon_AXI_AWADDR in the waveform window, right-click and
select Reverse Bus Order. Similarly, reverse the MON_AXI_WDATA bus order.
4-2-3. The ILA core will trigger when a value greater than 5 is written to the LEDs. The buffer will be
filled with 32 data samples, which will be displayed in Chipscope-Pro Analyzer.
Base address of
Figure Peripheral
15. Chipscope-Pro Debug Results
LEDs_8Bit
Conclusion
Chipscope HW debug modules can be added as IP modules in EDK, and the ChipScope analyzer can be
used in conjunction with SDK debugger, to provide a debug environment that allows cross triggering and
debug between hardware and software using a shared JTAG connection.
www.xilinx.com/university
xup@xilinx.com
Copyright 2012 Xilinx
Nexys3 6-9
Lab Workbook
www.xilinx.com/university
xup@xilinx.com
Copyright 2012 Xilinx
Lab Workbook
Nexys3 6-11
Lab Workbook
www.xilinx.com/university
xup@xilinx.com
Copyright 2012 Xilinx
Lab Workbook
Nexys3 6-13
Lab Workbook
Nexys3 6-14
www.xilinx.com/university
xup@xilinx.com
Copyright 2012 Xilinx