MIPSArchitecture
MIPSArchitecture
MIPSArchitecture
1 / 24
Unofficial textbook
2 / 24
Exercise 1 clarification
3 / 24
Outline
4 / 24
What is a computer architecture?
5 / 24
What is a computer architecture?
Another view: How the ISA is implemented
Microarchitecture
6 / 24
How a computer executes a program
Decode determines:
• operation to execute
• arguments to use
• where the result will be stored
Execute:
• performs the operation
• determines next instruction to fetch (by default, next one)
7 / 24
Datapath and control unit
Datapath
Major hardware components of the FDX cycle
• path of instructions and data through the processor
• components connected by buses
8 / 24
Datapath and control unit
Control unit
Controls the components of the datapath
• determines how data moves through the datapath
• receives condition signals from the components
• sends control signals to the components
• switches between buses with multiplexers
A
MUX
out
B
9 / 24
Outline
10 / 24
Components of the MIPS architecture
Control unit
http://www.cise.ufl.edu/~mssz/CompOrg/Figure4.3-MIPSarch2.gif
11 / 24
Memory: text segment vs. data segment
Text segment
• “instruction memory”
• part of memory that stores the program (machine code)
• read only
Data segment
• “data memory”
• part of memory that stores data manipulated by program
• read/write
12 / 24
Memory: text segment vs. data segment
13 / 24
Memory addressing in MIPS
14 / 24
Program counter (PC)
0x8d0b0000
0x8d0c0004
Program: a sequence of machine instructions 0x016c5020
in the text segment 0xad0a0008
0x21080004
0x2129ffff
0x1d20fff9
Program counter
Register that stores the address of the next instruction to fetch
• also called the instruction pointer (IP)
15 / 24
Incrementing the PC
16 / 24
Instruction register (IR)
Instruction register
Register that holds the instruction currently being decoded
17 / 24
Register file
18 / 24
Register names and conventions
19 / 24
Arithmetic and logic unit (ALU)
Inputs: Outputs:
• operands – 2 × 32-bit • result – 1 × 64-bit
• operation – control signal (usually just use 32 bits of this)
• status – condition signals
20 / 24
Control unit
21 / 24
MIPS data path with control signals
http://fourier.eng.hmc.edu/e85/lectures/figures/MIPS_datapath_control.gif
22 / 24
Control unit
Condition signals
• from IR – decode operation, arguments, result location
• from ALU – overflow, divide-by-zero, . . .
Control signals
• to multiplexors – buses to select
• to each register – load new value
• to ALU – operation to perform
• to all – clock signal
23 / 24
Clock signal
Each component is implemented as an electrical circuit
• when inputs change, outputs change – not instantaneous!
• clock signal ensures we don’t use outputs until ready
24 / 24