Project 2: Processor Design - Abridged Notes

CS61C Spring 2015

Due Sunday, March 24th, 2015 at 11:59 PM

TAs in charge: Fred Hong and William Huang

Full project specs can be found here.

Project Requirements

Key Differences From MIPS

  1. Memory is addressed every 32 bits, or a WORD in our 32-bit architecture. That means each location in memory holds a 32-bit value, unlike MIPS where each location holds 8 bits.
  2. RAM and ROM modules in Logisim are addressed with 24-bits, which means that there will be some loss of information when converting from the 32-bit addresses used in MIPS instructions. That is okay, but make sure you know what is being byte- or word-addressed.
  3. Be very careful when dealing with absolute addresses, whether it's for jumping or for accessing data memory. The instructions you will be running will assume that their addresses begin at standard locations, such as the default memory configuration in MARS. That is, .text begins at 0x00400000 and .data begins at 0x10010000, both of which are byte-addressed. In your processor, however, both instruction and data memory start at 0x000000.
  4. You will only implement 4 registers, instead of all 32. This means you have to route register requests to either run.circ or regfile.circ, depending on which registers are being accessed.
  5. Data Memory and Instruction Memory are physically separate. Remember that in MIPS, we create the illusion of separate memory with two caches, but we really have only one memory.
  6. Branch delay slots are not exposed to software. You have to deal with them in hardware.
  7. jr is not an R-type instruction. This is because if it was R-type, not all R-types would map directly to an ALU operation. This is purely for your benefit.
  8. There are two new R-type instructions for you to implement, bitpal and lfsr.

Project Tips

Possible Plan of Attack

These steps are provided just to help you get started if the project spec seems daunting/overwhelming. This is simply a suggested approach, so do what makes the most sense to you. For example, some of you may want to design the control before the datapath. Also, throughout this process, test liberally with the sample autograder tests and ones that you make yourselves.

  1. Take the time to look at some of the Logisim help files: Help --> Library Reference. Knowing how to read these references will help a lot when you start trying to use modules you didn't encounter in homework or lab.
  2. Build the Register File. Test it thoroughly by varying the inputs to make sure it properly reads and stores when enabled.
  3. Design and build your ALU. Again, test it thoroughly using a variety of inputs.
  4. Review your understanding of addressing, ie byte- vs word-, how instructions encode addressing information, where the data is located in memory as a whole. Addressing can become a major hurdle in this project if you don't understand it well.
  5. Build your Data Memory circuit following Section 5 of the Deliverables in the project spec. Make sure you understand how to read and write from this memory.
  6. Open up cpu.circ and look at the layout. Think about any other components you will need for a single-cycle datapath. Build these, and then lay out everything. Wire these components together so that this datapath can execute every instruction our ISA supports. Be sure to identify any control signals you will need to generate.
  7. Design your control (the combinational logic for all of your control signals). The recommended method is the AND logic/OR logic breakdown. Connect the control to the datapath.
  8. Test I- and R-format instructions individually (including loads and stores).
  9. Convert your single-cycle implementation to a two-cycle datapath.
  10. Test branching and jumping instructions individually and then try whole programs.
  11. Finish writing the test programs in section 6 of deliverables. These will be released with proj2-2.
  12. Submit your processor and programs.
  13. Rejoice! ... and then sleep.

Back to full project specs.