A collection of the projects done under the computer architecture course of undergrad.
- Logisim(2.7.1), download EXE (Requires JRE 1.5.0) or JAR (Works for JRE >= 1.5.0). Open .circ files using this.
- Atmel Studio 7.0 . Download link
- Proteus Version 8.15. Download link. Open .pdsprj files using this.
- Extreme burner. Download link. For burning hex files into atmega32 for hardware simulation
The originally downloaded 7400-lib.circ had a bug related to the IC-7483. The
- Arithmetic Logic Unit : ALU
- Floating Point Adder : FPA
- Microprocessor without Interlocked Pipelined Stages : MIPS
Folder | ALU | FPA | MIPS |
---|---|---|---|
Specification | .. | .. | .. |
Report | .. | .. | .. |
Logisim Circuit | .. | .. | .. |
- Circuit Design
- Software Simulation
- Usefool Tools
- Wire Counter
- Tester (Credit to aaniksahaa for this amazing tester, I modified it to support file output)
- ICs and symbols used
The original circuit had a bug which were fixed using this file.
Also for the intuitions behind the design check optimization
-
Wire Counter calculates the number of wires used in a .circ file.
- Make sure that your.circ file(whose wire is to be counted) and the wireCount.py are in the same directory.
- Replace the file_path with the name of
your.circ
and run the .py. - An estimate will be given.
-
Tester checks whether the truth table generated from the ALU.circ is correct or not.
- Open the circuit in Logisim
- Go to the
Project
tab and clickAnalyze Circuit
- A warning dialog box may appear, click
OK
- The truth table is shown.
- Press
Ctrl
+A
. Copy. - Paste the output here in
truth_table.txt
- Most importantly, in the code, change the check_row function's following fragment as per your specifications.
if(control == 0): Y = A + 2**n_bits - 1 if(control == 1): Y = A + 2**n_bits - B - 1 if(control == 2): Y = A + 2**n_bits - 1 if(control == 3): Y = 2**n_bits - A // negation if(control == 4): Y = A + 2**n_bits - B if(control == 5): Y = A & B if(control == 6): Y = A ^ B if(control == 7): Y = A ^ B
- Run
check_ALU.py
- For the entire report, check the generated
report.txt
.
The followed naming convention:
Control bits = cs0, cs1, cs2 A = A0, A1 etc B = B0, B1 etc S = S0, S1 etc Cout = Cout C, V, S and Z are the status flags
Here is a list of ICs, symbols and their meanings used in the ALU.
- Go to the Compiler directory and open a .asm file with the desired mips assembly code.
- Run the asm_compiler.py.
python asm_compiler.py <input>.asm
- The following files will be formed.
intermediate.asm - Asm file with intermediate code for push and pop instructions.
log.txt - Log file for the resulting hex code of all instructions and any error if found.
instruction.hex - Hex code for instruction memory for logisim simulation.
atmega32_instruction.txt - Hex code for instruction memory for atmega32 simulations used in proteus and hardware design. - Proteus and hardware simulation
- Copy the
atmega32_instruction.txt
. - Open the main.c in atmel studio and navigate to the unsigned int instruction[256] array. This is the instruction memory of our mips. Paste the instructions copied as R.H.S of this array.
- Build the solution and a new hex file will be formed.
- For hardware simulation, burn this hex file into the atmega32 simulating the instruction memory using extreme burner.
- For proteus simulation, open the circuit using proteus. Go to the atmega32 with the name Instruction Memory and load the hex file formed into it.
- Clock is negative edge triggered. Execute next instruction via clock. Also, supports a reset switch for reseting program counter.
- Copy the
- Logisim simulation
- Open the circuit in logisim and follow the video to load the instruction.hex into intruction memory.
demo.vid.compressed.mp4