Project 1 Multicycle RISC IITB
Project 1 Multicycle RISC IITB
Course Project
Design a multi-cycle processor, IITB-Proc, whose instruction set architecture is provided. Use
VHDL as HDL to implement. IITB-Proc is a 16-bit very simple computer developed for the
teaching purpose. The IITB-Proc is an 8-register, 16-bit computer system. It should use point-to-
point communication infrastructure.
Submission deadlines:
April 18 (Thursday):
May 4 (Saturday):
VHDL code of the controller-FSM. Integration with the datapath along with the test
bench .
May 6 (Monday):
IITB-Proc is a 16-bit very simple computer developed for the teaching that is based on the Little
Computer Architecture. The IITB-Proc is an 8-register, 16-bit computer system. It has 8 general-purpose
registers (R0 to R7). PC points to the next instruction. All addresses are short word addresses (i.e.
address 0 corresponds to the first two bytes of main memory, address 1 corresponds to the second two
bytes of main memory, etc.). This architecture uses condition code register which has two flags Carry
flag (c) and Zero flag (z). The IITB-Proc is very simple, but it is general enough to solve complex problems.
The architecture allows predicated instruction execution and multiple load and store execution. There
are three machine-code instruction formats (R, I, and J type) and a total of 14 instructions. They are
illustrated in the figure below.
Opcode Register A (RA) Register B (RB) Register C (RC) Unused Condition (CZ)
ADD: 00_00 RA RB RC 0 00
ADC: 00_00 RA RB RC 0 10
ADZ: 00_00 RA RB RC 0 01
NDU: 00_10 RA RB RC 0 00
NDC: 00_10 RA RB RC 0 10
NDZ: 00_10 RA RB RC 0 01
LA: 01_10 RA
SA: 01_11 RA
RA: Register A
RB: Register B
RC: Register C
Instruction Description
ADD ADD (R) add rc, ra, rb Add content of regB to regA and store result in
regC.
ADC Add if carry set adc rc, ra, rb Add content of regB to regA and store result in
regC, if carry flag is set.
(R)
It modifies C & Z flags
ADZ Add if zero set adz rc, ra, rb Add content of regB to regA and store result in
regC, if zero flag is set.
(R)
It modifies C & Z flags
ADI Add immediate adi rb, ra, imm6 Add content of regA with Imm (sign extended)
and store result in regB.
(I)
It modifies C and Z flags
NDU Nand ndu rc, ra, rb NAND the content of regB to regA and store
result in regC.
(R)
It modifies Z flag
NDC Nand if carry set ndc rc, ra, rb NAND the content of regB to regA and store
result in regC if carry flag is set.
(R)
It modifies Z flag
NDZ Nand if zero set ndc rc, ra, rb NAND the content of regB to regA and store
result in regC if zero flag is set. It modifies Z flag
(R)
LHI Load higher lhi ra, Imm Place 9 bits immediate into most significant 9 bits
immediate (J) of register A (RA) and lower 7 bits are assigned to
zero.
LW Load lw ra, rb, Imm Load value from memory into reg A. Memory
address is computed by adding immediate 6 bits
(I) with content of reg B.
It modifies flag Z.
SW Store sw ra, rb, Imm Store value from reg A into memory. Memory
address is formed by adding immediate 6 bits
(I)
with content of red B.
BEQ Branch on Equality beq ra, rb, Imm If content of reg A and regB are the same, branch
to PC+Imm, where PC is the address of beq
(I)
instruction
JAL Jump and Link jalr ra, Imm Branch to the address PC+ Imm.
JLR Jump and Link to jalr ra, rb Branch to the address in regB.
Register
Store PC into regA, where PC is the address of
(I) the jalr instruction