Professional Documents
Culture Documents
The Processsor
The Processsor
▪ Compiler and instruction set architecture determine the instruction count required for a given program
▪ Determined by ISA and compiler
▪ Processor implementation determines both the clock cycle time and the number of clock cycles per instruction
▪ Determined by CPU hardware
▪ We will examine two MIPS implementations
▪ A simplified version
▪ A more realistic pipelined version
▪ Subset of core MIPS instruction set
▪ Integer arithmetic-logical instructions
▪ (ADD, SUB, AND,OR, and SLT (Set Less Than))
▪ Memory-reference instructions
▪ (load word (lw) and store word (sw))
▪ Branch instructions BEQ, and J (jump)
▪ The first two steps are identical:
▪ 1. Fetch the instruction
▪ 2. Read one or two registers
▪ For the load word instruction, we need to read only one register
10/6/2023 CSE105 - COMPUTER ORGANIZATION Dr. V.Venkatesh 1
An Overview of the Implementation
• MIPS instructions, include
– Integer
– Arithmetic-logical instructions,
– The memory-reference instructions,
– Branch instructions
• The first two steps are identical:
– Theprogram counter (PC) to the memory that contains the code and
fetch the instruction from that memory
– Read one or two registers, using fields of the instruction to select the registers to read
– Load word instruction, need to read only one register, but
most other instructions require that read two registers
• After these two steps, the actions required to complete the instruction depend on the instruction class
– The three instruction classes (memory-reference, arithmetic-logical, and branches)
– The actions are largely the same independent of exact instruction
▪ A branch instruction, may need to change the next instruction address based on the comparison
▪ Otherwise, the PC should be incremented by 4 to get the address of the next instruction