Lab Projects

In order to earn a grade above B+ for the first and second lab self-assessments, you’ll need to complete a mini-project for each self-assessment. Mini-projects are individual, although you can get help from tutors or instructors. You should not get help from classmates with your mini-project.

Each mini-project should take ~2-4 hours, and if you finish some labs early, it may be possible to complete one entirely using spare lab time, although this is not the expectation. If you find yourself spending more than 5 hours on your mini-project, you should stop and check in with your lab instructor.

The primary goal for the mini-project is to learn and understand more, NOT necessarily to complete a working prototype (although that’s a secondary goal).

For each mini-project, you’ll check in with your instructor during lab to propose a project, and then again to demonstrate it when you’ve completed it. These check-ins need to happen during lab so that they can be interactive conversations, although let your instructor know if you need an exception to this rule.

In theory, any project that relates to the course material and has an appropriate scope is allowed, but we offer some examples below to help you design your project, and you are free to pick one of the example ideas instead of generating your own (except the ones with a pre-worked solution).

Assessment

When you have completed your project and demo it during lab, that conversation will include discussion of your implementation choices, your progress if you weren’t able to put together a complete demo, and your understanding of and ability to explain how your project works. If everything is working, we might also discuss potential next steps. You’ll also be expected to explain something that the project helped you learn or understand better. Your instructor will then recommend a grade (A-, A, or A+) based on the learning, effort, and/or understanding you demonstrated. You can negotiate that grade to determine your unit 1 grade. You should still fill out the self-assessment form. If you don’t do a project, you’ll just fill out the self-assessment form to assign yourself a grade.

Unit 1

Proposals are accepted in labs 2, 3, 4, and 5 (Data as Bits through Processor Datapath). Completed projects may be demonstrated at any point up through the end of lab 7 (completing them before the first exam will be most useful to you).

Example project ideas here are listed by which lab you might propose them in. Some of these are more complex than others and might take more time. You might have to study ahead a bit for some of the advanced options:

  1. (Lab 2+) Build a moderately-complex digital circuit for a common device such as an elevator, traffic light, or car gear shifter. This can be done in simulation or with actual electronics on a mini-board (these need to stay in the lab room and must be individually checked out). Your proposal should specify:
    • What are the inputs to the circuit? How are you going to translate real-world things like button presses or pedal force into digital signals (you can assume such translations happen outside the circuit you build, and you don’t need to worry about how they work). For example, maybe a car shifter circuit assumes that accelerator and break pedal forces have been converted into unsigned 4-bit binary values.
    • What are the outputs of your circuit? If necessary, how will they be translated from digital signals into something else. For example, maybe a car shifter circuit assumes that an 4-bit binary output can be treated as an 4-bit signed two’s-complement number, then divided by 7 to get a number between +1 and -8/7, and then that will drive the motor either forwards (+1 = full force) or backwards (-1 or lower = full reverse). In this case again you just build the circuit to produce the 4-bit number, and assume the translation circuitry can be built by someone who has studied analog circuits.
    • Roughly, what kind of dynamics do you want the circuit to have? Summarize how it will respond to different inputs. For example, for a car transmission, you might include park, neutral, forward, and reverse options, and say something like: “If you’re braking, the car will slow down (via a brake strength signal), and when not breaking and in either forward or reverse, the car will drive the motor in the appropriate direction when the accelerator pedal is used.” Or for traffic lights: “When the lights in one direction are green, those in the other direction will be red. A timer will switch between greens for both directions giving equal time to each. Before a light turns from green to red, it will briefly turn yellow.”
  2. (Lab 4+) Add a new operator to the simulated 4-bit ALU in the lab 4 circuits file. Some operators might be too simple; pick something that doesn’t just require modification of the 1-bit ALU, like a shift operator, bang (!), or absolute value. Your proposal should specify:
    • What operator you want to add.
    • Your idea about what change(s) will be necessary to the 4-bit ALU, and why a change to the 1-bit ALU can’t achieve what you want.
    • At least 3 example test cases showing inputs & correct outputs for your operator.
  3. (Lab 5) Add a new instruction to the full CPU circuit from the lab 5 circuits file. This would be challenging but would definitely maximize your understanding of the CPU circuit. For example, you might add “conditional add” (add R2 to R1, storing in R1, only if R3 != 0) or “overwrite instruction” (stores register value into instruction memory). Make sure your change modifies the CPU circuit somehow instead of just adding an operation to the ALU (in that case, focus on the ALU alone and don’t worry about the full CPU circuit). Your proposal should specify:
    • What your new instruction will do, and what its opcode will be.
    • An idea of what change(s) will be necessary to the CPU circuit.
    • At least two programs that use the new operator along with expected results, which you can use later to test its correctness.
    • Note: Since the CPU circuit does not implement the JUMP instruction, your example programs shouldn’t use it.
  4. (Lab 5) Write a short program using the HW ISA that uses one or more loops and a “sub-routine” (part of the program that accomplishes some simpler task like multiplication) to compute some interesting value. For example, develop a multiply subroutine and then use it to write a factorial program. Your proposal should specify:
    • What subroutine you plan to use.
    • What value your program will compute.
    • What registers the “inputs” are going to be in and what registers the output will be in when the program ends.
    • At least 3 input/output example pairs to be used to test the program when it’s done.

Unit 2

Details on mini-projects for unit 2 will be added later.