For this project, you will be building a small single-cycle CPU. Your CPU will be capable of running real programs (with conditionals, function calls, etc) and outputting numbers.

## Project overview

This architecture is an 8-bit architecture similar in scope and complexity to real CPUs from the 1970s and 1980s, although most CPUs then weren’t RISC like this 😉 (Maybe it’s more like the modern AVR microcontroller architecture.)

Breaking it up into pieces will make it much easier to build, test, and fix.

You also get partial credit for broken instructions, or for pieces of circuitry for an instruction that isn’t implemented.

Keep it open along side these details:

## Project Details

Click the link above for all the juicy implementation details.

## Logisim Hints

Ways to use Logisim more effectively, letting you work quicker.

## Test Programs

Assembled programs for you to load into your machine’s ROM to test it.

## Submission details

Your CPU can look any way you like, BUT IT MUST HAVE THE FOLLOWING THINGS ON ONE SCREEN IN THE MAIN CIRCUIT:

• The Program ROM component
• The Data RAM component
• The output display digits
• The halt LED
• The ONE clock component that will control the entire CPU

Kinda like this:

But with, like, wires and tunnels and a whole CPU hooked up to them.

You will submit a ZIP file named username_proj2.zip where username is your Pitt username. For example, I would name mine jfb42_proj2.zip. (See below for instructions on making a ZIP file.)

Do not put a folder in the zip file, just the files you are submitting. When we open the zip file, we should see the following:

• Your circuit file, named username.circ, like jfb42.circ.
• if you got fancy and used multiple circuit files, name the main one like that.
• A readme.txt file. DO NOT SUBMIT A README.DOCX. DO NOT SUBMIT A README.PDF. SUBMIT A PLAIN TEXT FILE. PLEASE. It should contain:
• Anything that does not work
• Any extra credit you did
• Anything else you think might help us grade your project more easily

Submit here as usual.

### Creating a ZIP file

1. In your file browser, select all the files you want to add to the ZIP file (the files listed above).
2. Right click on the files, and…
• Windows: do Send To > Compressed (zipped) folder. Then you can name it.
• macOS: do Compress n items. Then you can rename the Archive.zip file.
• Linux: haha who knows

The points break down as follows:

• [10 points]: Submission and style
• [90 points]: The CPU
• [40 points] for building the CPU components other than the control
• [5] Display/Halt LED
• [10] Register File
• [10] ALU + Carry
• [10] PC Controller
• [5] Interconnect
• [50 points] for implementing the control necessary for each instruction
• [4] Halting (halt)
• [4] Display (put)
• [6] Loading immediates (li)
• Up to here is a 64

• [6] Load/store (ld, st)
• [4] Basic ALU (add, sub, rsb, and, or, not, shl, shr)
• Up to here is a 74

• [4] Immediate ALU (adi, sbi, sli, sri)
• [6] Arbitrary-precision ALU (adc, sbc, rsc)
• Up to here is an 84

• [4] j, jr
• [4] jal
• [8] Conditional branches (bgz, blz, bnz, bez)