title: Microarchitecture
date: 2023-10-16
author:
- AllenYGY
status: DONE
tags:
- NOTE
- CO
- Lec8
created: 2024-01-16T21:03
updated: 2024-05-31T01:17
publish: True
Microarchitecture
Microarchitecture connects circuits and ISA together.
ISA = Instruction Set Architecture
ISA specifies what hardware does, but not how
Microarchitecture specifies how it does it
Perform arithmetic and logic operations (AND, NOT, ADD) on values stored in registers
Control Unit: a finite state machine coordinates execution of the program
IR Get the Instruction from Memory through PC's address
If IR[5]=0
ADD DST SR1 000 SR2
0001 xxx xxx 000 xxx
If IR[5]=1
ADD DST SR1 1 xxxxx
0001 xxx xxx 1 xxxxx
opcode: 0110
operands: Src,Dst
Load the value in memory location Src into register Dst
Move [Base + Offset] to Dst
Load memory content at address (R3 + 6) to R2
LDR DST SRC offset
0110 xxx xxx xxxxxx
PC-MAR-MDR-IR
Load next instruction (at address stored in PC)
from memory into Instruction Register (IR).
Then increment PC, so that it points to the next instruction in sequence.
First identify the opcode.
Set the PC to the value obtained by adding an offset to a register.
JMPR 000 BASE offset
1100 000 011 000110
Add the value of 6 (offset) to the contents of R3 (Base),and load the result into the PC
This becomes the address of the next instruction to fetch.
The clock is a signal that keeps the control unit moving.
At each clock “tick,” control unit moves to the next machine cycle -- may be next instruction or next phase of current instruction.
Stopping the Computer