structure and function of a processor Flashcards
The characteristics of contemporary processors,input,output and storage devices
Define the central processing unit
Carries out the instructions in computer programs.
The central processing unit ‘runs programs’ by continually fetching, decoding and executing instructions
Define the arithmetic logic unit
The ALU carries out the calculations and logical decisions. The results of its calculations are stored in the accumulator.
Define the control unit
The control unit sends out signals to coordinate how the processor works.
It controls how data moves around parts of the CPU and how it moves between the CPU and memory.
Instructions are decoded in the control unit.
Define what registers are
Areas of memory within the processor itself.
- They can be accessed at extremely fast speeds so the processor can use them without causing a bottleneck.
special purpose registers
What is the purpose of the program counter (PC)?
special purpose register - Registers in the processor that have a specific use.
PC - Holds the memory address of the next instruction to be executed.
With each execution of the FDE cycle, it gets incremented to point to the next instruction, allowing the program to be executed in sequence, instruction by instruction.
The program counter can be changed by instructions that alter the flow of control
Eg. branch, BRA, BRP
special purpose registers
what is the purpose of the memory data register (MDR)?
special purpose register - Registers in the processor that have a specific use.
MDR - Stores the data or instructions that are to be fetched from or sent to memory
special purpose registers
What is the purpose of the memory address register (MAR)?
special purpose register - Registers in the processor that have a specific use.
MAR - Stores the address of the data or instructions that are to be fetched from or sent to memory.
special purpose registers
What is the purpose of the current instruction register (CIR)?
special purpose register - Registers in the processor that have a specific use.
CIR - Stores the most recently fetched instruction, which will be decoded and executed. ( split into opcode and operand)
special purpose registers
What is the purpose of the accumulator (ACC)?
special purpose register - Registers in the processor that have a specific use.
ACC - stores the results of calculations made by the ALU
What is the purpose of general purpose registers?
These can temporarily store data being used rather than sending data to and from memory.
What are ‘buses’
communication channels through which data can be sent around the computer.
Main buses:
- The data bus
- The address bus
- The control bus
What is the data bus
The data bus carries data between the processor and memory
What is the address bus
The address bus carries the address of the memory location being read from or written to.
What is the control bus
The control bus sends control signals from the control unit.
Describe the ‘fetch’ stage of the FDE cycle
1) The contents of the PC are copied to the MAR
2) The read signal is sent across the control bus and the contents of the MAR are sent across the address bus
3) The contents of the memory location stored at the MAR are then sent across the data bus and stored in the MDR
4) The contents of the MDR are then copied to the CIR
5)The PC is incremented by one unless the next instruction is BRZ, BRA, BRP
Describe the ‘decode’ of the FDE cycle
6) The contents of the CIR are sent to the control unit
7) The instruction held in the CIR is decoded and split into opcode (the instruction) and operand (the address that we will get the data from )
Describe the ‘execute’ of the FDE cycle
8) Data if needed is sent from MDR to the ACC. The instruction is executed and the result is held in the ACC as stored in main memory.
What are the factors affecting the performance of the CPU
- Clock speed
- Number of cores
- Amount of cache memory
- Use of pipelining
Describe how clock speed affects the performance of a computer
Clock speed synchronises operations
The faster the clock speed, the faster a computer can fetch, decode and execute instructions.
Describe how the number of cores affects the performance of a computer
A core is a distinct processing unit on the CPU that can run independently.
- This means it can execute its own fetch-decode-execute cycle independently this is known as parallel processing.
- Each processor can also work on different parts of the same task
Describe how cache size affects the performance of a computer
This is a small amount of fast temporary memory built into the processor itself that makes up for the RAMs slow accessing time.
Data that is likely to be regularly accessed is kept here.
Describe the different levels of cache
Level one: Cache is the smallest and built directly into the CPU. Often each core will have its own level of cache
Subsequent levels: Larger and further away from the heart of the CPU and slower to access
Modern CPUs tend to have three or four levels of cache.
Describe how pipelining affects the performance of a computer
The processor fetches an instruction while the previous one is being decoded and the one before is being executed.
This reduces how long the CPU is idle and increases CPU efficiency.
Structure and functions of Von Neumann architecture
features:
- Single control unit
- single arithmetic logic unit
- Single memory store that contains both instructions and data
Storing data and instructions in the same memory unit and having them travel along the same bus can hold them up
Structure and functions of Harvard architecture
features:
- Separate memory units and buses for data and instructions
This is useful for when memories have
different characteristics, i.e. instructions may be read-only, while data may be read-write.
Structure and functions of contemporary processors
Contemporary processors
Use a combination of Harvard and Von Neumann architecture.
Von Neumann is used when working with data and instructions in main memory but uses
Harvard architecture to divide the cache into instruction cache and data cache.
LDA request (execute)
- Operand (memory address) is copied to the MAR
- Read request is sent to the control unit
- Operand goes through the address bus to the RAM
- Data copied to the MDR through the data bus
- Data is copied to the ACC
STA request (execute)
- Write request is sent to the control unit
- Operand goes through the address bus to the RAM
- Data is copied from ACC to MDR
- Data is copied from the MDR through the data bus to the current location
ADD/SUB (execute)
- Operand (memory address) is copied to the MAR
- Read request is sent to the control unit
- Operand goes through the address bus to the RAM
- Data copied to the MDR through the data bus
- Data in the ACC and new data is copied to the the ALU
- The result is copied back to the ACC
BRA (execute)
- operand is copied to the PC
BRP/BRZ (execute)
- Data in the ACC is copied to the ALU
- logical operation occurs (eg. a check)
- Operand is copied to the PC