Changes between Version 9 and Version 10 of Exercises/13_4/IntroToXPS/w2


Ignore:
Timestamp:
Dec 7, 2012, 4:02:57 PM (11 years ago)
Author:
chunter
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Exercises/13_4/IntroToXPS/w2

    v9 v10  
    3232* 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.
    3333
    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/SysgenExportPcore Exporting pcores from System Generator] exercise covers how this pcore was created.
     34You 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.
    3535
    3636
     
    91919. 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.
    9292
    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.
     9310. 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.
    9494
    9595[[Image(busconnection.png)]]
    9696
    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:
     9711. 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:
    9898
    9999[[Image(portconnection.png)]]
     
    1091091. 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."
    1101101. 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:
     1111. 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:
    112112 * 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.
    113113 * 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.
     
    129129== Testing the Design ==
    130130
    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 }}}
     131When 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.
    137132
    138133When 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)]]
    141134
    142135As 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.
     
    148141}}}
    149142
    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."
     143You can verify that the LEDs match the contents of the register.
    151144
    152145== Discussion ==