Student Profile Sample - We help schools to connect the data they have, with ...
Lecture 1
1. Computer Architecture
EE222 (A)
Summer 2010
Pre-requisite: Logic Design (EE221)
EE-222 Computer Architecture
Muhammad Bilal Saif 1
2. Books
• Text Book
– Computer System Architecture (3rd edition), by
Morris Mano
• Reference Books :
– Computer System Design and Architecture (2nd
Edition), V. P. Heuring, and H.F. Jordan
– Computer Architecture and Organization (3rd
edition) by John P. Hayes
EE-222 Computer Architecture
Muhammad Bilal Saif 2
3. Course Objective
• To learn the
– basics of computer components
• Registers
• ALU
• DMA
• Memory types
• etc.
– Operation of components of computer
• During the course we shall not be considering any
specific design but we shall be considering
general design, which is mostly true for all
designs.
EE-222 Computer Architecture
Muhammad Bilal Saif 3
4. Course Contents
• This course shall cover the following main topics
– microcomputer
– microprocessor register
– ALU design
– control unit design
– instruction cycle
– memory types
– Read/Write cycles
– memory mapping
– address decoding
– address decoder design
– Interrupts
– Polling
– I/O devices interfacing
– DMA
– bus arbitration
– introduction to CISC/RISC architecture
EE-222 Computer Architecture
Muhammad Bilal Saif 4
5. Course Grading
• Class Quizzes (9% surprise + 21% announced) 30%
• Assignments 5%
• Class participation 5%
• Mid term exam 25%
• Final Comprehensive Exam 35%
EE-222 Computer Architecture
Muhammad Bilal Saif 5
6. Quizzes
• There shall be seven announced quizzes
during the semester.
• Quizzes shall not be rescheduled for any body
in any case.
EE-222 Computer Architecture
Muhammad Bilal Saif 6
7. Quizzes schedule
Quiz No. Week and Date
1 Week – 02
17th June 2010 (Thursday)
2 Week – 03
23rd June 2010 (Wednesday)
3 Week – 04
30th June 2010 (Wednesday)
4 Week – 05
7th July 2010 (Wednesday)
5 Week – 06
14th July 2010 (Wednesday)
6 Week – 07
21st July 2010 (Wednesday)
7 Week – 08
28th July 2010 (Wednesday)
Time: 7:00 pm (In case of change, new time shall be announced)
Venue: MLH EE-222 Computer Architecture
Muhammad Bilal Saif 7
8. website
• Course website
– http://192.168.1.32
• From website you can
– Get lectures
– Check your attendances (Most probably
attendance shall not be displayed on notice
board)
EE-222 Computer Architecture
Muhammad Bilal Saif 8
10. Computer
• The term computer is in use from mid 17th
century, literally meaning “one who
computes” (one is usually person performing
mathematical calculations) [1]
• Now-a-day:
A computer is a machine that manipulates
data according to a set of instructions.
[1] http://en.wikipedia.org/wiki/Human_computer
EE-222 Computer Architecture
Muhammad Bilal Saif 10
11. Computer
• Tell that whether the following devices are
computer or not.
– AND, OR gate IC
– Digital clock
– ATM machine
– Calculator
– Abacus
– Register IC
– Keyboard
– Mouse
EE-222 Computer Architecture
Muhammad Bilal Saif 11
12. Computer
• Presently most widely accepted definition of computer
is
• “A device that computes, especially a programmable
electronic machine that performs high-speed
mathematical or logical operations or that assembles,
stores, correlates, or otherwise processes information.”
(Answer.com)
• According to the above definition, computer should
have the following parts.
1. Processor
2. Input output devices
3. Memory
4. Storage (optional)
EE-222 Computer Architecture
Muhammad Bilal Saif 12
13. Architecture
• What is architecture??
• Why should be we aware of the computer
architecture????????
Computer architecture should be known to increase the yield (instruction/sec) of
the computer
EE-222 Computer Architecture
Muhammad Bilal Saif 13
14. Chapter – 04
REGISTER TRANSFER AND
MICROOPERATION
EE-222 Computer Architecture
Muhammad Bilal Saif 14
15. Chapter 4
Register Transfer and Microoperations
• 4-1 Register Transfer Language
• 4-2 Register Transfer
• 4-3 Bus and Memory Transfer
• 4-4 Arithmetic Microoperations
• 4-5 Logic Microoperations
• 4-6 Shift Microoperations
• 4-7 Arithmetic Logic Shift Units
EE-222 Computer Architecture
Muhammad Bilal Saif 15
16. Register Transfer Language (RTL)
• Combinational and sequential circuits (learned in logic
design) can be used to create simple digital systems.
• These are too basic to design a digital computer.
• To overcome this problem digital systems are
frequently characterized in terms of
– the registers they contain, and
– the operations that can be performed on registers data.
• RTL: a language for describing the behavior of
computer in terms of step-wise register contents.
EE-222 Computer Architecture
Muhammad Bilal Saif 16
17. Microoperations
• The operations executed on the data stored in
registers are called microoperations.
• Operands can be in one or more registers.
• The functions built into registers are examples of
microoperations
– Shift
– Load
– Clear
– Increment
– …
e.g. a bidirectional shift register is capable of performing the shift right and shift
left microoperations EE-222 Computer Architecture
Muhammad Bilal Saif 17
18. An elementary operation performed (during
one clock pulse), on the information stored
in one or more registers
b
a
sel_a 1 clock cycle
Registers ALU
sel_b
sel_c (R) (f)
c
Rd f(R1, R2) or Rd f(R1) or Rd f(Rd)
f: shift, load, clear, increment, add, subtract, complement,
and, or, xor, …
EE-222 Computer Architecture
Muhammad Bilal Saif 18
19. ORGANIZATION OF A DIGITAL SYSTEM
• Internal hardware organization of digital
computer can be best explained by
– Set of registers and their functions
– Set of allowable microoperations provided by the
organization of the computer
– Control signals that properly perform the
microoperations
EE-222 Computer Architecture
Muhammad Bilal Saif 19
20. Register Transfer Language (RTL)
• Rather than specifying a digital system in words, a
specific notation is used, register transfer language
• For any function of the computer, the register
transfer language can be used to describe the
(sequence of) microoperations
• Register transfer language
– 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 systems.
EE-222 Computer Architecture
Muhammad Bilal Saif 20
21. Hardware required for microoperation
• The term “Register transfer” implies the
availability of hardware logic circuit that can
perform a stated microoperation and transfer
the result of operation to the same or another
register.
R1 R1 + R 2
Above statement of RTL specifies that system has circuit to perform addition
and then saving the result in R1
EE-222 Computer Architecture
Muhammad Bilal Saif 21
22. Chapter 4
Register Transfer and Microoperations
• 4-1 Register Transfer Language
• 4-2 Register Transfer
• 4-3 Bus and Memory Transfer
• 4-4 Arithmetic Microoperations
• 4-5 Logic Microoperations
• 4-6 Shift Microoperations
• 4-7 Arithmetic Logic Shift Units
EE-222 Computer Architecture
Muhammad Bilal Saif 22
23. Register Designation
• 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
– A register can be viewed as a single entity:
MAR
– Registers may also be represented showing the bits of data they contain
7 6 5 4 3 2 1 0
EE-222 Computer Architecture
Muhammad Bilal Saif 23
24. Register Designation
• Designation of a register
- a register
- a bit of a register
- portion of a register
• Common ways of drawing the block diagram of a register
Register Showing individual bits
R1 7 6 5 4 3 2 1 0
15 0 15 8 7 0
R2 PC(H) PC(L)
Numbering of bits Subfields
EE-222 Computer Architecture
Muhammad Bilal Saif 24
25. REGISTER TRANSFER
• Copying the contents of one register to another is a register
transfer
• A register transfer is indicated as
R2 R1
– In this case the contents of register R1 are copied
(loaded) into register R2
– A simultaneous transfer of all bits from the source R1
to the destination register R2, during one clock pulse
– Note that this is a non-destructive; i.e. the contents of
R1 are not altered by copying (loading) them to R2
EE-222 Computer Architecture
Muhammad Bilal Saif 25
26. CONTROL FUNCTIONS
• Often actions need to only occur if a certain condition is true
• This is 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, otherwise
not
• 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)
P can be considered as control signal generated in the control section.
EE-222 Computer Architecture
Muhammad Bilal Saif 26
27. HARDWARE IMPLEMENTATION OF
CONTROLLED TRANSFERS
Implementation of controlled transfer
P: R2 R1
Block diagram Control P Load
R2 Clock
Circuit n
Load
0 R1
Timing diagram
t t+1
Clock
Load
Transfer occurs here
Registers and control circuit are positive-edge-triggered
EE-222 Computer Architecture
Muhammad Bilal Saif 27
28. Example
• Write such a RTL statement which shows that
the transfer from register Y to register Z shall
only occur when A and B are both low.
• Also draw the block diagram of the RTL
statement found in the above part.
• Write another RTL statement which shows
that the transfer from register Y to register Z
shall occur only when either A or B is one; nor
when both are zero or one.
EE-222 Computer Architecture
Muhammad Bilal Saif 28
29. SIMULTANEOUS OPERATIONS
• If two or more operations are to occur
simultaneously, they are separated with commas
P: R3 R5,, MAR IR
• Here, if the control function P = 1, load the contents
of R5 into R3, and at the same time (clock), load the
contents of register IR into register MAR
For above stated simultaneous operation, two buses are required
EE-222 Computer Architecture
Muhammad Bilal Saif 29
30. SIMULTANEOUS OPERATIONS (Contd.)
• Consider the following simultaneous
operation
T: R2R1, R1 R2
• For such operations; in addition to two buses,
registers with edge triggered flip-flops are also
required.
EE-222 Computer Architecture
Muhammad Bilal Saif 30
31. Practice
• Tell how many buses are required in the
following examples and whether edge
triggered phenomenon is essential or not
1. P: R1 R2
2. T: R1 R2, R3 R2
3. S: R1 R5, R2 R4
4. R: R1 R2, R3 R1
Edge triggering becomes essential, if a register is source and destination at the
same time
EE-222 Computer Architecture
Muhammad Bilal Saif 31
32. BASIC SYMBOLS FOR REGISTER
TRANSFERS
Symbols Description Examples
Capital letters & Denotes a register MAR, R2
numerals
Parentheses () Denotes a part of a R2(0-7), R2(L)
register
Denotes transfer of R2 R1
Arrow
information
Colon : Denotes termination of P:
control function
Comma , Separates two micro- A B, B A
operations
EE-222 Computer Architecture
Muhammad Bilal Saif 32