You are here
Laboratory 2
In laboratory 2 you will design a system-on-chip which includes one Microblaze soft-processor and several General Purpose I/O peripherals (GPIOs). Just like laboratory 1, the system-on-chip will be created using the Base System Builder supplied by the Xilinx tool suite. Once your system-on-chip has been created, you will write a custom software application to take input from the push button and produce output on the LEDs. In order to complete this laboratory successfully, you will need to understand the workings of the GPIO peripheral by reading the GPIO reference manual which can be found in the references section.
Project Assignment
- Create a system-on-chip design which includes only the following components:
- A Microblaze soft-processor
- A serial port for debug output
- A GPIO for the LEDs
- A GPIO for the Push Buttons
- Create a new software application which performs the following:
- When the left push button is depressed the left most LED is lit
- When the top push button is depressed the second from the left LED is lit
- When the bottom push button is depressed the second from the right LED is lit
- When the right push button is depressed the right most LED is lit
- When the center push button is depressed all LEDs are lit
- Synthesize your system-on-chip, compile your software project, and combine them into a bitstream
- Download your bitstream onto the XUP development board, execute it, and demonstrate your design to your TA
This project will be a due during the week of September 8, 2008 through September 12, 2008. Please allocate enough time outside of class to read and understand the project and the workings of the GPIO.
Project Directions
Before proceeding with this laboratory please read at least the OPB GPIO Registers and OPB GPIO Operation sections of the GPIO reference manual. In future labs is will be your responsibility to implement application software to control an FPGA peripheral. In this lab you will be expected to understand how the provided software application implements the operational specification provided by the reference manual.
Click to Play
Click to Play
For this laboratory you will be creating a system-on-chip design, containing the peripherals mentioned above, using the BSB as described in laboratory 1. Once you have the system-on-chip design created you will need to create a new software application named "lab2" which contains one source code file named "lab2.c". After this, copy and paste the source code template into your source file.
Read the comments in the source code template and try to understand how the source code provided implements the GPIO hardware protocol described in the GPIO reference manual. Once you understand what the source code template is doing, modify the main function to implement the project requirements described in the project assignment given above.
Project Questions
Answers to the questions for this laboratory can be found in either the Memory-Mapped I/O Tutorial or the GPIO reference manual.
- What register set is exposed by the GPIO peripheral? Describe each register.
- What is an address space?
- What is memory-mapped I/O?
- How does a processor perform memory-mapped I/O?
- How does software perform memory-mapped I/O?
- What steps does software need to perform in order to read from the GPIO data register? Explain each step.
