CA0216D Chapter1B
CA0216D Chapter1B
Computer Architecture
Unit Learning 1
Introduction
Introduction
Introduction
• In order to appreciate the current technological advances in the computer
industry, one has to trace back through the history of computers and their
development.
• The objective of such historical review is to understand the factors affecting
computing as we know it today and hopefully to forecast the future of
computation.
• A great majority of the computers of our daily use are known as general
purpose machines.
• These are machines that are built with no specific application in mind, but
rather are capable of performing computation needed by a diversity of
applications.
• The special purpose machines are developed to serve a specific purpose.
Introduction
• Based on the interface between different levels of the system, a number of
computer architectures can be defined.
• The interface between the application programs and a high-level language is
referred to as a language architecture.
• The instruction set architecture defines the interface between the basic
machine instruction set and the runtime and I/O control.
• A different definition of computer architecture is built on four basic
viewpoints.
a) The structure,
b) The organization,
c) The implementation, and
d) The performance.
Introduction
• The structure defines the interconnection of various hardware
components.
• The organization defines the dynamic interplay and management of
the various components.
• The implementation defines the detailed design of hardware
components.
• The performance specifies the behaviour of the computer system.
Software layers
Processors: is an electronic device capable of manipulating data
(information) in a way specified by a sequence of instructions.
Basic System Architecture:
• The processor alone is incapable of
successfully performing any tasks.
• Harvard architecture :the instructions and data have different memory spaces (Figure 1-5) with separate
address, data, and control buses for each memory space.
Bus
• A bus is a physical group of signal lines that have a related function.
• Buses allow for the transfer of electrical signals between different parts of the
computer system and thereby transfer information from one device to another.
,
• For example, the data bus is the group of signal lines that carry data between the
processor and the various subsystems that comprise the computer.
• The majority of microprocessors available today (with some exceptions) use the
three-bus system architecture (Figure 1-6). The three buses are the address bus,
the data bus, and the control bus.
• The data bus is bidirectional, the direction of transfer of data determined by the
processor.
• The address bus carries the address, which points to the location in memory that
the processor is attempting to access.
Bus
A data bus has traces or lines that carry voltage interpreted by the CPU and
other devices as bits
Processor operation
There are six basic types of access that a processor can perform with
external chips. The processor can:
• write data to memory
• write data to an I/O device
• read data from memory
• read data from an I/O device
• read instructions from memory
• perform internal manipulation of data within the processor.
Since the Pentium processor was first released in 1993, the standard has been for
a processor to have two arithmetic logic units so that it can process two
instructions at once
Processor operation
• Processor frequency (speed)
– Speed at which processor operates internally
• Multiplier
– Factor multiplied against system bus frequency
• Determines processor frequency
– System bus frequency × multiplier = processor frequency
• Processors sold today contain ALUs and registers that can process
32 bits or 64 bits at a time
Processor operation
• Three categories of processors:
– 32-bit processors – known as x86 processors
• Can handle 32-bit instructions from OS
– Hybrid processors – known as x86-64 processors
• Can handle a 32-bit OS or a 64-bit OS
• AMD produced the first one (called AMD64)
– 64-bit processors – known as x64 processors or IA64
• Require a 64-bit OS and can handle 32-bit applications only by simulating
32-bit processing
ALU
,
ALU
• The Arithmetic Logic Unit (ALU) performs the internal arithmetic
manipulation of data in the processor.
• The instructions that are read and executed by the processor control the
data flow between the registers and the ALU.
• The instructions also control the arithmetic operations performed by
the ALU via the ALU's control inputs. ALU representation is shown in
Figure 1-7.
• the ALU performs an operation (typically one of addition, subtraction,
NOT, AND, OR, XOR, shift left/right, or rotate left/right) on one or more
values.
• These values, called operands, are obtained from two registers, or from one register and a
memory location.
• The result of the operation is then placed back into a given destination register or memory location.
• The status outputs indicate any special attributes about the operation, such as whether the result was zero,
negative, or if an overflow or carry occurred.
• Some processors have separate units for multiplication and division, and for bit shifting, providing faster
operation and increased throughput.
Interrupts
• Interrupts (also known as traps or exceptions in some processors) are a technique of diverting the processor
from the execution of the current program so that it may deal with some event that has occurred.
• Such an event may be an error from a peripheral, or simply that an I/O device has finished the last task it
was given and is now ready for another.
• An interrupt is generated in your computer every time you type a key or move the mouse.
• You can think of it as a hardware-generated function call.
• Interrupts free the processor from having to continuously check the I/O devices to determine whether they
require service.
• Instead, the processor may continue with other tasks.
• The I/O devices will notify it when they require attention by asserting one of the processor's interrupt inputs
• Interrupts can be of varying priorities in some processors, thereby assigning differing importance to the
events that can interrupt the processor.
• If the processor is servicing a low-priority interrupt, it will pause it in order to service a higher-priority
interrupt.
Interrupts cont..
• When an interrupt occurs, the usual procedure is for the processor to save its state by
pushing its registers and program counter onto the stack.
• The processor then loads an interrupt vector into the program counter.
• The interrupt vector is the address at which an interrupt service routine (ISR) lies.
• Thus, loading the vector into the program counter causes the processor to begin execution
of the ISR, performing whatever service the interrupting device required.
• The last instruction of an ISR is always a Return from Interrupt instruction.
• This causes the processor to reload its saved state (registers and program counter) from
the stack and resume its original program.
Two main types/categories of interrupts:
• Hardware interrupts and software interrupts
Sources
1. Designing Embedded Hardware 2nd edition, by John Catsoulis
2. Fundamentals of Computer Organization and Architecture by
Mostafa Abd-El-Barr and Hesham El-Rewini