Changes between Version 9 and Version 10 of Exercises/13_4/IntroToXPS/w2
- Timestamp:
- Dec 7, 2012, 4:02:57 PM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Exercises/13_4/IntroToXPS/w2
v9 v10 32 32 * Captured Output Register: This register attaches to the bus and allows C-code executing inside the PowerPC to read the current latched output of the LFSR. 33 33 34 You will also notice in the diagram the green "FPGA Pins" ports. These are top-level ports that are routed out to physical pins on the FPGA. These pins are connected to other components on the WARP board. For the purpose of this exercise, we have provided this pcore as an example of a hardware peripheral you may want to integrate into your design. The [wiki:Exercises/13_4/Sys genExportPcoreExporting pcores from System Generator] exercise covers how this pcore was created.34 You will also notice in the diagram the green "FPGA Pins" ports. These are top-level ports that are routed out to physical pins on the FPGA. These pins are connected to other components on the WARP board. For the purpose of this exercise, we have provided this pcore as an example of a hardware peripheral you may want to integrate into your design. The [wiki:Exercises/13_4/SysGenExport Exporting pcores from System Generator] exercise covers how this pcore was created. 35 35 36 36 … … 91 91 9. Click File→Save. You will be asked if you want to reload the project; click "Reload." At this point, you may wonder how you are supposed to know the names of ports themselves. Unfortunately, ports that are floating (i.e. disconnected) do not show up in the system.mhs file. The best way to find a full list of all ports a pcore has is by looking at its entry in the "System Assembly View" tab. In the next step, we'll be looking at this view to verify that the prng_useriosrc pcore is correctly hooked up to the system. 92 92 93 1 . Open the System Assembly View tab and make sure you are looking at the "Bus Interfaces" subtab. To the left of prng_useriosrc_plbw_0, you see a yellow circle connecting the core to the plb_secondary_80MHz bus. Unconnected pcores show an empty, white circle.93 10. Open the System Assembly View tab and make sure you are looking at the "Bus Interfaces" subtab. To the left of prng_useriosrc_plbw_0, you see a yellow circle connecting the core to the "plb" bus (this is the 80MHz bus). Unconnected pcores show an empty, white circle. 94 94 95 95 [[Image(busconnection.png)]] 96 96 97 11. Next, click on the "Ports" subtab. Click the + next to the w3_userio_0 core and the prng_useriosrc_plbw_0 core. The names shown next to the port are ''not'' the arbitrary net names we gave earlier (e.g. LeftHexDisplay). Instead, this GUI shows ''what'' core each port is connected. It should look like this:97 11. Next, click on the "Ports" subtab. Click the + next to the prng_useriosrc_plbw_0 core. The names shown next to the port are ''not'' the arbitrary net names we gave earlier (e.g. RedLEDs). Instead, this GUI shows ''what'' core each port is connected. It should look like this: 98 98 99 99 [[Image(portconnection.png)]] … … 109 109 1. The SDK will launch and will pull up a window for you to select your workspace. Navigate to the SDK_workspace folder you cleared out at the beginning of these instructions. Then click "OK." 110 110 1. The SDK will now open and will have one project: the "_hw_platform" from the hardware design from XPS. You might recall from the [wiki:IntroToSDK Introduction to SDK] exercise that two other software projects are needed to be able to run this design on the board: a Board Support Package (BSP) and a top-level software project. We will create these manually rather than import existing ones like in the [wiki:IntroToSDK Introduction to SDK] exercise. 111 1. Rather strangely, the Xilinx SDK does not automatically know about software drivers to custom peripherals in your XPS project. You have to explicitly tell the SDK where to find your hardware project. This is a step you have to do with '''every''' new SDK workspace. In this exercise, we do not have any custom peripherals, but it is still a good habit to get into.Click on the "Xilinx Tools" menu item and select "Repositories." Here, you want to ensure two things:111 1. Rather strangely, the Xilinx SDK does not automatically know about software drivers to custom peripherals in your XPS project. You have to explicitly tell the SDK where to find your hardware project. This is a step you have to do with '''every''' new SDK workspace. Click on the "Xilinx Tools" menu item and select "Repositories." Here, you want to ensure two things: 112 112 * In Local Repositories, you want to point the SDK to the folder that contains the XPS project system.xmp file. Click on "New..." and navigate to and select this folder. 113 113 * In Global Repositories, you want the SDK to point to the edk_user_repository folder on your hard drive. Unlike the local repositories, the SDK does remember this setting across workspaces. You'll only need to manually add the edk_user_repository the first time you run the SDK. … … 129 129 == Testing the Design == 130 130 131 When you download the design and run the software, you should immediately see the LEDs and hexadecimal displays start blinking randomly since they are being driven by the LFSR that is in this code. 132 133 {{{ 134 #!html 135 <iframe width="640" height="360" src="http://www.youtube.com/embed/fh_Lobo74X0?rel=0" frameborder="0" allowfullscreen></iframe> 136 }}} 131 When you download the design and run the software, you should immediately see the LEDs displays start blinking randomly since they are being driven by the LFSR that is in this code. 137 132 138 133 When you press the "up" pushbotton of the top left of the board, you should see the User I/O LEDs and hexadecimal displays "pause" their current state. 139 140 [[Image(output.jpg)]]141 134 142 135 As you press the button, your serial terminal on your computer will also print out the current state of the captured output register from the custom core. … … 148 141 }}} 149 142 150 You can verify that the LEDs match the contents of the register. For example, in the earlier screenshot, the second green LED is illuminated and the last sequence of bits out of the PRNG captured value is "0 1 0 0." The first three red LEDs are illuminated and the first sequence of bits from the PRNG captured value register are "1 1 1 0."143 You can verify that the LEDs match the contents of the register. 151 144 152 145 == Discussion ==