0% found this document useful (0 votes)
14 views32 pages

CA0216D Chapter1B

This document provides an introduction to computer architecture, covering the history, types of computers, and key concepts such as performance measures and processor operations. It distinguishes between general-purpose and embedded computers, outlines various architectures, and explains the role of components like the processor, memory, and buses. Additionally, it discusses the significance of interrupts in managing processor tasks and the basic principles of computer operation.

Uploaded by

macjade
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views32 pages

CA0216D Chapter1B

This document provides an introduction to computer architecture, covering the history, types of computers, and key concepts such as performance measures and processor operations. It distinguishes between general-purpose and embedded computers, outlines various architectures, and explains the role of components like the processor, memory, and buses. Additionally, it discusses the significance of interrupts in managing processor tasks and the basic principles of computer operation.

Uploaded by

macjade
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 32

An Introduction to

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.

They were classified into two main categories:


• Shared memory and
• Distributed memory systems.
• A computer come in different forms: Desktop, laptop, servers, etc.
• Inside the computer box, is the electronics that runs your software,
stores your information, and connects you to the world.
• It’s all about processing information.
• Designing a computer, therefore, is about designing a machine that
holds and manipulates data.
• Computer systems fall into essentially two separate
categories/types.
1. The desktop computer.
• When you say “computer” to someone, this is the machine that
usually comes to her mind.
2. The embedded computer,
• A computer that is integrated into another system for the purposes of
control and/or monitoring. Examples of embedded computers are:
• remote controls, washing machines, cell phones, air conditioners,
game consoles, ovens, toys, and a host of other devices
• The primary difference between an embedded machine and a general-
purpose computer is its application.
• This is reflected in the system design and their software.
• The basic principles of operation and the underlying architectures are
fundamentally the same.
• They both have a processor, memory, and often input and output.
• Desktop computers can run a variety of application programs, with system
resources orchestrated by an operating system. E.g word processor, play
music, database client or server.
• In contrast, the embedded computer is normally dedicated to a specific task
• In many cases, an embedded system is used to replace application-
specific electronics.
• The advantage of using an embedded microprocessor over dedicated
electronics is that the functionality of the system is determined by the
software, not the hardware.
• The embedded computer may or may not have an operating system, and
rarely does it provide the user with the ability to arbitrarily install new
software.
• The software is normally contained in the system’s nonvolatile memory,
unlike a desktop computer where the nonvolatile memory contains boot
software and (maybe) low-level drivers only.
PERFORMANCE MEASURES
• A user of a computer measures its performance based on the time taken to
execute a given job (program).
• On the other hand, an ICT engineer measures the performance of his system
by the total amount of work done in a given time.
• While the user considers the program execution time a measure for
performance, the ICT engineer considers the throughput a more important
measure for performance.
• A metric for assessing the performance of a computer helps comparing
alternative designs.
• Performance analysis should help answering questions such as how fast can a
program be executed using a given computer?
• In order to answer such a question, we need to determine the time taken by a
computer to execute a given job.
PERFORMANCE MEASURES
• We define the clock cycle time as the time between two consecutive
rising (trailing) edges of a periodic clock signal (Fig. 1.1).
• Clock cycles allow counting unit computations, because the storage of
computation results is synchronized with rising (trailing) clock edges.
• The time required to execute a job by a computer is often expressed
in terms of clock cycles.
PERFORMANCE MEASURES
• We denote the number of CPU clock cycles for executing a job to be
the cycle count (CC), the cycle time by CT, and the clock frequency by:
f = 1/CT
• The time taken by the CPU to execute a job can be expressed as:
Concepts
• A computer is a machine designed to process, store, and retrieve
data.
• Data may be numbers in a spreadsheet, characters of text in a
document, dots of color in an image, waveforms of sound, or the
state of some system, such as an air conditioner or a CD player.
• All data is stored in the computer as numbers.
• It’s easy to forget this when we’re deep in C code, contemplating
complex algorithms and data structures.
Concepts
• The computer manipulates the data by performing operations on the
numbers.
• Displaying an image on a screen is accomplished by moving an array
of numbers to the video memory, each number representing a pixel of
color.
• To play an MP3 audio file, the computer reads an array of numbers
from disk and into memory, manipulates those numbers to convert
the compressed audio data into raw audio data, and then outputs the
new set of numbers (the raw audio data) to the audio chip.
Concepts
• Everything that a computer does, from web browsing to printing, involves
moving and processing numbers.
• The electronics of a computer is nothing more than a system designed to hold,
move, and change numbers.
• A computer system is composed of many parts, both hardware and software.
• At the heart of the computer is the processor, the hardware that executes the
computer programs.
• The computer also has memory, often several different types in one system.
• The memory is used to store programs while the processor is running them, as
well as store the data that the programs are manipulating.
• The software controls the operation and functionality of the computer
• There are many software layers in the computer (Figure 1-1).
• A layer will only interact with the layers immediately above or below
it.
• Firmware is a software permanently
stored in the computer.

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.

• It requires memory (for program and data


storage), support logic, and at least one I/O
device ("input/output device") used to
transfer data between the computer and the
outside world
• A microprocessor (CPU)is a processor implemented (usually) on a single,
integrated circuit.
• A microcontroller is a processor, memory, and some I/O devices contained
within a single, integrated circuit, and intended for use in embedded systems.
• The memory of the computer system contains both the instructions that the
processor will execute and the data it will manipulate.
• The memory of a computer system is never empty.
• It always contains something, whether it be instructions, meaningful data, or
just the random garbage that appeared in the memory when the system
powered up.
Two main computer architectures
• Von Neumann machine: Instructions are read (fetched) from memory, while data is both read from and
written to memory, as shown in Figure 1-3.

• 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 "width" of a bus is the number of signal lines dedicated to transferring


information. For example, an 8-bit-wide bus transfers 8 bits of data in parallel.

• 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.

The internal data storage of the processor is known as its registers


Processor operation
• Basic components
– Input/output (I/O) unit
• Manages data and instructions entering and leaving the processor
– Control unit
• Manages all activities inside the processor
– One or more arithmetic logic units (ALUs)
• Performs all logical comparisons, calculations
Processor operation
• Basic components (cont’d)
– Registers
• Small holding areas on processor chip, works much like RAM
• Holds counters, data, instructions, and addresses that the ALU is currently
processing
– Internal memory caches (Level 1 (L1) cache, Level 2 (L2) cache, Level 3 (L3) cache).
• Holds data and instructions waiting to be processed by ALU
– Buses
• Connect components within the processor housing
Processor operation

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

You might also like