A RISC Processor with a 5 stage pipeline and 32-bit instruction set.
- Circuit Manual
- Encoding Scheme
- Assembler Manual
- Five Stage Architecture Explained
- Control Signals and Control Unit
This repository is created by Kaushik Dey (20CS01043, IIT Bhubaneswar) as a submission for the Assignment 4 (Mini Project) of Computer Organization and Architecture Lab Course in Autumn of 2022
- python (version 3.6 or above)
- logisim (original, avoid logisim evolution)
- Open up the circuit in
/circuits/riscv.circ
in logisim - Refer to Assembler Manual and write your assembly code.
- Assemble your code using the script at
/assembler/main.py
- Go to
MAIN
section in circuit and right click on the memory and load the code into the circuit. - Run the code by executing the clock (
Ctrl+T
repeatedly)
The assembler can be found at assembler/main.py
The instuction set needed to define for the processor are
MOV RA RB
: Content of RB is transferred to RAMVI RA Im
: The Immediate value Im is stored in RALOAD RA RB X
: The content of the memory location [[RB]+X] is loaded into RA, where X is a 16bit unsigned immediate valueSTORE RA RB X
: The content of register RA is stored in memory location [[RB]+X] where X is again, a 16bit unsigned immediate valueADD RA RB RC
: RA = RB + RCADI RA RB Im
: RA = RB + Im, where Im is a 32-bit unsigned extended immediate valueSUB RA RB RC
: RA = RB - RCSUI RA RB Im
: RA = RB - Im, where Im is a 32-bit unsigned extended immediate valueAND RA RB RC
: RA = RB AND RCANI RA RB IM
: RA = RB AND Im, where Im is a 32-bit unsigned extended immediate valueOR RA RB RC
: RA = RB OR RCORI RA RB IM
: RA = RB OR Im, where Im is a 32-bit unsigned extended immediate valueHLT
- A readme file (this).
- The Logisim circuit files. (go to the circuits folder )
- Block level diagram of the implementation. (go to the circuit manual )
- 5 stage architecture overview (go to the Pipeline Overview)
- Assembler Manual (go to the Assembler Manual)
- Encoding Scheme (go to the Encoding Scheme)
- Programs start from memory address 0
- Atleast 4 GPRs should be included
- All registers are 32bit
- Control Unit should be designed using hardwired control mechanism.
- Memory should have enough space to store 32 instructions and 32 data.
- Provide a reset signal that sets the value of PC to 0