30f7ae3funit 201 20 - 20jatin 20sir 20 28PSM 29 20COA 20slides
30f7ae3funit 201 20 - 20jatin 20sir 20 28PSM 29 20COA 20slides
Architecture
Course Code: CO206
1
Objective
2
Course Description(Module-wise)
3
Detailed Syllabus
4
Recommended Reading Material
Text Books:
1. Patterson, Computer Organization and Design, Elsevier Pub,2009
2. Morris Mano, Computer System Architecture, PHI
3. William Stalling, Computer Organization, PHI
Reference Books:
1. Vravice, Hamacher&Zaky, Computer Organization, TMH
2. Tannenbaum, Structured Computer Organization, PHI
5
Evaluation Criteria
Component Description
Credits 4
Contact Hours Theory: 3 Hours Tutorial: 1 Hours
Relative Weightage CWS: 25 MTE: 25 ETE: 50
Total 100
6
Contents of Module 1
Digital computer generation
Computer types and classifications
Functional units and their interconnections
Bus architecture
Types of buses and bus arbitration
Register transfer language
Data movement around registers
Data movement from/to memory
Arithmetic and logic micro-operations
Concept of bus and timing in register transfer
7
Preface
Who is generally known as “Father of Digital Computers”?
Charles Babbage.
What is a Computer?
It is an electronic device that takes some input, process it and gives some output.
9
Digital Computer Generation
Typical Speed
Approximate
Generation Dates Technology (operations per second)
1 1946–1957 Vacuum tube 40,000
2 1958–1964 Transistor 200,000
3 1965–1971 Small and medium scale
1,000,00
0 integration
4 1972–1977 Large scale integration 10,000,000
5 1978–1991 Very large scale integration 100,000,000
6 1991- Ultra large scale integration 1,000,000,000
10
First Generation-Vacuum Tubes (1946-1957)
11
Second Generation-Transistors (1958-1964)
12
Third Generation-Small and Medium Scale Integration (1965-1971)
13
Later Generation
14
Computer types and classification
15
Von Neumann Architecture
In 1946, von Neumann and his
colleagues began the design of a
new stored program Computer
Also referred to as the IAS
computer, at the Princeton
Institute for Advanced Studies.
The IAS computer, although not
completed until 1952, is the
prototype of all subsequent
general-purpose computers.
17
Components in Von Neumann Architecture
Accumulator (AC) and • Employed to temporarily hold operands and results of ALU operations
Multiplier quotient (MQ)
• Contains a word to be stored in memory or sent to the I/O unit
Memory buffer register (MBR) • It is used to receive a word from memory or from the I/O unit
Instruction buffer register (IBR) • Employed to temporarily hold the right-hand instruction from a word in memory
Program counter (PC) • Contains the address of the next instruction pair to be fetched from memory
Memory address register • Specifies the address in memory of the word to be written from or read into the MBR
(MAR)
Instruction register (IR) • It is used to hold the instructions that is currently being executed
18
Von Neumann Architecture Vs. Harvard Architecture
19
Von Neumann Architecture Vs. Harvard Architecture
20
Von Neumann Bottleneck/Memory Wall
Because of the stored program architecture of the Von-Neumann
Machine, the processor performance is tightly bound to the memory
performance.
We need to access memory at least once per cycle to read an
instruction, the processor can only operate as fast as the memory.
This is sometimes known as Von Neumann bottleneck or Memory wall.
21
Functional Units and their Interconnections
22
Source: Computer Organisation and Architecture, Tenth Edition, by William Stallings
Bus
A group of wires that connects two or more hardware devices for
communication is called a BUS.
It can be a cable or printed in circuit.
It reduces the number of pathways between interconnecting hardware
components
A bus that connects the major components with CPU i.e. memory & I/O is
called System Bus.
The term “width” is used to refer the number of bits that a bus can transmit
at once
23
Some major functions of Bus in Computers
Data transfer
Addressing
Timing/Synchronization
Power
24
Bus Architecture
25
Types of Bus(on the basis of contents)
Data Bus
Address Bus
Control Bus
26
Memory Components
0
27
Data Bus (Data Lines)
Carries data throughout the system
These are bi-directional lines
Width is a key factor.
It determines the number of bytes that can be transferred in one
cycle and hence the overall performance of the system.
28
Address Bus (Address Lines)
Designate source or destination of data on the bus
It is an unidirectional bus.
Width determines the maximum possible memory capacity of
the system.
Also used to address I/O ports
High order bits selects a particular module
Lower order bits select a memory location or I/O port within the memory
29
Control Bus (Control Lines)
Used to provide synchronization between CPU and other
system components
Control lines include
Memory read and Memory write
I/O read and I/O write
Transfer Acknowledgment
Bus request and bus grant
Interrupt request and interrupt acknowledgement
Clock
Reset
30
Representation of Data in Memory
If we need to store a
data=11234567 in the MSB(Most Significant Bits) LSB(Least Significant Bits)
memory then its
representation can be done 11234567
in two ways
Big Endian
MSB will be stored first
Intel, ARM processors
Little Endian
LSB will be stored first
Motorola, PowerPC, SPARK
31
Types of Bus (on the basis of number of bus)
Bus Structure
32
Single Bus Structure
33
Multiple Bus Structure
34
Bus Arbitration
The device which is allowed to initiate the data transfer on the
bus at any given point of time is called the BUS MASTER.
In computer system, there may be more than one bus master
such as processor, DMA controller etc. They share the system
bus.
When one master relinquish control of the bus, another bus
master can acquire the control of the Bus.
Bus Arbitration refers to the transfer of control of bus from
one master to another.
35
Important terminology in Bus Arbitration
Bus Master
A controller who has currently access to the bus
Bus Arbiter
It decides who would become the next bus master
Bus Request(BRQ)
It is used by a module to request the control of the bus
Bus Grant(BGT)
It is signal which indicates that the access to the bus is
granted
36
Types of Bus Arbitration
Centralised Arbitration
Bus
Single hardware device controlling Arbitration
the bus access.
May be part of CPU or separate
Centralised Distributed
Distributed Arbitration
Any module may claim the bus Daisy Independent
Polling
Chaining Request
Access control logic is on all
modules
Modules work together to control
bus 37
Daisy Chaining method
38
Daisy Chaining method
It is simple and cheaper method
All masters make use of the same line for bus request
In response to a bus request, the controller sends a bus grant
signal if the bus is free.
The bus grant signal propagates through each master until it
reaches the device which has requested the access to the bus.
The requesting master blocks the propagation of the bus
grant signal, activates the busy line and gains control of the
bus.
Any other master requesting module will not receive the
grant signal and hence cannot get bus access.
39
Daisy Chaining method
Advantages
It is simple and cheaper method
It requires least number of lines
Independent of the number of masters in the system
Disadvantages
Propagation delay is proportional to number of masters in the
system
Slow arbitration time
Priority is based on the physical location
Failure of any one master may cause the failure of whole system
40
Polling or Rotating Priority Method
41
Polling or Rotating Priority Method
The controller is used to generate the addresses for the master.
The number of address line required depends on the number of
master connected in the system.
For example, if there are 8 masters connected in the system, at
least three address lines are required.
In response to the bus request, controller generates a sequence
of master address.
When the requesting master recognizes its address, it activates
the busy line and begins to use the bus.
42
Polling or Rotating Priority Method
Advantages
The priority can be changed by altering the polling
sequence stored in the controller
Fast arbitration
If one of the module fails, entire system does not fail
Disadvantages
Increasing the size will require more number of address
lines
43
Independent Request or Fixed Priority method
44
Independent Request or Fixed Priority method
In this scheme each master has a separate pair of bus
request and bus grant lines
45
Independent Request or Fixed Priority method
Advantages
Due to separate pairs of bus request and bus grant signals,
arbitration is fast and is independent of the masters in the
system
Very less chance of failure
Disadvantages
It requires more bus request and grant signals
Costlier
Chance of starvation
46
Distributed Arbitration
In distributed arbitration, all devices participate in the selection of the next bus
master.
In this scheme each device on the bus is assigned a 4-bit identification number.
When one or more devices request for the control of bus, they assert the start-
arbitration signal and place their 4-bit ID numbers on arbitration lines, ARB0 through
ARB3.
These four arbitration lines are all open-collector. Therefore, more than one device
can place their 4-bit ID number to indicate that they need to control of bus.
In this method, the device having highest ID number has highest priority.
When two or more devices place their ID number on bus lines then it is necessary to
identify the highest ID number from the status of bus line.
The decentralized arbitration offers high reliability because operation of the bus is
not dependent on any single device.
47
Distributed Arbitration example
Consider that two devices A and B, having ID number 1 (0001) and 6(0110),
respectively are requesting the use of the bus.
Device A puts the bit pattern 0001, and device B puts the bit pattern 0110. With this
combination the status of bus-line will be 1000(for instance, XNOR of the bits);
however because of inverter buffers, code seen by both devices is 0111.
Each device compares the code formed on the arbitration line to its own ID, starting
from the most significant bit. If there is a match, the output bit remains same but If it
finds the difference at any bit position, it disables its drives by placing a 0 at that bit
position as well as for all following lower-order bits
In our example, device A detects a difference on line ARB2 and hence it disables its
drives on line ARB2, ARB1 and ARB0. Thus, it’s codes becomes 0000. Device B detects
a difference on line ARB0 and hence it disables its drives on line ARB0. This causes the
code on the arbitration lines to change to 0110. Device B is having highest number
which means that device B has won the race.
48
Distributed Arbitration example
49
Digital Systems
51
Register Transfer Language (RTL)
Rather than specifying a digital system in words, a specific
notation is used which is called Register Transfer Language
For any function of the computer, the register transfer
language can be used to describe the sequence of micro-
operations
A Register Transfer Language is
A symbolic language
a convenient tool for describing the internal organization of
digital computers
Can also be used to facilitate the design process of digital
system
52
D esignation of R egisters
Registers are designated by capital letters, sometimes followed by
numbers (e.g., A, R13, IR)
Often the names indicate function:
MAR - memory address register
PC- program counter
IR- instruction register
Registers and their contents can be viewed and represented in various
ways
H-High Byte
L-Low Byte
53
Registers Transfer
Copying the contents of one register to another is a register transfer
A register transfer is indicated as
R2 R1
54
Registers Transfer
A register transfer such as
R3 R5
55
Registers Transfer
Often actions need to performed only if a certain condition is true
Similar to an “if” statement in a programming language
In digital systems, this is often done via a control signal, called a
control function
If the signal is 1, the action takes place
This is represented as:
P: R2 R1
Which means “if P = 1, then load the contents of register R1 into register
R2”, i.e., if (P = 1) then (R2 R1)
56
Registers Transfer & Timing Diagram
57
Basic symbols for register transfer
58
Data movement around registers
In a digital system with many registers, it is impractical to have data and
control lines to directly allow each register to be loaded with the
contents of every possible other registers
To completely connect n registers n(n-1) lines
O(n2) cost
This is not a realistic approach to use in a large digital system
Instead, take a different approach
Have one centralized set of circuits for data transfer – the bus
Have control circuits to select which register is the source, and which is
the destination
59
Data movement around registers using Bus
60
Data movement from Register to Bus
From a register to bus: BUS R
Register A Register B Register C Register D
Bus lines
B1 C 1 D 1 B2 C2 D 2 B3 C 3 D 3 B4 C 4 D 4
0 4 x1 0 4 x1 0 4 x1 0 4 x1
MUX MUX MUX MUX
x
select
y
4-line bus
61
What is Multiplexer (MUX)?
Also called data selectors.
Basic function: select one of its 𝒏 data input lines and place the
corresponding information onto a single output line.
input bits needed as selection to specify which input line is to be
selected.
Place binary code for a desired data input line onto its select input lines.
62
What is Decoder?
A decoder has
n inputs
2n outputs
A decoder selects one of 2n outputs by decoding the binary value on the n
inputs
Exactly one output will be active for each combination of the inputs.
63
Data movement from Register to Bus
From a bus to register: Bus R
64
Data movement from Bus to Register
From a bus to register: R BUS
65
Data movement from/to Memory
The memory is viewed as a device, M at the register level.
Since it contains multiple locations, we must specify which address in
memory we will be using
This is done by indexing memory references
Memory is usually accessed in computer systems by putting the desired
address in a special register, the Memory Address Register (MAR, or AR)
When memory is accessed, the contents of the MAR is sent to the
memory unit’s address lines
66
Data Transfer from Memory to Register
To read a value from a location in memory and load it into a register, the
register transfer language notation looks like this:
R1 M[MAR]
This causes the following to occur
The contents of the MAR is sent to the memory address lines
A Read= 1 signal is sent to the memory unit
The contents of the specified address are put on the memory’s output
data lines
The contents is sent over the bus to be loaded into register R1
67
Data Transfer from Memory to Register
68
Data Transfer from Register to Memory
To write a value from a register to a location in memory, it is represented
in register transfer language as:
M[MAR] R1
This causes the following to occur
The contents of the MAR is sent to the memory address lines
A Write (= 1) gets sent to the memory unit
The values in register R1 is sent over the bus to the data input lines of
the memory
The values get loaded into the specified address in the memory
decoder selects one of2N outputs by decoding the binary value on the
N inputs
69
Data Transfer from Register to Memory
70
Summary of Register Transfer micro-operations
AB Transfer content of register B into register A
ABUS R1, R2 ABUS Transfer content of R1 into bus A and, at the same time, Transfer content of bus A into R2
M Equivalent to M[MAR]
MDR M Memory read operation: transfers content of memory word specified by MAR into MDR
M MDR Memory write operation: transfers content of MDR into memory word specified by MAR
71
Arithmetic Micro-Operations
72
Half Adder
Adding two single-bit binary values, X, Y and produces a sum bit S and a carry out C-
out bit.
73
Full Adder
Adding two single-bit binary values, X, Y along with a carry input bit C-in and
produces a sum bit S and a carry out C-out bit.
74
Binary Adder/Subtractor/Incrementer
75
Hardware for Binary Adder/Subtractor/Incrementer/Decrementer
76
Truth Table for Binary Adder/Subtractor/Incrementer/Decrementer
77
Summary of Arithmetic Micro-Operations
R3 R1 + R2’+ 1 Subtraction
R1 R1 + 1 Increment
R1 R1 - 1 Decrement
78
Logic Micro-Operations
Specify binary operations on the strings of bits in registers
Logic micro-operations are bit-wise operations, i.e., they work on the
individual bits of data
Useful for bit manipulations on binary data
Useful for making logical decisions based on the bit value
There are, in principle, 16 different logic functions that can be defined
over two binary input variables
80
Summary of Logic Micro-Operations
Truth tables for 16 functions of 2 variables and the corresponding 16 logic micro-operations
81
Applications of Logic Micro-Operations
Logic micro-operations can be used to manipulate individual bits or a portions of a
word in a register
Consider the data in a register A. Another register, B will be used to modify the
contents of A
Selective-set AAB
Selective-complement AAB
Selective-clear A A B’
Mask (Delete) AAB
Clear AAB
Insert A (A B) C
82
Selective Set
1100 At
1010 B
1110 At+1 (A A B)
If a bit in B is set to 1, that same position in A gets set to 1,
otherwise that bit in A keeps its previous value
83
Selective Complement
1100 At
1010 B
0110 At+1 (A A B)
If a bit in B is set to 1, that same position in A gets
complemented from its original value, otherwise it is unchanged
84
Selective Clear
1100 At
1010 B
0100 At+1 (A A B’ )
If a bit in B is set to 1, that same position in A gets set to 0,
otherwise it is unchanged
85
Mask Operation
1100 At
1000 B
1000 At+1 (A A B)
If a bit in B is set to 0, that same position in A gets set to 0,
otherwise it is unchanged
86
Clear Operation
1100 At
1010 B
0110 At+1 (A A B)
87
Insert Operation
An insert operation is used to introduce a specific bit pattern into A register, leaving the
other bit positions unchanged
This is done as
A mask operation to clear the desired bit positions, followed by
An OR operation to introduce the new bits into the desired positions
Example: Suppose you wanted to introduce 1010 into the low order four bits of A:
1101 1000 1011 0001 A (Original)
1101 1000 1011 1010 A (Desired)
88
Logical Shift
89
Circular Shift
90
Hardware for Shift Micro-Operation
91
Arithmetic Shift
92
Logical Vs. Arithmetic Shift
93
Hardware for Arithmetic –Logic Shift Micro-Operation
94