Toronto ECE 532 - Module - Using Chipscope in EDK

Unformatted text preview:

University of TorontoECE532 Digital System DesignModule: Using Chipscope in EDKVersion for EDK 10.1.03 as of June 14, 2010Goals• To understand how to utilize chipscope in debugging the FPGA• To learn how to incorporate different debugging chipscope cores in the system• To be able to interpret the signal waveform outputs in debuggingRequirementsYou’ll need access to:• The Xilinx EDK 10.1 and ChipScope Pro 10.1 software with IP Update 3.PreparationPlease follow the menu link below to access to the documents in XPS:-Help−→EDK Online Documentation−→IP Reference−→Processor IP CatalogRead the following chipscope peripherals to get familiar with chipscope:-• ChipScope ICON• ChipScope ILANoteUsing ChipScope in EDK does not require us to generate the core manually. The cores are integrated intothe tool using TCL script. The TCL script is called during the execution of EDK Platgen tool. The scriptcalls Core Generator in command line mode and provides arguments file to generate netlist internally.Configure Hardware1. Using the Base System Builder Wizard (BSB), create a new XUPV2P microblaze design withfrequency 100.00Hz.2. Select On-chip H/W debug module with local memory 32 KB and disable cache setup.3. In the Configure IO Interface, select the following peripheral:• RS232 Uart• LEDs 4Bit• PushButton 5Bit4. In the Software setup, uncheck both Memory test and Peripheral Selftest.5. Continue the BSB setup and click finish.6. Browse to IP Catalog−→Debug, double click on ChipScope Integrated Logic Analyzer (ILA) andChipscope Integrated Controller (ICON) to add them to the system.1University of TorontoECE532 Digital System DesignModule: Using Chipscope in EDK7. Scroll to System Assembly View−→Ports, make new connections for the following ports:-• LEDs 4Bit−→GPIO IO O• PushButton 5Bit−→GPIO IO I• chipscope icon 0 −→control08. Under the chipscope ila 0 tab, connect the following ports:-• TRIG0 connects to PushButtons 5Bit GPIO IO I• DATA connects to LEDs 4Bit GPIO IO O• CLK connects to sys clk s• CHIPSCOPE ILA CONTROL connects to chipscope icon 0 control09. Double click on chipscope ila 0 and make the following changes:-Under the Misc tab• Change Number of Data Samples Captured Per Trigger Match to 4096.• Disable Use The ILA Trigger Signal As The ILA Data Signal to allow signal other than thetrigger as data output.• Change Width of ILA Data Input Signal to 4 as the LEDs 4Bit will be the outputs• Uncheck Enable The Trigger Out Signal ”trig out”• Change Maximum Number of Levels supported by the Trigger Sequencer to 4Under the Trigger Unit tab• Change Number of Match Unit Enabled for Trigger Unit 0 to 4• Change Width of Trigger Input for Trigger Unit 0 to 5• Leave the Match Counter Width and Match Type as default. (Note: You may refer to thedocuments in Preparation section to learn more comparison operations that are provided withdifferent match types. For now, we use only == and ≺ operations in basic mode.)10. Generate bitstream and make sure there is no errors.Configure Software1. Scroll to Software tab and click Add Software Application Project, name it as chipscope.2. Under Applications tab, add the chipscope.c file as your source file in the project directory .3. Under Software tab, click Build all user application and make sure there is no errors.4. Read the simple chipscope.c file and predict the shape of the waveforms.5. Download the bistream to your board and launch XMD shell in Hardware debugging mode.6. After the connection is established, download the source file with dow chipscope/executable.elfand type run.2University of TorontoECE532 Digital System DesignModule: Using Chipscope in EDKUsing Chipscope Analyzer1. Launch the Chipscope Analyzer under your ChipScope Pro directory.2. Click on the Open Cable/Search JTAG Chain icon at the left upper side of the window.3. After the socket connection is opened, you should be able to see a window listing the connected devices.Make sure that XC2VP30 is connected and click OK.4. Scroll to File−→Import, click Select New File, browse to your project directory and select chip-scope ila 0.cdc file in your root folder. (Note: If you cannot find the file, browse to ....(project direc-tory)/implementation/chipscope ila 0 wrapper/chipscope ila 0.cdc instead.)5. In the Trigger Setup−→Match Functions interface, change M0 value from X XXXX to 0 XXXX.This means that the ENTER push button will treat as the trigger. (Note: Look at the chipscope.cfile to identify which bit correspond to which input signal.)6. Click the “Play” icon on the shortcut command bar. No waveform will be displayed until the matchunit is trigger.7. Now, press the ENTER push button as trigger. When the signal change to low, 4096 cycles of data(as specified in EDK) are collected and the wavaform is displayed. Since the default constant is 0, allthe signals should be low.8. To display a +1 up counter, click “Play” icon again, press and hold the UP push button. Before yourelease, press ENTER to trigger the output collection. You should be able to see the up counterwaveform right now. (Note: Do the same for different push buttons to change the counter constantand observe different waveform.)9. The LEDs light up all the time as the signal changes are too fast to be observed.10. You can use the sequencer to trigger the chipscope in any orders you like. For instance, change thefollowing match units:-Match Unit ValueM0 X 0XXX UpM1 X X0XX DownM2 X XX0X LeftM3 X XXX0 Right11. In the Trigger Setup−→Trigger Conditions interface, double click on MO under Trigger Con-dition Equation, enable all four match units in Boolean tab, switch to Sequencer tab and assignthe following match units:-Level Match Unit1 M02 M13 M24 M312. To trigger the chipscope M0−→M1−→M2−→M3, press the buttons in this order UP −→DOWN−→LEFT −→RIGHT.13. As long as these conditions happen in sequence, chipscope can be triggered. It means even UP −→ENTER −→DOWN −→ENTER −→LEFT −→ENTER −→RIGHT can be the trigger becausethe four conditions happen.14. Try on other match units and sequencer to get familiar with chipscope.3University of TorontoECE532 Digital System DesignModule: Using Chipscope in EDKReferenceYou may refer to the following materials for further information about chipscope:-• ChipScope Pro 10.1 Serial I/O Toolkit User Guide• ChipScope Pro 10.1 Software and Cores User


View Full Document

Toronto ECE 532 - Module - Using Chipscope in EDK

Documents in this Course
Load more
Download Module - Using Chipscope in EDK
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Module - Using Chipscope in EDK and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Module - Using Chipscope in EDK 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?