Microprocessor Architecture

There are four main structural components of the computer:

Central Processing Unit (CPU) – controls
the operation of the computer and
performs its data processing functions

Main Memory – stores data

Input/Output (I/O) – moves data between
the computer and its external environment

System Interconnection (Bus) – some
mechanism that provides for
communication among CPU, main memory,
and I/O


The Computer Top-Level Structure

Von Neumann Architecture


Microprocessors

The microprocessor is the heart of a microcomputer system. In fact, it forms the central processing unit of any microcomputer and has been rightly referred to as the computer on a chip.

Introduction to Microprocessors

  • A microprocessor is a programmable device that accepts binary data from an input device, processes the data according to the instructions stored in the memory and provides results as output.
  • In other words, the microprocessor executes the program stored in the memory and
    transfers data to and from the outside world through input/output (I/O) ports.
  • Any microprocessor-based system essentially comprises three parts, namely the
    microprocessor, the memory and peripheral I/O devices.
  • The microprocessor is generally referred to as the heart of the system as it performs all the operations and also controls the rest of the system. The three parts are
    interconnected by the data bus, the address bus and the control bus.
  • Microprocessor-based system

Input/Output Devices

Input/output devices are means through which the microprocessor interacts with the outside world.

The commonly used input devices include keyboards, A/D converters, switches, cameras, scanners, microphones and so on.

LEDs, seven-segment displays, LCD displays, printers and monitors are some of the commonly used output devices.

Bus

  • A bus is basically a communication link between the processing unit and the peripheral devices.
  • It is a group of wires that carry information in the form of bits.
  • The address bus is unidirectional and is used by the CPU to send out the address of the memory location to be accessed.
  • It is also used by the CPU to select a particular input or output port.
  • It may consist of 8, 16, 20 or an even greater number of parallel lines.
  • The number of bits in the address bus determines the maximum number of data locations in the memory that can be accessed.
  • A 16-bit address bus, for instance, can access 2 16 data locations.
  • It is labelled as A0, …, An−1, where n is the width (in bits) of the address bus

The data bus is bidirectional, that is, data flow occurs both to and from the microprocessor and
peripherals.

  • Data bus size has a considerable influence on the computer architecture, as parameters such as the word
    length and the quantum of data that can be manipulated at a time are determined by the size of the data
    bus.
  • There is an internal data bus, which may not be of the same width as the external data bus that connects
    the microprocessor to I/O and memory.
  • The size of the internal data bus determines the largest number that can be processed by the
    microprocessor in a single operation.
  • The largest number that can be processed, for instance, by a microprocessor having a 16-bit internal data
    bus is 65535.
  • The data bus is labelled as D 0 , …, Dn−1, where n is the data bus width (in bits)
  • The control bus contains number of individual lines carrying synchronizing signals.
  • The term ‘bus’ would normally imply a group of lines working in unison.
  • The control bus sends out control signals to memory, I/O ports and other peripheral devices to ensure proper operation.
  • It carries control signals such as memory read, memory write, read input port, write output port, hold, interrupt, etc.
  • For instance, if it is desired to read the contents of a particular memory location, the CPU first sends out the address of that location on the address bus and a ‘memory read’ control signal on the control bus.
  • The memory responds by outputting data stored in the addressed memory location onto the data bus.
  • Interrupt’ tells the CPU that an external device needs to be read or serviced.
  • Hold’ allows a device such as the direct memory access (DMA) controller to take over the address and data
    buses.
  • Bus interface between the microprocessor(Intel 8085 – 8-bit microprocessor) and its peripheral devices.

Inside a Microprocessor

The important functional blocks
include:

  • the arithmetic logic unit (ALU)
  • the registers
  • the control unit.

Pic: Schematic arrangement of a microprocessor


Arithmetic Logic Unit (ALU)

  • The arithmetic logic unit (ALU) is the core component of all microprocessors.
  • It performs the entire integer arithmetic and bit-wise logical operations of the microprocessor.
  • ALU is a combinational logic circuit and has two data input lines, a data output line and a status line. It gets data from the registers of the microprocessor, processes the data according to the instructions from the control unit and stores the results in its output registers.
  • All modern ALUs use binary data in 2’s complement format.
  • The integer arithmetic operations performed by the ALU include addition and subtraction.
  • It performs AND, OR, NOT and EXCLUSIVE-OR logical operations.
  • Some 16-bit, 32-bit and 64-bit microprocessors also perform multiplication and division operations.
  • In other microprocessors, the multiplication and division operations are performed by writing algorithms using addition and subtraction operations.

Register File

  • The register file comprises various registers used primarily to store data, addresses and status information during the execution of a program.
  • Registers are sequential logic devices built using flip-flops.
  • Some of the commonly found registers in most of the microprocessors include the program counter, instruction registers, buffer registers, the status register, the stack pointer, general-purpose registers and temporary registers.

Program Counter

•The program counter is a register that stores the address of the next instruction to be executed and hence plays a central role in controlling the sequence of machine instructions that the processor executes.
•After the instruction is read into the memory, the program counter is automatically incremented by ‘1’.

Instruction Register

• stores the code of the instruction currently being executed.

Buffer Register

•Buffer registers interface the microprocessor with its memory system. The two standard buffer registers are the memory address register (MAR) and the memory buffer register (MBR).
•The MAR is connected to the address pins of the microprocessor where as the MBR, also known as the memory data register, is connected to the data pins of the microprocessor

Status Register

•The status register stores the status outputs of the result of an operation and gives additional information about the result of an ALU operation.

Stack Pointer

