Project Title 16 Bit ISA Design
Project Title 16 Bit ISA Design
12/20
Project done by:
Iftakhar Al Shahriar
ID: 1722253642
Nishat Maharin Bushra
ID: 1912903642
Fazlay Rabbi
ID: 1921598642
Introduction:
Instruction set architecture (ISA) is an abstract model of computers. Our task is to design
and implement an assembler for 16-bit RISC type CPU.
Objective:
After converting a high level programming language into assembly language by a compiler, the
assembler takes the assembly language as input and convert into a binary instruction (machine
language) for hardware as 16 bit output.
Operands:
By following the design principle 1, we have used 3 type of operands in our design. They are
mainly register based.
Format
R-Type
Op rs rt rd
Code
I-Type
Op-Code rs rt Immediate
J-Type
Op-Code Target Address
4 bit 12bit
requires compromises. In our Structure we have chosen 3 formats. If we deal with constant (like
a = a + 4), we can’t deal with R-Type format. So we need an immediate type format. For
conditional statements, sometime we need to jump to a particular line or need to out of a loop.
In that case, we need J-Type Design principle 3 says, good design e format.
Registers
Register Number Name of the Usage Value Assigned
Registers (4 bit)
or 0011
nor 0100
xor 1110
I-Type Table
Instruction Type Instruction Op-Code
sw 0110
mul 1000
cant implement
Arithmetic addi 1001
ori 1011
sll 1100
srl 1101
J-Type Table
Instruction Type Instruction Op-Code
addi:
It can add direct value (constant) with a content of a source register.
Operation: $s0 = $t0 + immediate value
Syntax: addi $s0, $t0, 4
andi:
It does logic bit by bit and operation with a constant value and a content of a source register.
Operation: $s0 = $t0 & immediate value
Syntax: andi $s0, $t0, 4
ori:
It does logic bit by bit or operation with a constant value and content of a source register.
Operation: $s0 = $t0 || immediate value
Syntax: J, L
Limitations
Our operations are limited because of limited instruction size for the CPU. And users must
provide valid instructions in the correct manner in order to decode and execute instructions
and must strictly follow syntax rules. Each instruction is separated by a new line and the user
must follow spacing rules.
Conclusions
Applying our methodology in computer architecture courses allows students to understand how
each part of a modern computer works, how the parts interact, and how to synchronize the
different functional units. It also allows visualizing the relation of theoretical concepts with
physical devices.