We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5
Hardware
The role of the CPU
- The CPU processes all the data and instructions. - Embedded systems make use of a microprocessor e.g. washing machines, smart TV. - Embedded systems are designed to perform limited and specific tasks. - Microprocessors process a limited set of instructions whereas CPU processes thousands of complex instructions. - The computer uses the fetch-decode-execute cycle to process instructions. - What happens in each stage of the cycle and which components are involved?
Von Neumann architecture
- Referred to as the ‘Stored program concept’ which had the following main features: - » the concept of a central processing unit (CPU or processor) » the CPU was able to access the memory directly » computer memories could store programs as well as data » stored programs were made up of instructions which could be executed in sequential order The fetch stage -In order for data and instructions to be processed, they need to be brought from the RAM into the CPU. -Program Counter (PC) stores the address (in RAM) of the next instruction that needs to be processed. -The address in the PC is sent to another component in the CPU called the memory address register (MAR). -This address is transported from PC to MAR using the address bus. Both PC and MAR are registers in the CPU. -To retrieve the instruction MAR needs to send the address to the location in RAM using the address bus. -Once the address is received by the RAM location, the instruction is sent to the memory data register (MDR). -This instruction is sent via the data bus. The MDR then sent this instruction to the current instruction register (CIR). -CIR is a register which is part of a component of the CPU called the Control Unit (CU). CU is responsible for the next stage of the cycle, the decode stage.
The decode stage
-Starts when the instruction is received by the CU. CU decodes the instruction so that the CPU understands what is required to execute the instruction. -It makes use of the instruction set to decode the instruction. -Instruction set is a set of commands that can be processed by a certain CPU. -These commands are in machine code. This stage is followed by the execution of the instruction.
The execute stage
-Any action required of the instruction is carried out. This may involve some mathematical and logical calculations. -Data used in calculations is sent to the arithmetic and logic unit (ALU). -ALU is responsible for any calculations. -ALU uses a special register called the accumulator(ACC) to store interim values that are created during calculations. -Action of the instruction is then carried out once calculations are done.
-Control Unit lets all other components know what they are supposed to do during the FDE cycle. It sends all the signals to components using the control bus.
Factors that can affect the performance of a CPU
-Performance is about how quickly the CPU can process an instruction. -Three main factors that affect the performance: 1. Number of cores- the part of the CPU that contains all the components that are used to perform the FDE cycle. 2. Clock speed- the number of FDE cycles that can be performed in a second. 3. Cache size -a type of storage that is built into the CPU, to store the most frequently used data and instructions. -Two core CPU is called a dual core processor and it can perform two FDE cycles at the same time. -Four cores CPU is called a quad core and can perform four FDE cycles at the same time. -Multiple cores allow a computer to multitask. -The CPU contains an internal clock that controls the speed at which instructions are processed. The speed is measured in hertz. -Modern computer's clock speed is measured in gigahertz (billion cycles per second). -A larger cache allows the CPU to store more data and instructions frequently used resulting in less time spend going to RAM https://youtu.be/clL1AuQNHmQ?feature=shared https://www.youtube.com/watch?v=K9EuHc5kzJc&list=PLCiOXwirraU A_DrxjGlH8xjfdHDmBIbwM&index=2 https://www.youtube.com/watch?v=C0Pch0zpsT4&list=PLCiOXwirraU A_DrxjGlH8xjfdHDmBIbwM&index=3