Comp-Arch-intro-2024
Comp-Arch-intro-2024
ECC 3214/3204
Semester 1 2024/2025
Email: [email protected]
2002-2006: PhD, UK
2006-2008: Lecturer
4
Course Outcomes (CO) and Learning Outcomes
(EAC/PO) ECC3214/ ECC 3204
Identify, formulate, research Recognise the need for, and
Apply knowledge of
literature and analyse complex Function effectively as an have the preparation and
mathematics, science,
engineering problems reaching individual, and as a member ability to engage in
engineering fundamentals and
substantiated conclusions or leader in diverse teams independent and life-long
an engineering specialization to
using first principles of and in multidisciplinary learning in the broadest
the solution of complex
mathematics, natural sciences setting context of technological
engineering problems
and engineering sciences change
EAC2 (C)
EAC1 (C) EAC 9 (A)/ PO11 (A) EAC12 (A)/PO14 (A)
Analyze complex
No CO Engineering Knowledge Teamwork and leadership Lifelong learning
engineering
Assessments Delivery Assessments Delivery Assessments Delivery Assessments Delivery
Differentiate various computer
1 architectures and its capability (WK, WP, Test 1 (10) Final exam (40)
C4)
Lecture/
Explain characteristics and complexity Lecture/ Talk Case study Case study Class Activities Case study
2 Case study
of modern computers (A3) presentation (10) (20)
5
Course Assessment Plan
EAC1 (C) EAC1 (C) EAC1 (C) EAC9 (A) EAC12(A) EAC2(C)
Wk 6 Wk 3- 12 Wk7-12 Wk9-12 Wk14 Wk16
Class Case study
Test 1 Assignment Case study Final exam
Activities presentatio
(10%) (10%) report (10%) (40%)
(20%) n (10%)
6
Course Overview
1. General computer architecture (Wk1)
2. Logic control and micro programming (Wk2-3)
Test 1
3. Computer Arithmetic (Wk4)
4. Computer Performance Analysis (Wk5)
5. Computer Microarchitecture (Wk6)
6. Instruction Level Parallelism (Wk7-8)
Final
7. Memory organization (Wk9-10)
Exam
8. Graphic Processing Unit (GPU) (Wk11)
9. Computer System Design (Wk12-13)
10.Latest Computer Architecture issues & technologies(Wk14)
7
Important Dates
Test 1 (handwritten) -18th November 2024
No class - 20th November 2024
No class - 25th December 2024 (Christmas)
No class- 1st Jan 2025 (New Year)
8
PutraBlast Portal
9
References
10
Give me related keywords to this course that you have
read/heard.
11
Primary Building Blocks of Computer Systems
Covered by
MicroProcessor
12
Architecture: What is
• Interface between the hardware & the lowest
levels of software (compilers & OS) Computer
• Model of the hardware
• Contract between the hardware & software
Architecture?
• An architecture is comprised of:
• instruction set design
• where data is located
• software conventions
• some portions of the microarchitecture
Microarchitecture (organization,
implementation): high level implementation
• components
• connections
13
Why separate
Architecture: architecture
• Interface between the hardware & the lowest
levels of software (compilers & OS) and
• model of the hardware implementation
• contract between the hardware & software
• An architecture is comprised of: (organization)?
• instruction set design
• where data is located
• software conventions
• some portions of the microarchitecture
Microarchitecture (organization,
implementation): high level implementation
• components
• connections
14
Differences between Computer Architecture
and Computer Organization
Computer Architecture Computer Organization
Architecture describes what the computer does. The Organization describes how it does it.
Computer Architecture deals with the functional Computer Organization deals with a structural
behavior of computer systems. relationship
It deals with high-level design issues. It deals with low-level design issues.
As a programmer, you can view architecture as a The implementation of the architecture is called
series of instructions, addressing modes, and registers. organization.
For designing a computer, its architecture is fixed first. For designing a computer, an organization is decided
after its architecture.
Computer Architecture is also called Instruction Set Computer Organization is frequently called
Architecture (ISA). microarchitecture.
Comprises logical functions such as instruction sets, Consists of physical units like circuit designs,
registers, data types, and addressing modes. peripherals, and adders.
15
Differences between Computer Architecture
and Computer Organization
Computer Architecture Computer Organization
The different architectural categories found in our CPU organization is classified into three categories
computer systems are as follows: based on the number of address fields:
It makes the computer’s hardware visible. It handles the segments of the network in a system.
The software developer is aware of it. It escapes the software programmer’s detection.
Examples- Intel and AMD created the x86 processor. Organizational qualities include hardware elements
Sun Microsystems and others created the SPARC that are invisible to the programmer, such as
processor. Apple, IBM, and Motorola created the interfacing of computer and peripherals, memory
PowerPC. technologies, and control signals.
16
Architecture: Why have
• Interface between the hardware & the lowest
levels of software (compilers & OS) different
• model of the hardware architectures?
• contract between the hardware & software
• An architecture is comprised of:
• instruction set design
• where data is located
• software conventions
• some portions of the microarchitecture
Microarchitecture (organization,
implementation): high level implementation
• components
• connections
17
Few criteria that influence the architecture of a computer.
Optimizing for some of the criteria will have a cost against some
other criteria. Why have
● Speed to execute sequences of operations different
● architectures?
Speed to execute sequential computations that require a lot of memory
● Speed to make parallelizable various types of computations
● Speed to make parallelizable memory-intensive computations
● Power consumption when idle
● Peak power consumption
● Ability to scale power consumption according to the amount of
computation at a given time
● Special-purpose computations (graphics processing, cryptography,
digital signal processing, …)
● Volume
● Design cost
● Per-unit manufacturing cost for large/small amounts
● Possibility to connect many peripherals
● Ability to execute tasks in real time, i.e. fine control over the execution
time of each operation (e.g. to control a physical object)
18
● Isolation between tasks (for robustness and security)
Role of Computer Architect
19
Evolution of Computer Architecture
ENIAC
20
2-nm Computer Architecture
21
Evolution of Computer Architecture
22
How NVIDIA is Defying Moore’s Law and
Dominating the GPU Market
Source:
https://netrouting.com/nvidia-surpassing-moores-law-gpu-innovation/#:~:text=NVIDIA's%20Architectural%20Innovatio 23
ns%3A&text=This%20strategic%20focus%20on%20innovation,significant%20milestone%20in%20GPU%20evolution
Computer Architecture Models
24
Computer Architecture Models
26
Main Component of Computer Systems
1. Central Processing Unit (CPU): The ‘brain’ of the computer, the component that actually
executes instructions.
2. Memory : It enables a computer to store, at least temporarily, data and programs.
3. Input device : Usually a keyboard or mouse is used to read data and programs into the
computer.
4. Output device: A display screen, printer, etc. that lets you see what the computer has
accomplished.
5. Mass storage device: It allows a computer to permanently store large amounts of data.
Common mass storage devices include disk drive and tape drive.
6. Memory: It also known as the primary storage or main memory - is a part of the
microcomputer that holds data and instructions. Part of the contents of the memory is held only
temporarily, that is, it is stored only as long as the microcomputer is turned on. When you turn
the machine off, the contents are lost.
7. Registers: Computers also have several additional storage locations called registers. These
appear in the Control Unit and ALU and make processing more efficient. Registers are a sort of
special hi-speed storage areas that hold data and instructions temporarily during processing.
They are parts of the Control Unit and ALU rather than the memory. Their contents can,
therefore be handled much faster than the contents of the memory.
8. Addresses: To locate the characters of data or instructions in the main memory, the computer 27
stores them in locations known as addresses. A unique number designates each address.
Functions of CPU, ALU and Control Units
General concepts
● The primary function of the Central Processing Unit is to
execute sequences of instructions representing programs,
which are stored in the Main Memory.
● CPU consists of the ALU and CU.
● To carry out its role the CPU must be an interpreter of a
set of instructions at machine language level.
● The CPU is significantly faster than the Main Memory, that
is it can read from or write in the CPU’s registers 5 to 10
times faster than it can read from or write in the Main
Memory (MM).
● Nowadays, VLSI technology tends to increase the CPU/
Main Memory speeds disparity.
● CPU communicates with I/O devices in much the same
way as it communicates with the Main Memory. The I/O
devices are associated with addressable registers called
I/O PORTS. The CPU can store or extract a word from I/O
PORTS (the OUTPUT and INPUT operations).
28
Program Execution Flow
1. The CPU transfers instructions and,
when necessary their input data, called
operands, from the Main Memory into
the registers of the CPU.
2. The CPU executes the instructions in
their stored sequence (one after
another) except when the execution
sequence is explicitly altered by a
branch instruction.
3. When necessary, the CPU transfers
results from the CPU registers into the
Main Memory.
CPU: Central processing unit
ALU: Arithmetic logic unit
PC: Program counter
29
Operations by CPU
1. Fetch Instruction: The CPU reads an
instruction from memory.
2. Interpret Instruction: The instruction is
decoded to determine what action is required.
3. Fetch Data: The execution of an instruction
may require reading data from memory or I/O
module.
4. Process data: The execution of an instruction
may require performing some arithmetic or
logical operation on data.
5. Write data: The result of an execution may
require writing data to memory or an I/O
module.
30
Program Execution Flow
1. The PC is a central component of the control unit.
2. The programs executed by the CPU are divided into
two broad groups: user programs and supervisor
programs.
3. The PC always contains the memory address of the
next instruction to be executed.
4. At the beginning of each instruction execution cycle,
the control unit (CU) reads the data word at the
memory address indicated by the PC and places it in
an internal register for decoding and execution.
5. The first word of an instruction contains an opcode.
Based on the opcode bit pattern, the CU may read
additional memory locations following the opcode to
retrieve data needed by the instruction, such as a
memory address or data operand.
6. Following a reset, the PC contains the initial instruction
Instruction execution flow
location. The control unit fetches the first instruction
from memory and decodes it. During decoding, the
control unit determines the actions required by the
instruction. 31
CPU Bus Connection
The CPU is connected to the rest of the system through system bus. Through system bus, data or
information gets transferred between the CPU and the other component of the system. The system
bus may have three components:
1. Data Bus: Data bus is used to transfer the data between main memory and CPU.
2. Address Bus: Address bus is used to access a particular memory location by putting the
address of the memory location.
3. Control Bus: Control bus is used to provide the different control signal generated by CPU to
different part of the system. As for example, memory read is a signal generated by CPU to
indicate that a memory read operation has to be performed. Through control bus this signal is
transferred to memory module to indicate the required operation.
32
Internal CPU Bus
1. There are three basic components of CPU: register bank, ALU and Control Unit.
2. There are several data movements between these units and for that an internal CPU bus is
used.
3. Internal CPU bus is needed to transfer data between the various registers and the ALU, because
the ALU in fact operates only on data in the internal CPU memory.
33
Computer Architecture Models
34
Computer Architecture Models
35
Control Unit
Functions of CU
● The control unit directs the entire computer system to carry out stored program instructions.
● The control unit must communicate with both the arithmetic logic unit (ALU) and main memory.
● The control unit instructs the arithmetic logic unit that which logical or arithmetic operation is
to be performed.
● The control unit coordinates the activities of the other two units as well as all peripherals and
auxiliary storage devices linked to the computer.
36
CU
Design of CU
Two major types of Control Unit are:
1. Hardwired Control :
The control logic is implemented with gates, flip flops, decoders, and other digital circuits
+ Fast operation, - Wiring change(if the design has to be modified)
-More control signals required by CPU; more complex will be the design of CU.
-Modifications in control signal are very difficult. That means it requires rearranging of wires in
the hardware circuit.
-It is difficult to correct mistake in original design or adding new feature in existing design of
CU.
2. Microprogrammed Control :
The control information is stored in a control memory, and the control memory is programmed
to initiate the required sequence of microoperations
+ Any required change can be done by updating the microprogram in control memory,
- Slow operation
37
Comparison between Hardwired and
Microprogrammed CU
38