lab4-processor-design
lab4-processor-design
Introduction
Welcome to this lab! In this laboratory exercise, you will learn the fundamentals of processor
design. After finishing this lab, you should be able to
1. Construct a simple single-cycle processor that executes a real assembly program.
2. Explain how bit selection and instruction decoding works.
3. Explain the basic principles of the data path and the control unit.
Preparations
You must do the lab work in advance, except for the Surprise Assignment. The teachers will
examine your skills and knowledge at the lab session.
We recommend that you book a lab-session well in advance, and start preparing at least a week
before the session.
You can ask for help anytime before the lab session. There are several ways to get help; see the
course website for details and alternatives. We especially encourage you to post questions on KTH
social.
During the lab session, the teachers work with examination as well as offering help. Make sure to
state clearly that you want to ask questions, rather than being examined.
Sometimes, our teachers may have to refer help-seekers to other sources of information, so that
other students can be examined.
Software
In this lab, we use the the open source software Logisim. You can download and install the software
from http://cburch.com/logisim/. If you have not performed the LD-Lab, you need to learn the
basics of using this software before you do Lab 4.
To teach yourself how to use the Logisim tool, please go through Logisim's “Beginner's tutorial”.
You can find the tutorial in the documentation section on Logisim's webpages. Note that you need
to perform each of the steps by using the software, so that you really learn how to use the tool.
Examination
Examination is divided into three parts:
Part 1 – Assignments 1 and 2.
Part 2 – Assignments 3 and 4.
Part 3 – Assignments 5 and 6 (the surprise).
Examining one part takes between 5 to 15 minutes. Make sure to call the teacher immediately when
you are done with an assignment.
Please state clearly that you want to be examined, rather than getting help.
The teacher checks that your solution behaves correctly, and that your solution follows all coding
requirements and is easily readable.
The teacher will also ask questions, to check that your knowledge of the design and implementation
of your solution is deep, detailed, and complete. When you create your solution, do not forget to
make detailed notes. With these notes, you can quickly refresh your memory during examination, if
some particular detail has slipped your mind.
You must be able to answer all questions. In the unlikely case that some of your answers are
incorrect or incomplete, we follow a specific procedure for re-examination.
2. Enter the machine code for the two first instructions in the ROM memory (the two first addi
instructions). Before you add the instructions, right click on the component and select “Clear
contents”. After that you have added the instructions, the edit view should then look like
this:
2016-08-24: Added a requirement to Assignment 1: the Subtractor component must not be used.
2017-01-17: Added instructions on how to move machine code from MARS into Logisim.