X H R
Course Document
Computer Architecture
Mr. A. LAHMISSI - January 2025
1
H
1. Ce cours constitue un premier apport à la bonne compréhension de l’architecture
interne et le fonctionnement d’un ordinateur
2. Le processeur (CPU), la mémoire, et l’interaction CPU-Mémoire sont étudiés
dans leurs aspects architecturaux et fonctionnels
3. Des outils de programmation (Langage assembleur, code machine) sont
également étudiés
La matière a pour objectif de mettre en clair le principe de
fonctionnement de l’ordinateur avec une présentation détaillée de
son architecture en s’appuyant sur un microprocesseur courant.
2
X R
1 Introduction
2 Basic Synoptic Diagram of Computing Machines
3 “Von Neumann” Machine
4 ‘’Harvard’’ Machine
5 “Harvard” Machine vs “Von Neumann” Machine
6 Nowadays Computing Machines
7 Conclusion
8 Questions
9 References and Books
3
H
INFORMATION AUTOMATIQUE
INFORMATIQUE
The word « Computer » was
first created by the german
Engineer Karl Steinbuch
in 1955,
PHILIPPE DREYFUS
Was the first person who who gave the
translation to Franche « informatique »
In 1962
The word « informatik » was first created
by the german Engenier Karl Steinbuch
in 1957,
Karl Steinbuch completed the first
European fully transistorized computer,
4
H
INFORMATICS: is synonymous to Automatic Information Processing.
A COMPUTER : is a Programmable electronic machine used for processing information
coded in digital form. It Receives / Processes / Stores / Transmits Information.
AN AUTOMATON : is a device that autonomously reproduces a sequence of predetermined
actions without human intervention.
Output
Receive Process
Store
1- It can receive input data « fonction acquisition ».
2- It can store input data « fonction sauvegarde ».
3- It can perform operations from a program « fonction traitement ».
4- It can provide output results « fonction de transmission à la sortie ».
5
H
MATERIAL ASPECT (Hardware) :
All the components, devices, accessories, etc. that constitute the computer
SOFTWARE ASPECT (Software) :
All the programs that allow the exploitation of the MATERIAL ASPECT.
6
H
ASPECT
SOFTWARE
ARCHI 2 !! MATERIAL
concerns the organization of the different ASPECT
physical devices of computer
(OPERATION + COMMUNICATION)
7
H
ENIAC (Electronic Numerical Thermionic valve Relay
Integrator And Computer)
18000 1500
Resistance Capacitors
70000 10000
170 m2 !!
8
H
HARDWARE ASPECT
INPUT UCT OUTPUT
UNIT (CPU) UNIT
Keyboard General Pupose Registers Screen
Mouse Status Register Printer
Scanner Instruction Pointer (IP)
UAL (ALU)
UCC
PRIMARY SECONDARY
MEMORY MEMORY
SRAM
HD
DRAM
Flash Disk
ROM
SSD
9
H
Memory
RAM ROM Storage memory
Hard Disk
SRAM DRAM EPROM EEPROM SSD
Flash
CDROM, DVD
SRAM and DRAM are two types of RAMs. SRAM i.e., static RAM is RAM in which
data is stored in transistors in the form of voltage.
DRAM i.e., dynamic RAM is RAM in which data is stored in capacitors in the form
of electric charges.
The SRAM is faster and expensive whereas DRAM is slower and less expensive.
SRAM is used as cache memory whereas DRAM is used as main memory in
computer systems.
10
H
SRAM DRAM
it stores information as long as the power is supplied. it stores information as long as the power is supplied or a
few milliseconds when the power is switched off.
Transistors are used to store information in SRAM. Capacitors are used to store data in DRAM.
Capacitors are not used hence no refreshing is required. To store information for a longer time, the contents of the
capacitor need to be refreshed periodically.
SRAM is faster compared to DRAM. (high data transfer rate) DRAM provides slow access speed. (lower data transfer rate)
It does not have a refreshing unit. It has a refreshing unit.
These are expensive. These are cheaper.
SRAMs are low-density devices. DRAMs are high-density devices.
bits are stored in voltage form. bits are stored in the form of electrical charges.
These are used in cache memories. These are used in main memories.
Consumes less power and generates less heat. Uses more power and generates more heat.
SRAMs has lower latency DRAM has more latency than SRAM
SRAM is used in high-speed cache memory DRAM is used in lower-speed main memory.
SRAM is used in high performance applications DRAM is used in general purpose applications
latency = in Computing, is the delay before a transfer of data begins following an instruction.
11
H
Current computers are all based on improved versions of this
architecture
‘’Core i3, i5, i7, …’’
12
H
Memory
Control Unit Arithmetic Logic
UCC Unit
(UAL)
Acc
I/O
13
H
1 Memory (Main)
C 3
P Control Unit
(UCC)
Arithmetic Logic Unit
(ALU)
U 2 Accumulator (Acc)
Input Output
4
14
H
Memory
Control Unit Arithmetic Logic Unit
UCC (UAL)
Acc
I/O
15
H
Memory
Control Unit Arithmetic Logic Unit
UCC (UAL)
Acc
I/O
Memory: Program (Instructions) + Data –
Memory: Set of Addresses
Sequential Execution (unless modified)
UAL: Perform basic arithmetic (+, *, …) and logical (AND, OR, …) operations
UCC : Responsible for “sequencing” operations
I/O: Interfaces for interacting with the outside world (peripheral)
16
H
Memory
Control Unit Arithmetic Logic Unit
UCC (UAL)
Acc
I/O
RAM (Random Access Memory - Volatile Memory): Information during
operation + loses its content when no longer powered + Read/Write
ROM (Read Only Memory– Non volatil Memorye) : Informations de base de la
machine, cette mémoire le disparait pas à la mise hors tension + Lecture seule
17
H
Memory
Control Unit Arithmetic Logic Unit
UCC (UAL)
Acc
Bus
A bus is a set of wires (electrical conductors) that ensures I/O
the transmission of binary information between the elements
of the computer.
18
H
1 Memory
C
P Control Unit
3
Arithmetic Logic Unit
2
(UCC) (UAL)
U Accumulator (Acc)
Input Output
4
19
H
Program Memory Data Memory
C
P Control Unit
(UC)
Arithmetic Logic Unit
(UAL)
U Accumulator (Acc)
Input Output
20
H
Program memory Data memory
C
P Control Unit
UC
Arithmetic Logic Unit
(UAL)
U Acc
I/O
Data memory and program memory are physically separated
Access to each of the two memories is via two separate buses
Allows data and instructions to be transferred simultaneously
21
H
Difference Von Neumann Harvard
Memory System Single memory Two memories
Bus System Single bus Two bus
Instruction Two clock cycles Single clock cycle
Traitment
Hardware Less material More material
Configuration
Cost Acceptable Expensive
22
H
Processeurs multiples (multi-core processor)
Memory
UC UC UC
UAL UAL UAL
I/O
23
H
Cache memory
Memory
RAM is fast, but the microprocessor is even
faster! In order not to limit its performance by
forcing it to wait, small memory units are used, Cache memory 2
much faster, but much more expensive!
These cache memories are used to store
frequently consulted information for a short Cache memory 1
time. They have a very high speed, and a high
cost for a low storage capacity.
CPU
24
H
multi-cœurs + mémoires cache
Mémoire
Mémoire Mémoire Mémoire
cache 1 cache 2 cache n
CPU-1 CPU-2 CPU-n
25
H
Memory
Control Unit Arithmetic Logic Unit
UCC (UAL)
Acc
I/O
26
27