Processors I - PowerPoint PPT Presentation

1 / 8
About This Presentation
Title:

Processors I

Description:

The Datapath contains a special Register called the Program ... andi Rt ) Rso imm Opcode = 12. ori Rt ) Rsn imm Opcode = 13. xori Rt ) Rs4 imm Opcode = 14. ... – PowerPoint PPT presentation

Number of Views:61
Avg rating:3.0/5.0
Slides: 9
Provided by: lakshm1
Category:
Tags: andi | processors

less

Transcript and Presenter's Notes

Title: Processors I


1
Processors I
  • Lecture 20

2
The MicroMips Instruction Set
The MicroMips Instructions Set contains 22
instructions. 7 - R-Format ALU
Instructions 6 - I-Format ALU Instructions 2 - I
-Format Memory Access Instructions 3 - I-Format
Conditional Branch Instructions 4 - Unconditional
Jump Instructions
Each Machine Instruction is a 32-bit word coded
in 1 of 3 formats.
3
The Instruction Cycle
The Datapath contains a special Register called
the Program Counter, PC. This register holds a
32-bit value that represents the address of a
location in the Instruction Memory Unit. ( the
Last 2-bits are always 0 because Instructions
must be word aligned )
The value inside the PC is used to calculate a
new value for the PC each cycle. The new value
represents the location of the instruction to be
processed in the next cycle. The new value will
be PC ) PC 4, for all instructions except
Branch and Jump Instructions
4
The R-Format ALU Instructions
add Rd ) Rs Rt Opcode 0, OpcodeExt
32. sub Rd ) Rs- Rt Opcode 0, OpcodeExt
34. slt Rd ) 1 if Rs lt Rt Opcode 0, OpcodeExt
42. and Rd ) Rso Rt Opcode 0, OpcodeExt
36. or Rd ) Rsn Rt Opcode 0, OpcodeExt
37. xor Rd ) Rs4 Rt Opcode 0, OpcodeExt
38. nor Rd ) not (Rsn Rt ) Opcode 0,
OpcodeExt 39.
5
The I-Format ALU Instructions
addi Rt ) Rs imm Opcode 8. slti Rt ) 1 if
Rs lt imm Opcode 10. set less than andi Rt )
Rso imm Opcode 12. ori Rt ) Rsn imm Opcode
13. xori Rt ) Rs4 imm Opcode 14. lui Rt )
(imm,0x0000) Opcode 15. load upper
6
ALU Source Register Destination MUXs
7
The I-Format Memory Access Instructions
There are only 2 instructions that allow access
to the Data Memory Unit. lw Rt ) mem( Rs imm )
Opcode 35 sw mem( Rs imm ) ) Rt Opcode
43
8
The Jump Instructions
The are 4 unconditional Jump instructions. j PC
) ( PC31,28, jta, 00 ) jal PC ) (PC31,28,
jta, 00 ), 31 ) PC 4 jr PC ) (
Rs31,2, 00 ) SysCall PC ) SysCallAddr jr
and syscall are R-Format Instructions, j and jal
are J-Format Instructions.
Write a Comment
User Comments (0)
About PowerShow.com