CCS 1202 Lecture 4_General Microprocessor Organization
CCS 1202 Lecture 4_General Microprocessor Organization
GENERAL MICROPROCESSOR
ORGANIZATION
What is a Microprocessor?
• A microprocessor is the central processing unit (CPU) of a computer, typically an
integrated circuit (IC), responsible for performing arithmetic, logic, control, and
input/output operations.
• Microprocessor Functionality:
• Fetches instructions from memory
• Decodes instructions to determine required actions
• Executes instructions to modify data and produce outputs
• Basic Components:
• Arithmetic Logic Unit (ALU)
• Control Unit (CU)
• Registers
• Buses
What is a Bus?
• A communication pathway connecting two or more devices
• A set of physical connections (wires, traces) that transfer data and control
signals between components.
• Usually broadcast
• Everyone listens, must share the medium
• Master – can read/write exclusively, only one master
• Slave – everyone else. Can monitor data but not produce
• Bus Width: The number of bits that can be transferred at once, which
affects data transfer rates and overall system performance.
• Often grouped
• A number of channels in one bus
• e.g. 32 bit data bus is 32 separate single bit channels
Functions of Computer Bus
• Data sharing– buses are designed to transfer data between the computer
and the peripherals connected to it. The data is transferred in parallel,
which allows the exchange of 1, 2, 4 or even 8 bytes of data at a time.
Buses are classified on how many bits they can move at the same time,
which means that we have 8-bit, 16-bit 32-bit or even 64-bit buses.
• Addressing– A bus has address lines, which match those of the processor.
This allows data to be sent to or from specific memory locations.
• Power– A bus supplies power to various peripherals that are connected to
it. This is unlike a disk drive that needs to be connected to the power
supply unit.
• Timing– The bus provides a system clock signal to synchronize the
peripherals attached to it with the rest of the system.
Structure and Topologies of Computer buses
Lines are grouped as mentioned below:
• Power line provides electrical power to the components connected
• System bus – This is the bus that connects the CPU to the
motherboard’s main memory. The system bus is also known as a front-
side bus, a memory bus, a local bus, or a host bus.
• Address Bus: The address bus carries information about the location of
data in memory. Identify the source or destination of data.
• Control Bus : The control bus carries the control signals that make sure
everything is flowing smoothly from place to place.
• It was used to add expansion cards such as extra serial or USB ports,
network interfaces, sound cards, modems, disk controllers, or video
cards.
• 32 or 64 bit
• 50 lines
Bus Types
• Dedicated
• Separate data & address lines
• Multiplexed
• Shared lines
• Consider shared address, data lines
• Need separate Address valid or Data valid control line
• Time division multiplexing in this case
• Advantage - fewer lines
• Disadvantages
• More complex control
• Ultimate performance
Single Bus Architecture
Single Bus System:
• Only one bus is used to connect the CPU components, memory, and
I/O devices.
• More cost-effective but less efficient compared to multiple bus
systems.
Advantages:
• Simple design and fewer interconnections.
• Lower hardware complexity.
• Reduces the cost of the processor.
Single Bus Problems
• Lots of devices on one bus leads to:
• Propagation delays
• Long data paths mean that co-ordination of bus use can adversely affect
performance – bus skew, data arrives at slightly different times
• Device speed
• Slower data transfer speeds due to shared resources.
• Slowest device may determine bus speed!
• Consider a high-speed network module and a slow serial port on the
same bus; must run at slow serial port speed so it can process data
directed for it
• Power problems
• Most systems use multiple buses to overcome these problems
Bus Arbitration: Centralized
• Single hardware device is responsible for allocating bus access
• Bus Controller
• Arbiter
• Centralized
• If a device wants the bus, assert bus request
• Arbiter decides whether or not to send bus grant
• Bus grant travels through daisy-chain of devices
• If device wants the bus, it uses it and does not propagate bus grant down the line. Otherwise
it propagates the bus grant.
• Electrically close devices to arbiter get first priority
• Centralized with Multiple Priority Levels
• Can add multiple priority levels, grants, for more flexible system. Arbiter can issue bus grant
on only highest priority line
Bus Arbitration: Decentralized
• Decentralized
• To acquire bus, see if bus is idle and bus grant is on
• If bus grant is off, may not become master, propagate negative bus grant
• If bus grant is on, propagate negative bus grant
• When dust settles, only one device has bus grant
• Asserts busy on and begins transfer
• Leftmost device that wants the bus gets it
Distributed Arbitration
• No single arbiter
• Each module may claim the bus
• Proper control logic on all modules so they behave to share the bus
• Solutions:
• Use of faster clock speeds.
• Optimizing control signal sequences to avoid delays.
• Employing techniques like bus arbitration (when multiple components request
the bus at the same time).
Registers
• Registers are high-speed storage areas within the CPU that temporarily
hold data, instructions, or addresses during processing.
• Both instructions or data can be stored in registers for processing by
the ALU.
• All processors have a certain number of registers, the exact number
varies between different CPUs
• Functions of Registers:
• Fast access to data
• Temporary storage during processing
• Facilitate quick context switching in multitasking systems
Types of registers
• Instruction Register (IR)
• It holds the instruction that is currently being executed.
• Its output is available to the control unit which generated the timing
signals that control the various processing elements involved in
executing the instruction
• Single Bus Architecture uses a single bus for data transfer but may face
limitations in speed and efficiency.
• Registers and buses are essential for temporary data storage and
communication between CPU components.
• Control sequences, timing diagrams, and bus gating help coordinate the
execution of instructions and prevent conflicts.