COA Module2
COA Module2
Soumya Majumdar
Instruction Set Architecture
● Part of the abstract model of a computer that defines how the CPU is controlled by the software
● ISA acts as an interface between hardware and software, specifying both what the processor is
capable of doing as well as how it gets done
● Only way that you can talk to your machine is through the ISA
● Suppose we have a high-level program written in C which is independent of the architecture on
which we want to work- has to be translated into an assembly language program which is
specific to a particular architecture- consists of a number of instructions like LOAD, STORE,
ADD, etc.
● All these instructions are part of the instruction set architecture of the MIPS architecture
●
Instruction Set Architecture
● One of small set of data holding places that are part of the computer processor
● A register may hold an instruction, a storage address, or any kind of data (such as a bit sequence
or individual characters)
● Some instructions specify registers as part of the instruction. e.g.- an instruction may specify
that the contents of two defined registers be added together and then placed in a specified
register
● Processor typically contains multiple index registers, also known as address registers or registers
of modification. Effective address of any entity in a computer includes the base, index, and
relative addresses, all of which are stored in the index register.
● A shift register is another type of CPU register. Bits enter the shift register at one end and
emerge from the other end. Flip flops, also known as bistable gates, store and process the data.
Instruction format
● Zero-address instruction
CMA
CME
● One-address instruction
ADD 06H
LOAD 20H
● Two-address instruction
MOV R1, R2
ADD R1, R2
● Three-address instruction
● Data can either be stored in the memory of a computer or it can be located in the register of the
CPU
● Operation code gives instructions to the processor to perform the specific Operation
● Operand is the part of the instruction format that specifies the data or the address of the data
● Depending upon the processor of the computer the instruction format contains zero to three
operands
Instruction Set
● An instruction set is a group of commands for a central processing unit (CPU) in machine
language.
● All CPUs have instruction sets that enable commands directing CPU to switch the relevant
transistors.
● The instructions tell the CPU to perform tasks.
● Example of instruction: read, write, move
● The instructions are made up of a specific number of bits. For example: CPU's instructions
might be 8 bits, where first 4 bits make up operation code that tells computer what to do, next 4
bits are operand, which tells computer the data that should be used.
●
Basic Instruction Cycle
Types of Instruction Set
● Reduced instruction set computer (RISC)
● Minimal instruction set computers (MISC)
● Complex instruction set computer (CISC)
● Explicitly parallel instruction computing (EPIC)
● Very long instruction word (VLIW)
● Zero instruction set computer (ZISC)
● One instruction set computer (OISC)
RISC
● RISC (reduced instruction set computer) is a microprocessor that is designed to perform a
smaller number of types of computer instructions so that it can operate at a higher speed
(perform more millions of instructions per second, or MIPS).
● Reduced Instruction Set Computer Central Processing Units (RISC CPUs) was designed to
execute one instruction per cycle, five stages in total. Those stages are, Fetch, Decode, Execute,
Memory, and Write.
● Fetch: In the Fetch stage, instruction is being fetched from the memory.
● Decode: During the Decode stage, we decode the instruction and fetch the source operands
● Execute: During the execute stage, the computer performs the operation specified by the
instruction
● Memory: If there is any data that needs to be accessed, it is done in the memory stage
● Write: If we need to store the result in the destination location, it is done during the writeback
stage,
RISC Pipeline
CISC