Functions, organization and components of microprocessor

Posted by Unknown Saturday, July 20, 2013 0 comments
Every computer system has a unit whose primary purpose is to process data. This unit is the control centre of the entire computer system. It accepts data from input devices, processes data, and sends results to the printer or other output devices under control of a stored program. This unit is referred to as the microprocessor in a microcomputer and the central processing unit (CPU) in large computer systems. Both units perform basically the same functions.

Function of Microprocessor:
The microprocessor is an electronic device. It is the heart and brain inside every microcomputer. This tiny chip of silicon determines the speed and power of the entire computer by handling most, if not all, of the processing of a microcomputer. Functions of a microprocessor can be summarized as follows:
  • The processor first fetches an instruction from the main memory.
  • The instruction is then decoded to determine what action is required to be done.
  • Based on instruction the processor fetches, if required, data from main memory or I/O module.
  • The instruction is then executed which may required performing arithmetic or logical operation on data.
  • In addition to execution, CPU also supervises and controls I/O devices. If there is any request from I/O devices, called interrupt, the CPU suspends execution of the current program and transfers control to an interrupt handling program.
  • Finally, the results of an execution may require transfer of data to memory or an I/O Module.
Organization of a Microprocessor:
The major components of Microprocessor are an arithmetic/logic unit (ALU) and control unit (CU). The ALU performs the actual computation or processing of data. The control unit controls the movement of data and instructions into and out of the CPU. The internal CPU bus is needed to transfer data between the various registers and the ALU. The ALU operates only on data in the internal CPU memory. The registers in the CPU serve two functions:
  • User-Visible Registers: These registers enable the program to minimize main-memory references by optimizing use of registers.
  • Control and Status Registers: They are used to control the operations of the CPU and to control the execution of Programs.
User-Visible Registers:
User-visible registers can be characterized in the following categories:
  • General purpose registers
  • Data registers
  • Address registers
  • Condintion code registers
General-purpose registers can be assigned to a velocity of functions by the programmer. A general-purpose register can contain the operand for any opcode. This provides true general-purpose register use. However, there are restrictions. There may be dedicated registers for floati0gn-point operation.

General-Purpose registers can be used for addressing functions. In other cases, there is a fractional or clean separation between address registers and data registers, Data registers may be employed only to hold data and cannot be used in the control of an operand address. Address registers may be somewhat general-purpose, or they may be devoted to a particular addressing mode, some examples are:
  1. Segment Pointers: A segment register holds the address of the base of a memory segment. There may be multiple registers; for example, one for the operating system and one for the current process.
  2. Index Registers: These are used for indexed addressing and may be auto indexed.
  3. Stack Registers: Normally the stack is in memory and there is a dedicated register that points to the top of the stack. This allows push, pop, and other stack instructions.
A final category of registers which is minimum partly visible to the user holds condition codes or flags. Condition codes are bits set by the Central Processing Unit (CPU) as the result of operations. For example, an arithmetic or logical function may construct a positive, negative or zero result or an overflow. In addition to the result, it may consequently be checked as element of a conditional branch operation.

Condition code bits are gathered into one or more registers. Generally, they shape part of a control register. Usually, instructions of the machine permit these bits to be read, but they cannot be changed by the programmer.

Control and Status Registers:
A variety of CPU registers control the operation of the CPU. Most of these are not visible to the user. A reasonably complete list of register types, with brief descriptions are presented here. The following four registers are essential for instruction execution:
  • Program Counter (PC): Contains the address of an instruction to be fetched.
  • Instruction Register (IR): Contains the instruction most recently fetched.
  • Memory Address Register (MAR): Contains the address of a location in memory.
  • Memory Buffer Register (MBR): Contains a word of data to be written to memory or the world most recently read.
The program counter contains an instruction address. Typically, the program counter is updated by the CUP after each instruction fetch and thus, it always points to the next instruction to be executed. A branch or skip instruction modify the contents of the PC. The fetched instruction is loaded into an instruction register, where the opcode is analyzed. Data are exchanged with memory using the MAR and MBR. In a bus-organized system, the MAR connects directly to the address bus, and the MBR cornets directly to the data bus. User-visible registers, in turn, exchange data with the MBR.

The four registers mentioned above are used for the movement of data between the CPU and memory. Within the CPU, data must be presented to the ALU for processing. The ALU may have direct access to the MBR and user-visible registers. Alternatively, there may be additional buffer registers at the boundary to the ALU; these registers serve as input and output registers for the ALU and exchange data with the MBR and user-visible registers.

All CPUs includes a register or set of registers, often known as the program status word (PSW) that contains status information. The PSW typically contains condition codes plus other status information. Common fields or flags include the following:
  • Sign: Contains the sign bit of the result of the last arithmetic operation.
  • Zero: Set when the result is 0.
  • Carry: Set if an operation resulted in carry (addition) into or borrow (subtraction) out of a high-order bit.
  • Equal: Set if a logical compare result in equality.
  • Overflow: Employed to point toward arithmetic overflow.
  • Interrupt Disable or Enable:  Applied to disable or enable interrupts.
  • Supervisor: Indicates where the Central Processing Unit is executing in administrator or user mode. Certain privileged instructions can be performed only in supervisor mode, and certain areas of memory can be accessed only in supervisor mode.
In addition to the PSW, there may be a pointer to a block of memory containing additional status information. In machines using vectored interrupts, an interrupt vector register may be provided. If a stack is used to implement certain function (e.g., subroutine cell), then a system stack pointer is needed. A page table pointer is used with a virtual memory system. Finally, registers may be used in the control of I/O operations.
In addition to the above components modern microprocessors may also have the following components:
  • Integer unit (iu): To handle the integer operation efficiently.
  • Floating point unit (fpu): To perform floating point operations.
  • Memory management unit (mmu): This unit handles run-time memory management problems to enhance performance.
  • Data cache and instruction cache: These are also called bult-in cache. The built-in cache is a fast primary memory.
It is also noted that currently some microprocessors may have a special component for a specific purpose, for instance multimedia. Some processors have more than one ALU unit to enhance performance. Finally, it is essential to say that the components of a microprocessor may change or new components may be incorporated in the future.

0 comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...