Term Project

horizontal rule

ece533 | doering | ece labs | ece | rhit

Home
Course Documents
Homework
Labs
Resources

System-on-Chip (SoC)

Overview

This term project will give you experience implementing a small-scale SoC (system-on-chip) using an embedded processor, ROM, UART, and custom hardware.

OPTIONAL: You may propose your own project, provided that it meets or exceeds the complexity of the project detailed on this page. Proposals will be due in class by Tuesday of Week 7.

Software

bullet

Xilinx ISE WebPACK FPGA implementation tools

bullet

Ken Chapman's PicoBlaze processor and UART transmit/receive modules at ftp://ftp.xilinx.com/pub/applications/xapp/xapp213.zip

bullet

Mediatronix pBlazeIDE integrated assembler and simulator for PicoBlaze at http://www.mediatronix.com/pBlazeIDE.htm

bullet

pBlazeIDE programming techniques ("for"-loop and "switch" structures) and subroutines ("ascii2num" and "num2ascii"): PLD Oasis > Tutorials/Documents > picoblaze_techniques.zip

bullet

Verilog ROM template for pBlazeIDE (used as part of process to convert your assembly language program into instruction ROM for the PicoBlaze processor); full instructions are included in the file header: PLD Oasis > Tutorials/Documents > ROM_template.zip

Equipment

bullet

D2SB/DIO4/SIO1 board combo or D2E/DIO1 board combo

bullet

Parallel port cable

bullet

Serial port cable

Documents

bullet

PicoBlaze 8-Bit Microcontroller for Virtex-E and Spartan-II/IIE Devices, Xilinx Application Note XAPP213, http://www.xilinx.com/bvdocs/appnotes/xapp213.pdf (includes datasheet, instruction set description, and assembler manual)

bullet

PicoBlaze homepage at Xilinx: http://www.xilinx.com/ipcenter/processor_central/picoblaze/member/ (you need a Xilinx account to get access to this page)

bullet

UART documentation: locate the PDF file in ftp://ftp.xilinx.com/pub/applications/xapp/xapp213.zip

bullet

pBlazeIDE documentation: http://www.mediatronix.com/pBlazeIDE.htm

bullet

Creating Verilog ROM module from pBlazeIDE assembler: see documentation in the file header of ROM_template.v at ROM_template.zip

System Concept

bullet

The overall system is a hardware device with a terminal-based user interface. The hardware device can be controlled and monitored entirely by typing commands into HyperTerminal (as opposed to using switches).

bullet

The “hardware device” is the counter from Lab C (possibly with small modifications).

bullet

The “user interface” is implemented by the UART (Lab 4) and the PicoBlaze processor (Lab 5).

bullet

You have flexibility in how you choose to interface the counter to the processor. However, my recommendation is to treat the overall system as three distinct parts: (1) the processor, (2) the counter from Lab C, and (3) interface registers between the processor and the counter (for example, the three slide switches used to set the count rate in Lab C would be converted to a 3-bit writable register for the PicoBlaze processor).

Hardware Device Specification

  1. The hardware device is the counter specified in Lab C (possibly with minor modifications).
  2. The 16-bit counter output will be displayed on the DIO4 (or DIO1) board.
  3. The eight discrete LEDs will display the status of the counter inputs (pause, count direction, increment/decrement value, and rate).

NOTE: The intent here is to recycle as much as possible of the Lab C work without making extensive changes.

User Interface Specification

  1. A “welcome message” will be displayed upon initial download to FPGA or asserting the master reset pushbutton
  2. A new prompt will be displayed at the conclusion of command execution and after the initial welcome message
  3. The prompt will be placed at the far left side of the screen and on a new line (this way previous commands and results will remain visible)
  4. The command set is defined in Table 1.
  5. The command must be executed immediately after the required number of characters has been entered, but not before then. For example, if the multi-character command to load the counter is typed, the counter should only change value after all four hexadecimal characters have been typed.
  6. All characters typed by the user must be echoed back to the terminal.
  7. UART baud rate is 38,400 bits/second
  8. “A” project only: Cause the terminal emulator to beep once (see ASCII code for “bell”) whenever the counter reaches zero, i.e., only the transition from a non-zero count to a zero count should cause the beep. The beep must sound immediately, even if the user is in the middle of typing a multi-character command.

Table 1: Command Set Specification 

Command

Meaning

Comments

c

Display current counter value on the terminal

