
CPRE 488X LAB01 Lab Conventions The following conventions are used throughout the labs: Location of additional information or tips. An important error or step that you should be aware of. A reference to a chapter in the book. Lab Overview In this lab you will be introduced to the hardware and tools you will be using the rest of the semester. We will put together a basic system and run some demonstrations on the development board. There is A LOT of information in this lab. Please stick with it, as most of this lab is a step-by-step walkthrough with lots of screenshots and pictures. We hope that you will use this lab as a reference for later labs if your forget some steps, since some processes involve quite a few. During the semester you will be keeping a “lab notebook,” writing down important information from each of the labs. You can feel free to keep your own notes in the notebook as well. Some of your lab notebook entries will be required and graded. For this lab, make a list of the errors you may encounter while using the board and log them in your lab notebook. This will be graded. Hardware We will be using a development board from Digilent, Inc and Xilinx called the XUP Virtex-II Development System. This board has a Virtex-II Pro series FPGA, which consists of reconfigurable FPGA “fabric” and two PowerPC firm-cores. The FPGA fabric can be configured to represent any desired digital logic at the low level. When you combine many of these small FPGA pieces together, you can build very complex hardware. The two PowerPC cores connect to the reconfigurable fabric and provide a 1 powerful processor capable of running at up to 300 MHz. There are also several “off- chip” devices, meaning they are not included in the FPGA chip itself, but on the board and connected to the FPGA. These include some DDR RAM, an RS232 (serial) port, an ethernet port, a VGA port, a Compact Flash reader/writer, and several other peripherals. We will use most of these during the course of the labs. A diagram taken from Digilent’s reference manual for the board is shown below. You can refer to Digilent’s website, http://www.digilentinc.com , to get the user manual and look at example designs. Power connector and on/off switch USB programmer connection Programming source selection User-programmable / general-purpose LEDs, DIP switches, and push buttons Highlighted on the picture are the power connector and on/off switch in the upper-left, the general-purpose DIP switches and LEDs in the bottom-center, the programming source selection DIP switches in lower-right, and the programming USB connector in the upper-right. These are the basic items that will be used during this lab. 2 Take a second now to make sure that the programming source selection DIP switches (the GREEN circle above) are set in the following way: the upper set of three DIP switches should be all UP, and the lower set of two DIP switches should be all DOWN, using the orientation given in the picture. You may have trouble getting the board to program if this is not done – specifically the DONE LED, located just to the right of the DIP switches, will not light. The DONE LED lights only when the board has been programmed with a valid programming bitstream. Software The software we will be using during the labs comes from several vendors, but our main tools will be Xilinx tools. The IDE for developing systems with Virtex-II Pro devices (FPGA devices having both FPGA fabric and PowerPC cores) is called Xilinx Platform Studio (XPS) . This program shows your projects at the component-level. Processor cores are used to run the software portions of your design, while FPGA hardware cores create the hardware portion of your design. When intermixed, we create a fully- functioning hardware/software system. Several other tools, like XMD and the software debugger (GDB) will be mentioned below for completeness but discussed in more detail when it becomes necessary. A standard use-case for the tool set is given below. 1) Choose the hardware cores you will be using and add them to your design. 2) Write the software portions of the system using XPS. 3) Synthesize and compile the hardware and software portions of your system, respectively. 4) Download the hardware bitstream to the development board. 5) Download the software to the development board (if necessary) using XMD. 6) Run software 7) If design is not correct, debug using GDB or ChipScope, and possibly revisit steps 1 or 2 XPS Base System Builder Open Xilinx® Platform Studio (XPS) . Select the Base System Builder Wizard. 3 Click OK . Browse to a project path that you will use for your labs. Currently you cannot work from a network drive in XPS. Therefore you will have to work from a local directory and then transfer your files before you leave the lab. Some of the projects can be fairly large (60- 90MB) so it is recommended that you use your university account space, (which will be mapped automatically if your university password and your engineering password is the same), or a personal USB drive. The directory you need use is: “C:\temp\<your_username>\<the_lab_or_project>\system.xmp ”. 1. The path cannot contain spaces! 2. It is important to make sure you put all your files in the C:\temp\<your username> directory while using them and DELETE them when finished for the day (save them to your U: or V: drives). This will prevent you from creating files that other users cannot delete. 3. It is important to specify the name your project as “system.xmp”, otherwise some filenames may not match the labs - especially the simulation we will be doing later in this lab. 4 Then check “ User Peripheral Repository search…” and Browse to the library directory for the XUP V2Pro board “ C:\EDK\xup_2vp30 ”. Click OK . 5 In Base System Builder, choose “ I would like to create a new design ”. Click Next . 6 Choose “ I would like to create a system for the following development board ”. Board Vendor: Xilinx® Board Name: XUP Virtex-II Pro Development System Board Revision: C Click Next . 7 Choose “ PowerPC ” for our processor design. Click Next . 8 For the next screen, we set the processor clock frequency, bus frequency, and JTAG interface. We’ll use the default settings. Click Next . 9 The next window allows you to specify which hardware you will be using on the board. For future designs using base system builder you will want to decide all of the hardware you will need beforehand and add them using this screen. Everything added with these screens can be added manually later in the design, but it is much easier to specify the peripherals now. For this system we will be using: o RS232 UART at 9600 baud (** Don’t forget this!) o LEDs (4-bits because there are 4 user-programmable LEDs on the board) o Push Buttons (5-bits for up, down, left, right, and enter) o DDR RAM (256 MB) Select hardware to match the following screens: 10 11 12 Choose the amount of BRAM (Block RAM) you will be using in your design. This is a limited amount of very fast memory which is built into the FPGA (on-chip). For most of your systems this BRAM is not large enough to hold the actual program (max size is 128 kB), but instead it is used to boot the PowerPC processor and direct it to start executing the program stored in the DDR RAM. At least one BRAM is required by all designs using a PowerPC processor. Set the size of the included BRAM on the next screen to 64 kB. 13 In the next screen we set the device which will act as STDIN and STDOUT, the two standard interfaces in C/C++ to which all printf() commands write. We will also let Base System Builder generate a sample application. If you do not correctly associate STDIN and STDOUT with a device, you will receive errors when compiling code using printf() statements or any other statement which attempts to write or read from the input or output. This can be changed later from the “Software Settings Base System Builder will provide some test code for you if you want, however we will not be using this feature for our introductory lab. If your system is not working and you think that bad hardware is to blame, you can run the “golden configuration” which is built into each Digilent board. Set the two lower Programming Source DIP switches to the UP position, connect to the serial port using TeraTerm (described later in this lab) at 9600 baud, and reset the power on the board to run the golden configuration. 14 The next screen allows you to review the system being built. Click Generate . 15 Once finished, you should get the “Congratulations” screen. Click Finish to load the generated project into XPS. 16 Select “ Start Using Platform Studio ”. Click OK . 17 Now, you should have the system design loaded. Along the left side is a tree-list of your system. Each entry is a hardware element that is included in your design. We will learn how to add hardware cores in a later lab. On the left side of the screen Presentation Area - Source Code - System Information System HW and Application SW tabs Output - Compilation/Synthesis results - Project information For now, click the “ Applications ” tab (in RED ) to switch to the applications view.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages41 Page
-
File Size-