Retro prof in the lab University of Washington Computer Science & Engineering
 CSE 378 Spring 2006
  CSE Home   About Us    Search    Contact Info 

 Lab 2: Pipelined MIPS

Description
In this lab, you will build on the single cycle processor that you have designed and make it a 5-stage pipelined processor. We will be following the standard MIPS pipeline implementation, meaning that the processor will have IF, ID, EX, MEM, and WB stages.

In addition to upgrading the processor to a pipelined design, you will no longer be using a ROM to hold your programs on hardware. A new memory system has been designed and will be provided to you so that you can download your programs via the serial cable. This new system will also allow you to control the LEDs and the VGA output, which will be important if you are choosing to go with 378-HW.

Software Stage (Both 378 and 378-HW)
You will have to design a working 5-stage pipelined processor in ActiveHDL, and will write a program that echoes serial input from the serial port back to the machine which sends it. For purposes of simulation, we will provide a simulated serial input and simulated serial output that will allow you to see if your code is working.

Hardware Stage (378-HW only)
You will be implementing your design on the board, and will be using the actual serial interface to download your programs to the board. For this assignment, you will write a program in C/C++ and use a compiler to get the assembly version of your program to send to the board.

The program that you write will be a basic game. You will be able to map buttons to locations in memory and access them to work with your processor. Also, you will be using a VGA module for output to show what is going on in your game.

Design Constraints
We will be sticking to the following constraints to make the lab as straightforward as possible: New Components
There are four new components that you will be given for this lab: Compiling your code
Using the C Compiler

Useful Files
CSE378 BIOS Source
CSE378 Bootloader Software
Top level board design - Just insert your processor into the design and connect the ports.
Waveform for top-level design -  Waveform that uses InfoGen component. (Use with these aliases)
Updated lib378 information - Note that the new components that you need are in the library.
UCF File for Lab2(board.ucf) - Use this as your ucf file during implementation
Test Files
Test Fixture
Source File for Test Fixture

This test fixtures tries to exercise all of the various facets of your processor. Unzip into your src directory and add your processor component to regression.bde. It assumes that your are using conservative forwarding practices.

Serial Test Fixture

This is a test fixture that substitutes the serial component for a serial component with a fake FIFO that simulates the input from the serial port. Plug your processor into this and you will be able to see what effects your programs have on the processor. The file includes a test file that should make the lights blink, and you can write your own test files and point to them by editing the parameters on the test fixture. To write your own test .hex file, get the hex version of your program/data, and generate a text file using the following format:

@00400000 - Translates to 010040000000 and means change the current address being pointed to to 0x00400000
01032010 - Translates to 0001032010 and means store the word 01032010 in the current address being pointed to
To end your program, add the line 0200000000. This will cause the bootloader to jump to 0x00400000 and start execution.

Example program (Do NOT include the parentheses when you write a program, they will not be parsed correctly):

0100400000 (Tells BIOS to start storing data at 0x00400000 - so, these are instructions)
(Your program starts below this note, which will not be in the file)
003c098000
0035290040
00200a0000
00200c000f
003c0b0040
00ad2c0000
00214a0001
00154bfffe
0000000000
00200a0000
00200c0000
003c0b0040
00ad2c0000
00214a0001
00154bfffe
0000000000
0008100002
0000000000
(End of program)
0200000000 (End BIOS mode, jump to program start)

The source for this program is included as blink.s in the test fixture. If you choose to use your own hex file, be sure to modify the parameters for the serial_tf component to know where the new file is located.

To use the test fixture, plug your processor into the top level test fixture design provided with board_tf.bde. Then, stimulate the SYSTEM_CLOCK input with a 100Mhz clock, and use formula stimulators for the reset signals. Set SW0 to the formula "0 0ns, 1 40ns", and SW3 to "0 0ns, 1 160ns". Now, start your simulation like normal and you should be able to boot into the BIOS and load the file into your IRAM for execution.

Due Dates
Progress Reports - Friday, May 5th
Software - Saturday, May 13th
Hardware - Tuesday, May 16th

Turn-in
For the software part of the lab, use ActiveHDL's "Archive Design" command and submit the resulting archive via turnin. Turnin is now available on attu.


CSE logo Computer Science & Engineering
University of Washington
Box 352350
Seattle, WA  98195-2350
(206) 543-1695 voice, (206) 543-2969 FAX
[comments to Shen]