Display as four hexadecimal characters. This is only a one-time display of the counter contents at the time the 'c' command is issued, not a continuously-updated display.

d

Set count direction to “down”

 

e Display design engineer's name on the terminal Display a message containing your name

in

Set increment value

n is an integer between 0 and 7 that sets the increment (or decrement) value

lhhhh

Load counter

hhhh is a 16-bit hexadecimal number (use upper case ‘A’ to ‘F’) to load into the counter

rn

Set counter rate

n is an integer between 0 and 7 that sets the frequency divider rate according to the behavior specified in Lab 3

p

Toggle the “pause” mode

Press ‘p’ to pause counting, press ‘p’ again to resume counting

u

Set count direction to “up”

 

 NOTE: Commands must be interpreted exactly as shown in Table 1. Specifically, make no attempt to wait for the “Enter” key to conclude a command entry or to accommodate any other form of “white space” (spaces and tabs) in the commands.

Project Grading

A cumulative approach to implementing the user-interface specifications will give you flexibility in how much time you wish to invest in the project and in how much challenge you seek:

bullet“C” project – implement commands d, e, i, r, p, and u
bullet“B” project – implement the full command set of Table 1
bullet“A” project – implement the full command set of Table 1 as well as the “beep” behavior of User Interface Specification #8.

Requirements

  1. Your design must conform to ALL of the Synthesis Design Rules, including the naming conventions at the bottom of the document (use at least the minimal format of r_, w_, p_, etc.).

Deliverables

  1. Register-level block diagram of the complete hardware system (including processor and program ROM)
  2. High-level flow chart of PicoBlaze assembly program
  3. Hardcopy of PicoBlaze assembly language program
  4. Hardcopy of all Verilog descriptions that you create
  5. Brief memo that describes:
     

    ·        A point in your design process where you consciously evaluated whether a particular specification was easier to implement in hardware or in software (the “hardware/software co-design” issue),

    ·        The two possible ways you could implement the specification,

    ·        What you decided to implement, and

    ·        How well it turned out

  6. Demonstration of your design to instructor and classmates during lab of Week 10

Tips and Info

General:

  1. Our version of ModelSim does not support mixed-HDL designs. Our version of NC-Sim DOES support mixed-HDL simulations, but you will probably need to do something  special with library setups to make this work (I have not attempted it yet).

  2. The program ROM should be generated directly from the pBlazeIDE assembler. See the documentation in ROM_template.zip.

Software:

  1. Refer to the pBlazeIDE documentation page (http://www.mediatronix.com/pBlazeIDE.htm, scroll to the bottom); take note of the "Directives," "Opcodes," and "Simulated I/O" links.

  2. Draft and refine a flowchart for your assembly language program before you do coding.

  3. Make subroutines for common activities, e.g., "getchar" and "putchar" for interacting with the UART. This really helps to simply the translation of the high-level flowchart into assembly language.

  4. See page 43 of the PicoBlaze app note (http://www.xilinx.com/bvdocs/appnotes/xapp213.pdf) for techniques to compare two values (the instruction set does not include an explicit "compare" operation)

  5. Thoroughly simulate and verify your assembly language program before getting too involved in the implementation phase.

Hardware:

  1. Draft and refine a register-level block diagram for your hardware before you do Verilog entry.

  2. You can save a considerable amount of typing if you collect all (or most) writable interface registers into a single 'always' block and use a 'case' statement for address decoding.

  3. Creating external "readable registers" and "writable registers" for the PicoBlaze does  not always require that you make a new physical register. For example, you need make the UART_Rx (receiver module) output available to the PicoBlaze as a "readable" device. Since the UART_Rx module already has the value stored in a FIFO, there is no reason to insert an additional register between the UART_Rx module and the MUX leading to the PicoBlaze data input port. Not only is the register a waste of resources, you can introduce unexpected timing problems into your design. As another example, the UART_Tx (transmitter module) needs to look like a "writable" device. The UART_Tx module effectively looks like a "data register" with its 8-bit data input and "write_buffer" serving as the clock enable. Again, there is no need to insert an additional register between the two.

 

horizontal rule

Home | Course Documents | Homework | Labs | Resources

 ECE533: Programmable Logic Systems Design (S 2004-05)
Department of Electrical and Computer Engineering
Rose-Hulman Institute of Technology


For questions or comments regarding this web contact:
Last updated: 03/10/05.