Central Processing Unit (CPU) Architecture (Copy)
Von Neumann Model
- The model consists of
- Central processing unit (CPU or processor)
- Processer’s direct access to memory
- Computer memories can store program data
- Stored programs have instructions that are executed in sequential order
Components of The Processor (CPU)
- Arithmetic Logic Unit (ALU)
- Carries out arithmetic and logic operations
- More than one ALU possible
- One does fixed point operations and the other floating point operations
- Multiplications and Division
- Sequences of addition, subtraction, and then left right shifting operations
- Accumulator (ACC)
- Temporary register when carrying out ALU calculations
- Control Unit (CU)
- Reads instruction from memory
- Address of the location of the instruction
- Program Counter (PC)
- Interpreted
- Signals are generated along the Control Bus
- CU ensures synchronization of data flow and program instructions throughout the computer
- System Clock
- Timing signals
- Control bus ensures vital synchronization
- Computer will crash without it
- Immediate Access Store (IAS)
- IAS has the data and programs that the CPU needs to access
- The program and data is placed n the IAS temporarily
- IAS are considerably faster read and write than backing store
- Its’s another name for primary memory – RAM
Registers
- General and specific purpose.
- General
- Data frequently used by CPU
- Addresses CPU directly
- Accumulator as an example
- Specific
- Specific function within the CPU and hold the program state
- Current instruction register (CIR)
- Stores the current instruction being decoded and executed.
- Index Register (IX)
- Index addressing operations (assembly code)
- Memory address Register (MAR)
- Stores the address of memory location currently being read and written
- Memory data/ buffer register (MDR/ MBR)
- Data read from memory or data about to be written to memory
- Program Counter (PC)
- Address where the next instruction is present
- Status Register (SR)
- Bits can be set or cleared depending on the operation
- Where there is some arithmetic or logic progressing is required
- Each bit called a flag
- Mostly 4 flags
- Carry flag (C)
- Set to 1 if a CARRY following an addition operation
- Negative flat (N)
- Set to 1 if the result of a calculation yields a negative value
- Overflow flag (V)
- Set to 1 if an arithmetic operation results in an OVERFLOW bring produced
- Zero flag (Z)
- Set to 1 if the result of an arithmetic or logic operation is ZERO
System Buses
- Parallel transmission component
- Each wire transmits one bit of data
- Address Bus
- Carries addresses throughout the computer system
- Between CPU and memory it is unidirectional
- So address not caried back to CPU
- Width of bus is important
- Wider bus more memory locations addressed directly
- More bits, more bus width
- Exponent of 2 for the bits number
- Data Bus
- Bidirectional
- To and from CPU to memory and input/ output devices
- Data can be address, instruction or numerical value.
- Word means a group of bits which can be considered a single unit.
- Such as a 64-bit word
- Larger words can improve overall performance.
- Control Bus
- Bidirectional
- Carries signals from CU to all other computer components
- 8-bit wide
- Control signals only
- Clock defines clock cycle
-
- Synchronizes computer operations
- Control bus transmits timing signals
- Increasing clock speed will increase processing speed
- Overall performance may still not be increased
-
- Other factors affecting CPU performance
- Width of address bus and data bus
- Overclocking
- Clock speed can be changed by accessing the Basic Input/ Output System (BIOS)
- Execution of instructions outside design limit can result in unsynchronized operations
- Overheating of CPU may occur
- Cache memory
- Faster access time
- No need to keep refreshing
- Stores frequently used instructions
- Use of different number of cores
- Improve performance
- Dual core
- Quad core
- Different cores have different channels and can perform accordingly
Computer Ports
- Input and Output devices are connected to computer via ports
- USB Ports
- Universal Serial Bus (USB)
- Asynchronous Serial Data Transmission
- Standard method for transferring data between a computer and a number of devices
- Four-wired shielded cable.
- Two wires for power and the earth, and two wires for data transmission.
- If one USB port for plugging
- Computer automatically detects that the device is present
- Automatically recognized
- Device driver installed
- Pros
- Automatically detected and loaded up
- Fits one way only
- No incorrect connections
- Industry standard with considerable support
- Different transmission rates supported
- Newer USB standards are backward compatible with older USB standards
- Cons
- Present transmission rate is limited to less than 500 megabits per second
- Cable length about 5 metres
- Older USB standard may not be supported in future
- High-Definition Multimedia Interface (HDMI)
- Output both audio and visual
- High-end definition signals
- Video Graphics Array (VGA) replaced by it.
- It allows widescreen format, greater number of pixels and range of colors
- More data transfer required
- Some protected against piracy
- High-bandwidth digital copy protection (HDCP) provides protection against piracy
- VGA (Video Graphics Array)
- VGA supports only 640 x 480 pixel resolution
- Refresh rate up to 60 Hz
- 60 frames per second
- Analogue
- Pros of HDMI
- Current standard
- Fast data transfer
- Improved security
- Modern digital systems
- Cons of HDMI
- Robust connection
- Limited cable length
- Five cable/ connection standards
- Pros of VGA
- Simpler technology
- One standard available
- Split the signal and connect multiple devices
- Connection is very secure
- Cons of VGA
- Out-dated Analogue
- Pin bending
- Cable high grade to avoid distortion of signal
Fetch-Execute Cycle
- Fetch
- Next instruction fetched from memory address
- Currently stored in Program Counter (PC)
- Stored in Current Instruction Register (CIR)
- PC is increased by 1
- So next instruction processed
- Interpreted next part of cycle
- Execute
- Processor decodes instruction
- Passes it as control signals to appropriate components
- Carried out in logical sequence
- Register Transfer Notation (RTN)
- Describe what is happening.
- Uses generic/ abstract or concrete/ specific notation
- Use of Interrupts in the Fetch-Execute Cycle
- Interrupt Register
- In middle of a cycle, interrupt can tell the system that another work needs to be performed
- Before the next fetch-execute cycle, interrupt register is checked bit by bit.
- If the interrupt occurred, it needs servicing, Control transferred to interrupt handler
- After servicing, the register is reset and contents of register are restored
Interrupts
- Sent by device or software to processor
- Causes
- Timing signal
- Input output processes
- User interaction
- Software error cannot be ignored
- Interrupt priority
- Identification of interrupt type
- Interrupts allow computers to carry out many tasks or to have several windows
- Interrupt service routine (ISR) is executed by loading the start address to program counter
- After servicing, the status of the interrupted task is reinstated
