Computer Architecture
CPU:
Central processing unit
Integrated system on a microchip
Responsible for executing or processing instructions in a computer
Consists of:
o Control Unit (CU)
o Arithmetic and Logic Unit (ALU)
o Registers
o Buses
Von Neumann Architecture:
Stored-program concept: Programs and data stored in the same
memory
CPU directly accesses memory
Instructions are executed sequentially
Immediate Access Store: Stores the instructions that are to be
processed, which are fetched by the CPU
Components of CPU:
1. Arithmetic Logic Unit (ALU) – Performs arithmetic and logical
instructions being executed
2. Control Unit (CU) –Reads instructions from memory. Manages and
directs the operations of the CPU and synchronizes them
3. Program Counter (PC) – Stores address of the memory location of
the next instruction to be fetched
4. Current Instruction Register (CIR) - Stores the current instruction
being executed by the CPU.
5. Memory Address Register (MAR) – Stores address of current
instruction being executed
6. Accumulator (ACC) - Stores the interim result during a calculation
7. Memory Data Register (MDR) – Stores the Data from the address
received from the MAR
8. System Clock - Synchronizes all CPU operations, providing timing
signals to coordinate the activities within the CPU.
System Buses
Used to transmit data and control signals between CPU and memory
Wider Buses = more data transmitted, faster performance
1. Address Bus:
o Unidirectional
o Carries addresses from CPU to Memory
2. Data Bus:
o Bi-directional
o Carries data from CPU to Memory (and vice-versa)
o Carries data to/from Input and Output Devices
3. Control Bus:
o Bi-directional
o Carries control signals from CU to all other components
Fetch-Decode-Execute Cycle
1. PC contains the address of the next instruction to be fetched
2. This address is copied to the MAR via the address bus
3. The instruction of the address is copied into the MDR temporarily
4. The instruction in the MDR is then placed in the CIR
5. The value in the PC is incremented by 1, pointing to the next
instruction to be fetched
6. The instruction is finally decoded [with the instruction set] and then
executed.
Instruction Set
Set of operations that need to be decoded in sequence
Opcode: Informs the CPU what operation needs to be done
Operand: The data which needs to be acted on, or the memory
register reference
System Clock
Clock cycle that synchronizes all computer operations
Clock Speed = number of clock cycles per second
Overclocking
Using a clock speed higher than the CPU was designed for
Operations become unsynchronized – frequent crashes
Leads to overheating
Cores
One core = ALU, Control Unit and all Registers.
More cores –
o Faster and better performance
o BUT longer communication time between cores
So reduces potential performance
Cache
Cache memory is located within the CPU itself
Fast memory access for the CPU
Stores frequently used instructions and data that need to be accessed
faster
Embedded Systems
An embedded system is a combination of hardware and software which
is designed to carry out a specific set of functions
Can contain:
Microprocessor: Integrated circuit with only CPU (no RAM or ROM)
Microcontroller: Integrated circuit with CPU, RAM, ROM and
peripherals embedded onto one single chip to carry out a specific task
System-on-chips (SoC): Includes CPU, memory, and I/O ports on a
single chip
Inputs:
Sensors (analogue or digital)
User Input
Outputs:
Actuator
Mechanical output
Software/display output
Non-programmable Embedded Systems:
Need to be replaced if software needs update
Programmable Embedded Systems:
Updated by connecting to a computer and downloading software
Automatic updates over internet