•The stack pointer is a register used to store the address of a memory location belonging to the most recent entry in the stack.
•In fact, a stack is a block of memory locations designated for temporary storage of data.
•It is used to save data of another general-purpose register during execution of a subroutine or when an interrupt is serviced.

General-purpose Registers

•There is a set of registers for general-purpose use
•They are used explicitly to store data and address information. Data registers are used for arithmetic operations while the address registers are used for indexing and indirect addressing.

Temporary Registers

•These are used when data have to be stored during the execution of a machine instruction. They are completely hidden from the user of the microprocessor.

Control Unit

  • The control unit governs and coordinates the activities of different sections of the processor and I/O devices.
  • It is responsible for controlling the cycle of fetching machine instructions from memory and executing them.
  • It also coordinates the activities of input and output devices.
  • It is undoubtedly the most complex of all functional blocks of the microprocessor and occupies most of the chip area.
  • The control unit is a sequential logic circuit, which steps the processor through a sequence of synchronized operations.
  • It sends a stream of control signals and timed pulses to the components and external pins of the microprocessor.
  • to execute an instruction from the memory, the control unit sends out a ‘read’ command to the memory and reads the instruction (or data) that comes back on the data bus.
  • The control unit then decodes the instruction and sends appropriate signals to the ALU, the general-purpose registers, the multiplexers, the demultiplexers, the program counter and so on.
  • If the instruction was to store data in the memory, the control unit sends out the address of the memory location on the address bus, the data to be stored on the data bus and a ‘write’ command on a control line.
  • Control units are categorized into two types depending upon the way they are built.
  • These include hard-wired and microcoded control units.
    • Hard-wired controllers are sequential logic circuits, the
      states of which correspond to the phases of the
      instruction execution cycle. In the case of hardwired
      controllers, there is an electronic circuitry in the control
      unit to generate control signals for each instruction. They
      are very compact and fast, but are difficult to design. This
      design is also known as RISC (Reduced Instruction Set
      Computer) design.
    • Microcoded control units are easy to design, and
      execution of an instruction in this case involves executing
      a microprogram consisting of a sequence of
      microinstructions. This design is also known as CISC
      (Complex Instruction Set Computer) design. Microcoded
      control units offer more flexibility than do hard-wired
      control units but they are comparatively slower than the
      latter.

Microprocessor Instructions

  • Data Transfer Instructions
  • Arithmetic Instructions
  • Logic Instructions
  • Machine Control Instructions

Programming Microprocessors

  • Microprocessors execute programs stored in the memory
    in the form of a sequence of binary digits.
  • Programmers do not write the program in binary form but
    write it either in the form of a text file containing an
    assembly-language source code or using a high-level
    language.
  • Programs such as editor, assembler, linker and debugger
    enable the user to write the program in assembly language,
    convert it into binary code and debug the binary code.
  • Editor is a program that allows the user to enter, modify
    and store a group of instructions or text under a file name.
  • The assembly language source code is translated into an
    object code by a program called assembler.
  • Linker converts the output of the assembler into a format
    that can be executed by the microprocessor.
  • The debugger is a program that allows the user to test and
    debug the object file.
  • Programming in assembly language produces a code that is fast and takes up little memory.
  • However, it is difficult to write large programs using assembly language.
  • Another disadvantage of assembly language programming is that it is specific to a particular microprocessor.
  • High-level language programming overcomes these problems.
  • Some of the popular high-level languages used include C, C++, Pascal and so on.
  • Compiler programs are primarily used to translate the source code from a high-level language to a lower-level language (e.g. assembly language or machine language).

RISC vs CISC Processors

Complex Instruction Set Computer (CISC)

  • The primary goal of CISC architecture is to complete a task in as few lines of assembly as possible.
  • This is achieved by building processor hardware that is capable of understanding and executing a series of complex operations.
  • In this case, each instruction can execute several low-level instructions.
  • One of the primary advantages of this system is that the compiler has to do very little work to translate a high-level language statement into assembly.
  • Because the length of the code is relatively short, very little
    RAM is required to store instructions. In a nutshell, the
    emphasis is to build complex instructions directly into the
    hardware.
  • Examples of CISC processors are; CDC 6600, System/360, VAX, PDP-11, the Motorola 68000 family, and Intel and AMD x86 CPUs

Reduced Instruction Set Computer
(RISC )

  • This type of microprocessor emphasizes simplicity and efficiency.
  • RISC designs start with a necessary and sufficient instruction set.
  • The objective of any RISC architecture is to maximize speed by reducing clock cycles per instruction.
  • Almost all computations can be done from a few simple operations.
  • The goal of RISC architecture is to maximize the effective speed of a design by performing infrequent operations in software and frequent functions in hardware, thus obtaining a net performance gain.
  • Examples of RISC processors include
  • Sun’s SPARC, IBM and Motorola’s PowerPCs, and ARM-based processors

Math Coprocessor

  • Math coprocessors are special-purpose processing units that assist the microprocessor in performing certain mathematical operations.
  • The arithmetic operations performed by the coprocessor are floating point operations, trigonometric, logarithmic and exponential functions and so on.
  • Examples include Intel’s 8087, 80287, etc.
    • The 8087 numeric coprocessor provides the instructions and data types needed for high-performance numeric application, providing up to 100 times the performance of a CPU alone. Another widely used math coprocessor is 80287. The 80287 numeric processor extension (NPX) provides arithmetic instructions for a variety of numeric data types in 80286 systems. It also executes numerous built-in transcendental functions (e.g. tangent and log functions).

*** END OF THE TOPIC ***

Leave a Comment

Your email address will not be published. Required fields are marked *