1.1.1 - Structure And Function of the Processor Flashcards
Central Processing Unit (CPU)
- Are general purpose processors that execute instructions in a computer system through the fetch-decode-execute (FDE) cycle.
- Each consists of: An Arithmetic Logic Unit (ALU), A Control Unit (CU), Registers and Buses.
Arithmetic Logic Unit (ALU)
- Carries out arithmetic calculations and logical decisions.
- The results of its calculations are stored in the Accumulator (ACC).
Control Unit (CU)
- Decodes instructions
- Manages the execution of instructions using control signals to coordinate movement of data through the processor and other parts of the computer.
- Controls buses
Register
- Small piece of memory used for storing data within the processor
- They provide faster access to data than RAM for specific purposes during FDE cycle when frequent access is needed.
Program Counter (PC)
– Stores the address of the next instruction to be processed
– Value is then sent to the MAR
– After sending the value the PC is incremented / changed to address held in CIR if the operation is a Jump
Accumulator (ACC)
- Temporary storage for data being processed / during calculations
- Deals with the I/O data in the processor and is used as a buffer
General Purpose Register (GPR)
Used to temporarily store data being used rather than sending data to and from the comparatively much slower memory.
Memory Address Register (MAR)
Contains the address of the next location to be accessed in memory copied from the PC
Memory Data Register (MDR)
Contains the data which has been accessed from the memory location referenced by the MAR when being transferred to the CIR
Current Instruction Register (CIR)
Holds the most recently fetched data/instructions to be decoded and executes into opcode and operand.
Bus
A parallel group of communication channel wires able to transmit data in groups of bits together from one register to another.
Data Bus
Carries the data being transmitted from one register to another.
Address Bus
Carries the memory location address of the register where the data is being transmitted to or from.
Control Bus
Transmits control signals from the CU to allow synchronisation of signals to the rest of the processor.
Fetch - FDE Cycle
- Data/address is copied from the PC to the MAR
- PC is incremented by 1 in each cycle
- Read signal is sent on the control bus.
- RAM copies the data from the location specified by the address bus onto the data bus.
- Data on the data bus is passed into the MDR
- Data is copied from the MDR to the CIR
Decode - FDE Cycle
- Load instruction from address in MAR pointed to MDR.
- The instruction is copied from MDR to CIR.
- The instruction is decoded into opcode and operand by the CU in the CIR.
Execute - FDE Cycle
The appropriate instruction opcode is carried out on the operand by the processor.
Clock Speed
- Number of instruction cycles per second a CPU can execute
- Measured in Hz (1 GHz = 1 billion instructions per second)
Effect of increased Clock Speed
- Gives more cycles per second so more instructions can be executed per second
- So the program takes less time to run
Number of Cores
- Each core is a distinct processing unit on the CPU; each with their own Registers, ALU, Accumulator, CU etc.
- Processors can have multiple cores to speed up smaller problems or when multitasking, different cores can run different applications/programs at the same time.
Cache
- Small storage of data and instructions that are likely to be regularly accessed
Effect of increased Cache Size
- More space for data / instructions in cache memory so RAM needs to be accessed less
frequently - Saves time as accessing cache is quicker than accessing the RAM
Pipelining
- Would allow one instruction to be fetched as the previous one is being decoded and the one before that is being executed.
- Jump instructions do not pipeline well as they could be followed by one of many instructions determined at execution, so the wrong one may be fetched/decoded
Von Neumann Architecture
- Uses shared memory space for instructions and data; these are stored in the same format.
- Single set of buses
- A single CU and processor uses FDE cycle to execute one instruction at a time in a linear sequence.
- Simple OS and easy to program but slow processing large sets of data.
Harvard Architecture
- Data/instructions are stored with fixed memory sizes in separate memory units with separate buses.
- So while data is being written to or read from the data memory, the next instruction can be read from the instruction memory.
- Used by RISC processors
Contemporary Processor Architecture
Modern high-performance CPU chips that incorporate aspects of both architectures.
Why can Pipelining improve the performance of a processor?
- Reduces/removes latency
- CPU is not idle while waiting for next instruction
- Next instruction is fetched while current one is decoded/executed
- All parts of the processor can be used at any instance in time.