Computer Architecture MIPS Instruction Set and Registers Lecture

  • Slides: 22
Download presentation
Computer Architecture MIPS Instruction Set and Registers Lecture 13 Digital Design and Computer Architecture

Computer Architecture MIPS Instruction Set and Registers Lecture 13 Digital Design and Computer Architecture Harris & Harris Morgan Kaufmann / Elsevier, 2007 1

Levels of Abstraction 2

Levels of Abstraction 2

Computer Architecture • Instructions – Way to command a computer • Instruction Set –

Computer Architecture • Instructions – Way to command a computer • Instruction Set – Group of instructions a computer understands • Operation – What to do • Operands – What to use 3

Instructions What do we want to command our computer to do? 4

Instructions What do we want to command our computer to do? 4

Design Principle 1 Simplicity favors regularity 5

Design Principle 1 Simplicity favors regularity 5

Design Principle 2 Make the common case fast 6

Design Principle 2 Make the common case fast 6

Operands Where does the computer get the operands? 7

Operands Where does the computer get the operands? 7

Operands: Registers 8

Operands: Registers 8

Design Principle 3 Smaller is Faster 9

Design Principle 3 Smaller is Faster 9

The Register Set Name Reg Usage $0 0 Const 0 $v 0 -$v 1

The Register Set Name Reg Usage $0 0 Const 0 $v 0 -$v 1 2 -3 Results & Expr. Eval. $a 0 -$a 3 4 -7 Procedure arguments $t 0 -$t 7 8 -15 Temporaries $s 0 -$s 7 16 -23 Saved variables $t 8 -$t 9 24 -25 More Temporaries $gp 28 Global Pointer $sp 29 Stack Pointer $fp 30 Frame Pointer $ra 31 Return address 10

Operands: Memory 11

Operands: Memory 11

Operands: Memory 12

Operands: Memory 12

Design Principle 4 Good design demands good compromises 13

Design Principle 4 Good design demands good compromises 13

Operands: Immediates 14

Operands: Immediates 14

Machine Language • Binary representation of instructions – R-Type – I-Type – J-Type 15

Machine Language • Binary representation of instructions – R-Type – I-Type – J-Type 15

Machine Language: R-Type 16

Machine Language: R-Type 16

Machine Language: R-Type 17

Machine Language: R-Type 17

Machine Language: I-Type 18

Machine Language: I-Type 18

Machine Language: I-Type 19

Machine Language: I-Type 19

Machine Language: J-Type 20

Machine Language: J-Type 20

The Stored Program 21

The Stored Program 21

Next Time Programming – Branches – Procedure calls – Addressing modes 22

Next Time Programming – Branches – Procedure calls – Addressing modes 22