SLR 01 - Structure and Function of the CPU Flashcards
What does the CU stand for?
The Control Unit
What does the CU do?
Co-ordinates all activities
Directs flow of data
Controls the FDE cycle
Sends memory read/write requests
Uses registers and clock
Communicates with all components
What does the PC stand for?
Program Counter
What does the PC do?
It is holds the address of the next instruction
This is either:
- The next instruction in a sequence
- The address to jump too when branching
Every FDE cycle the contents of the PC copies into the MAR
What does the MAR stand for?
The Memory Address Register
What does the MAR do?
Holds the address of the memory location from which a data / instruction to be fetched
Sends the address down the address bus to main memory
What does the MDR do?
The Memory Data Register
What does the CIR stand for?
The Current Instruction Register
What does the MDR do?
Temporary storage of data that is to read from or to be written to memory
Sometimes considered the Memory Buffer Register
All data that interacts with Main memory must pass through the MDR
What does the CIR do?
Holds the currently executed instruction
MDR contents is copied into the CIR if it is an instruction
Contains the opcode and operand of an instruction
What does ALU stand for?
The arithmetic logic unit
What does the ALU do?
Executes all Arithmetic and logic operations
Uses general purpose registers to hold results
What does the Accumulator do?
It is a general purpose register to hold data or control information
A CPU with more general purpose registers runs faster
What does the Address Bus do?
Carries memory addresses from the MAR to Main Memory
What does the Data Bus do?
Carries binary that makes up transmitted information between the MDR and Main Memory
What does the Control Bus do?
Carries command and control signals to all components
What does the Decode Unit do?
A unit that is presented with a sequence of bits from Main Memory
Uses a lookup table to translate these into instructions understood by the CPU
These commands are specific to each processor
What does the Status Register do?
It contains information about the Processor’s State
What does the Clock do?
It Synchronises components by generating pulses
This is measured in Hertz (Hz)
The higher the clockspeed the faster the CPU functions.
What does the Cache do?
It is a small area of fast memory
L1 is a part of the CPU chip
L2 and L3 exist between the CPU and RAM
What does FDE stand for?
Fetch - Decode - Execute
What happens in the fetch stage?
The PC is checked as it holds the address of the next instruction
This is copied to the MAR
This is sent along the address bus to main memory
It waits to recieve a signal from the control bus
This can be “read” from the control unit
The contents would then be sent along the data bus to the MDR
The recieved data if an instruction is copied into the CIR
The PC increments to contain the next address
What happens in the Decode stage?
The instruction in the CIR is decoded by the decode unit
This splits it into it’s opcode and operand
If the operation is load, the data fron the operands location is loaded into a register
What happens in the Execute Stage?
The address is sent down the Address Bus to Main Memory
The control unit releases a signal down the control bus
The contents of the address is sent down the data bus to the MDR
The contents of the MDR is copied into the ACC
What happens if a program branches?
If the CIR contains the binary string to branch (e.g 0110 - branch always)
It replaces the value of the PC with that of the CIR
Because the address is differen the program jumps around memory
What are the 3 Cs of CPU performance?
Clock Speed
Cache Size
Number of Cores
How does Clock Speed affect CPU performance?
It controls the rate at which CPU components function.
When your clock speed is higher more instructions are processed per second.
e.g 3.2GHz is 3.2 Billion Instructions
How does Cache Size affect CPU performance?
Because the Cache exists on or near the CPU it can store copies of frequently fetched instructions
It is quicker to access than RAM, meaning if you can avoid fetching from RAM you save time
How does the Number Of Cores affect CPU performance?
A core is a complete copy of a CPU
Each has its own components
CPUs with multiple cores can execute multiple FDE cycles at any given time utilising Multi-Threading
Not all programs are designed with this in mind, meaning it only plays a part in specific circumstances
What are the features of Von Neumann architecture?
Shared memory space for instructions and data
Instructions and data are stored using the same format
single Control Unit follows a linear FDE cycle
1 Instruction at a time
Registers are used for fast access of data
What are the features of Harvard Architecture?
Instructions and Data are stored seperately
Each core has its own buses
Reading and writing Data can happen at the same time (Pipelining)
Used by RISC processors
What does SIMD stand for and what uses it?
Single Instruction Multiple Data
Used most often by specialised Processors (e.g a GPU)
What does MIMD stand for and what uses it?
Multiple Instruction Multiple Data
Used by CPUs
What is Distributed Computing?
Multiple computers on a shared network executing a larger task concurrently.
What is Pipelining?
A process involving fetching, decoding and executing instructions simulatenously
Why is Pipelining used?
When not used components risk being sat idley while they could be in use?
What are the 2 Pipelines?
The Instruction Pipeline
The Arithmetic Pipeline
What does the Instruction Pipeline do?
It reads the next instructions from memory while others are being executed
What does the Arithmetic Pipeline do?
It divides a problem into seperate parts to be executed simultaneously