SlideShare a Scribd company logo
Course Website: http://faculty.iitr.ac.in/~sudiproy.fcs/csn221_2015.html
Piazza Site: https://piazza.com/iitr.ac.in/fall2015/csn221
Dr. Sudip Roy
CSN‐221: COMPUTER ARCHITECTURE
AND MICROPROCESSORS
Computer Organization, CPU Structure and Functions
(Lecture - 5)
Datapath and Control:
• Datapath:
• Memory, registers, adders, ALU, and communication buses
• Each step (fetch, decode, execute, save result) requires communication (data
transfer) paths between memory, registers and ALU
• Control:
• Datapath for each step is set up by control signals that set up dataflow
directions on communication buses and select ALU and memory functions
• Control signals are generated by a control unit consisting of one or more
finite‐state machines
Dr. Sudip Roy 2
Instruction
e.g., ADD A, B, C
Operator / Control Operand / Data
Arithmetic & Logic Unit (ALU):
 Does all the calculations for the processor
 Everything else in the computer is there to service this unit
 Handles integers
 May handle floating point (real) numbers
 May be separate FPU (math co‐processor)
 May be on chip separate FPU (486DX +)
• ALU Inputs & Outputs:
Dr. Sudip Roy 3
What does a processor work?
Dr. Sudip Roy 4
 Instruction cycle:
1. Fetch instructions
2. Interpret (decode) instructions
3. Fetch data
4. Process (Execute) data
5. Write data
Once the computer has been started
(bootstrapped) it continually executes
instructions (until the computer is
stopped)
Different instructions take different
amounts of time to execute (typically)
Program Counter (PC):
Sometimes called as instruction pointer (IP) or instruction address register
(IAR) or instruction counter (IC)
In most processors, the PC is incremented after fetching an instruction, and
holds the memory address of (“points to”) the next instruction that would be
executed
In a processor where this increment precedes the fetch, the PC points to the
current instruction being executed
Dr. Sudip Roy 5
Example: Instruction Execution
• MULT x, y, product
1. Fetch the instruction code from Memory[PC]
2. Decode the instruction. This reveals that it's a multiply instruction, and that
the operands are memory locations x, y, and product.
3. Fetch x and y from memory.
4. Multiply x and y, storing the result in a CPU register.
5. Save the result from the CPU to memory location product.
Dr. Sudip Roy 6
Instruction Cycle:
• A complete instruction consists of
operation code
addressing mode
zero or more operands
 immediately available data
(embedded within the instruction)
 the address where the data can be
found in main memory
Dr. Sudip Roy 7
Fetch
Instruction
Start
Execute
Instruction
Fetch
Operand
Decode
Instruction
Instruction Set Architecture (ISA):
Software design
Hardware circuits
Dr. Sudip Roy 8
Instruction Set Architecture: Software Design
Each computer CPU must be designed to accommodate and understand
instructions according to specific formats.
Examples:
All instructions must have an operation code specified
NOP no operation
TSTST test and set
 Most instructions will require one, or more, operands
 These may be (immediate) data to be used directly
 or, addresses of memory locations where data will be found (including
the address of yet another location)
Dr. Sudip Roy 9
OpCode
OpCode Operand (Address)
Instruction Set Architecture: Software Design
Sometimes the instruction format requires a code, called the Mode,
that specifies a particular addressing format to be distinguished from
other possible formats
direct addressing
indirect addressing
indexed addressing
relative addressing
doubly indirect addressing
etc.
Dr. Sudip Roy 10
OpCode Op. (Addr.)
Op. (Addr.) Mode
Mode
Instruction Set Architecture: Hardware Circuits
• Everything that the computer can do is the result of designing and building
devices to carry out each function – no magic!
• At the most elementary level the devices are called logic gates.
• There are many possible gate types, each perform a specific Boolean
operation (e.g. AND, OR, NOT, NAND, NOR, XOR, XNOR)
• ALL circuits, hence all functions, are defined in terms of the basic gates
• We apply Boolean Algebra and Boolean Calculus in order to design circuits
and then optimize our designs
Dr. Sudip Roy 11
Instruction Set Architecture: Hardware Circuits
• Data is represented by various types of “signals”, including electrical,
magnetic, optical and so on.
• Data “moves” through the computer along wires that form the various bus
networks (address, data, control) and which interconnect the gates.
• Combinations of gates are called integrated circuits (IC).
Dr. Sudip Roy 12
Instruction Set Architecture: CU (Control Unit)
• The control unit must decode instructions, set up for communication with
RAM addresses and manage the data stored in register and accumulator
storages.
• Each such (CU) operation requires separate circuitry to perform the
specialized tasks.
• It is also necessary for computer experts to have knowledge of the various
data representations to be used on the machine in order to design
components that have the desired behaviors.
Dr. Sudip Roy 13
Instruction Set Architecture: ALU
• All instructions together are called the instruction set
• CISC complex instruction set computer
• RISC reduced instruction set computer
• Each ALU instruction requires a separate circuit, although some instructions
may incorporate the circuit logic of other instructions
Dr. Sudip Roy 14
RISC vs. CISC:
• Most common microprocessor designs such as the Intel 80x86 and Motorola
68K series followed the CISC philosophy.
• But recent changes in software and hardware technology have forced a re‐
examination of CISC and many modern CISC processors are hybrids,
implementing many RISC principles.
• The first RISC projects came from IBM, Stanford, and UC‐Berkeley in the late
70s and early 80s. The IBM 801, Stanford MIPS, and Berkeley RISC 1 and 2
were all designed with a similar philosophy which has become known as RISC.
Dr. Sudip Roy 15
RISC vs. CISC:
• Certain design features have been characteristic of most RISC processors:
• one cycle execution time: RISC processors have a CPI (clock per instruction) of
one cycle. This is due to the optimization of each instruction on the CPU and a
technique called PIPELINING
• pipelining: a technique that allows for simultaneous execution of parts, or
stages, of instructions to more efficiently process instructions;
• large number of registers: the RISC design philosophy generally incorporates a
larger number of registers to prevent in large amounts of interactions with
memory
CISC was developed to make compiler development simpler. It shifts most of the
burden of generating machine instructions to the processor. For example,
instead of having to make a compiler write long machine instructions to
calculate a square‐root, a CISC processor would have a built‐in ability to do this.
E.g. Pentium is considered a modern CISC processor
Dr. Sudip Roy 16
RISC vs. CISC:
Most common microprocessor designs such as the Intel 80x86 and Motorola
68K series followed the CISC philosophy.
But recent changes in software and hardware technology have forced a re‐
examination of CISC and many modern CISC processors are hybrids,
implementing many RISC principles.
Dr. Sudip Roy 17
CISC RISC
Complex instructions require multiple
cycles
Reduced instructions take 1 cycle
Many instructions can reference memory Only Load and Store instructions can
reference memory
Instructions are executed one at a time Uses pipelining to execute instructions
Few general registers Many general registers
RISC vs. CISC:
CISC
• ‐Effectively realizes one particular High Level Language Computer System
in HW ‐ recurring HW development costs when change needed
RISC
• ‐Allows effective realization of any High Level Language Computer System
in SW ‐ recurring SW development costs when change needed
Hybrid solutions
• ‐RISC core & CISC interface
• ‐Still has specific performance tuning
Optimal ISA
• ‐Between RISC & CISC
• ‐Few, carefully chosen, useful complex instructions
• ‐Still has complexity handling problems
Dr. Sudip Roy 18
Memory Hierarchy in a Computer:
Dr. Sudip Roy 19
Key to your Architectural Design:
Due to size of DRAM
Due to cost and wire delays (wires on‐chip cost much less, and are faster)
Ad

More Related Content

Similar to CSN221_Lec_5.pdf Computer Organization, CPU Structure and Functions (20)

esunit1.pptx
esunit1.pptxesunit1.pptx
esunit1.pptx
AmitKumar7572
 
Introduction to Embedded System
Introduction to Embedded SystemIntroduction to Embedded System
Introduction to Embedded System
Zakaria Gomaa
 
Top schools in delhi ncr
Top schools in delhi ncrTop schools in delhi ncr
Top schools in delhi ncr
Edhole.com
 
Micro controller and dsp processor
Micro controller and dsp processorMicro controller and dsp processor
Micro controller and dsp processor
ShubhamMishra485
 
Computer Organization: Introduction to Microprocessor and Microcontroller
Computer Organization: Introduction to Microprocessor and MicrocontrollerComputer Organization: Introduction to Microprocessor and Microcontroller
Computer Organization: Introduction to Microprocessor and Microcontroller
AmrutaMehata
 
Processors selection
Processors selectionProcessors selection
Processors selection
Pradeep Shankhwar
 
MICRO-PROCESSORS and MICRO -CONTROLLER topic
MICRO-PROCESSORS and MICRO -CONTROLLER topicMICRO-PROCESSORS and MICRO -CONTROLLER topic
MICRO-PROCESSORS and MICRO -CONTROLLER topic
adofficials07
 
Top schools in noida
Top schools in noidaTop schools in noida
Top schools in noida
Edhole.com
 
Micro controller & Micro processor
Micro controller & Micro processorMicro controller & Micro processor
Micro controller & Micro processor
Ola Mashaqi @ an-najah national university
 
introduction to embedded-converted new one
introduction to embedded-converted new oneintroduction to embedded-converted new one
introduction to embedded-converted new one
DrVikasMahor
 
CSC204PPTNOTES
CSC204PPTNOTESCSC204PPTNOTES
CSC204PPTNOTES
Gilbert NZABONITEGEKA
 
microprocessor and microcontroller material
microprocessor and microcontroller materialmicroprocessor and microcontroller material
microprocessor and microcontroller material
sivapriyaSivakumar1
 
1. Introduction to Microprocessor.pptx
1. Introduction to Microprocessor.pptx1. Introduction to Microprocessor.pptx
1. Introduction to Microprocessor.pptx
ISMT College
 
Computer architecture lecture... 2 .pptx
Computer architecture lecture... 2 .pptxComputer architecture lecture... 2 .pptx
Computer architecture lecture... 2 .pptx
FatimaAhmed225812
 
chapter 1 of computers organization .pdf
chapter 1 of computers organization .pdfchapter 1 of computers organization .pdf
chapter 1 of computers organization .pdf
nosybaahmed2
 
UNIT-III ES.ppt
UNIT-III ES.pptUNIT-III ES.ppt
UNIT-III ES.ppt
DustinGraham19
 
Introduction to Computer Architecture and Organization
Introduction to Computer Architecture and OrganizationIntroduction to Computer Architecture and Organization
Introduction to Computer Architecture and Organization
Dr. Balaji Ganesh Rajagopal
 
Embedded Systems and Arduino Architecture
Embedded Systems and Arduino ArchitectureEmbedded Systems and Arduino Architecture
Embedded Systems and Arduino Architecture
ATHIRAMENONMS
 
Embedded Systems and Arduino Architecture
Embedded Systems and Arduino ArchitectureEmbedded Systems and Arduino Architecture
Embedded Systems and Arduino Architecture
ATHIRAMENONMS
 
EE6602 Embedded System
EE6602 Embedded SystemEE6602 Embedded System
EE6602 Embedded System
rmkceteee
 
Introduction to Embedded System
Introduction to Embedded SystemIntroduction to Embedded System
Introduction to Embedded System
Zakaria Gomaa
 
Top schools in delhi ncr
Top schools in delhi ncrTop schools in delhi ncr
Top schools in delhi ncr
Edhole.com
 
Micro controller and dsp processor
Micro controller and dsp processorMicro controller and dsp processor
Micro controller and dsp processor
ShubhamMishra485
 
Computer Organization: Introduction to Microprocessor and Microcontroller
Computer Organization: Introduction to Microprocessor and MicrocontrollerComputer Organization: Introduction to Microprocessor and Microcontroller
Computer Organization: Introduction to Microprocessor and Microcontroller
AmrutaMehata
 
MICRO-PROCESSORS and MICRO -CONTROLLER topic
MICRO-PROCESSORS and MICRO -CONTROLLER topicMICRO-PROCESSORS and MICRO -CONTROLLER topic
MICRO-PROCESSORS and MICRO -CONTROLLER topic
adofficials07
 
Top schools in noida
Top schools in noidaTop schools in noida
Top schools in noida
Edhole.com
 
introduction to embedded-converted new one
introduction to embedded-converted new oneintroduction to embedded-converted new one
introduction to embedded-converted new one
DrVikasMahor
 
microprocessor and microcontroller material
microprocessor and microcontroller materialmicroprocessor and microcontroller material
microprocessor and microcontroller material
sivapriyaSivakumar1
 
1. Introduction to Microprocessor.pptx
1. Introduction to Microprocessor.pptx1. Introduction to Microprocessor.pptx
1. Introduction to Microprocessor.pptx
ISMT College
 
Computer architecture lecture... 2 .pptx
Computer architecture lecture... 2 .pptxComputer architecture lecture... 2 .pptx
Computer architecture lecture... 2 .pptx
FatimaAhmed225812
 
chapter 1 of computers organization .pdf
chapter 1 of computers organization .pdfchapter 1 of computers organization .pdf
chapter 1 of computers organization .pdf
nosybaahmed2
 
Introduction to Computer Architecture and Organization
Introduction to Computer Architecture and OrganizationIntroduction to Computer Architecture and Organization
Introduction to Computer Architecture and Organization
Dr. Balaji Ganesh Rajagopal
 
Embedded Systems and Arduino Architecture
Embedded Systems and Arduino ArchitectureEmbedded Systems and Arduino Architecture
Embedded Systems and Arduino Architecture
ATHIRAMENONMS
 
Embedded Systems and Arduino Architecture
Embedded Systems and Arduino ArchitectureEmbedded Systems and Arduino Architecture
Embedded Systems and Arduino Architecture
ATHIRAMENONMS
 
EE6602 Embedded System
EE6602 Embedded SystemEE6602 Embedded System
EE6602 Embedded System
rmkceteee
 

More from ssuser034ce1 (20)

CSN221_Lec_27 Computer Architecture and Microprocessor
CSN221_Lec_27 Computer Architecture and MicroprocessorCSN221_Lec_27 Computer Architecture and Microprocessor
CSN221_Lec_27 Computer Architecture and Microprocessor
ssuser034ce1
 
CSN221_Lec_26 Computer Architecture and Microprocessor
CSN221_Lec_26 Computer Architecture and MicroprocessorCSN221_Lec_26 Computer Architecture and Microprocessor
CSN221_Lec_26 Computer Architecture and Microprocessor
ssuser034ce1
 
CSN221_Lec_25 Computer Architecture and Microprocessor
CSN221_Lec_25 Computer Architecture and MicroprocessorCSN221_Lec_25 Computer Architecture and Microprocessor
CSN221_Lec_25 Computer Architecture and Microprocessor
ssuser034ce1
 
CSN221_Lec_36 Computer Architecture and Microprocessor
CSN221_Lec_36 Computer Architecture and MicroprocessorCSN221_Lec_36 Computer Architecture and Microprocessor
CSN221_Lec_36 Computer Architecture and Microprocessor
ssuser034ce1
 
CSN221_Lec_35 Computer Architecture and Microprocessor
CSN221_Lec_35 Computer Architecture and MicroprocessorCSN221_Lec_35 Computer Architecture and Microprocessor
CSN221_Lec_35 Computer Architecture and Microprocessor
ssuser034ce1
 
CSN221_Lec_34 Computer Architecture and Microprocessor
CSN221_Lec_34 Computer Architecture and MicroprocessorCSN221_Lec_34 Computer Architecture and Microprocessor
CSN221_Lec_34 Computer Architecture and Microprocessor
ssuser034ce1
 
CSN221_Lec_22.pdf Computer Architecture and Microprocessor
CSN221_Lec_22.pdf Computer Architecture and MicroprocessorCSN221_Lec_22.pdf Computer Architecture and Microprocessor
CSN221_Lec_22.pdf Computer Architecture and Microprocessor
ssuser034ce1
 
CSN221_Lec_17.pdf Multi Cycle Datapath Design
CSN221_Lec_17.pdf Multi Cycle Datapath DesignCSN221_Lec_17.pdf Multi Cycle Datapath Design
CSN221_Lec_17.pdf Multi Cycle Datapath Design
ssuser034ce1
 
CSN221_Lec_16.pdf MIPS ISA and Datapath design
CSN221_Lec_16.pdf MIPS ISA and Datapath designCSN221_Lec_16.pdf MIPS ISA and Datapath design
CSN221_Lec_16.pdf MIPS ISA and Datapath design
ssuser034ce1
 
CSN221_Lec_15.pdf MIPS ISA and Datapath design
CSN221_Lec_15.pdf MIPS ISA and Datapath designCSN221_Lec_15.pdf MIPS ISA and Datapath design
CSN221_Lec_15.pdf MIPS ISA and Datapath design
ssuser034ce1
 
Computer Architecture CSN221_Lec_37_SpecialTopics.pdf
Computer Architecture CSN221_Lec_37_SpecialTopics.pdfComputer Architecture CSN221_Lec_37_SpecialTopics.pdf
Computer Architecture CSN221_Lec_37_SpecialTopics.pdf
ssuser034ce1
 
CSN221_Lec_4.pdf Computer Organization & Architecture
CSN221_Lec_4.pdf Computer Organization & ArchitectureCSN221_Lec_4.pdf Computer Organization & Architecture
CSN221_Lec_4.pdf Computer Organization & Architecture
ssuser034ce1
 
CS-102 Data Structures huffman coding.pdf
CS-102 Data Structures huffman coding.pdfCS-102 Data Structures huffman coding.pdf
CS-102 Data Structures huffman coding.pdf
ssuser034ce1
 
CS-102 Data Structures HashFunction CS102.pdf
CS-102 Data Structures HashFunction CS102.pdfCS-102 Data Structures HashFunction CS102.pdf
CS-102 Data Structures HashFunction CS102.pdf
ssuser034ce1
 
CS-102 Data Structure lectures on Graphs
CS-102 Data Structure lectures on GraphsCS-102 Data Structure lectures on Graphs
CS-102 Data Structure lectures on Graphs
ssuser034ce1
 
CS-102 DS-class04a Lectures DS Class.pdf
CS-102 DS-class04a Lectures DS Class.pdfCS-102 DS-class04a Lectures DS Class.pdf
CS-102 DS-class04a Lectures DS Class.pdf
ssuser034ce1
 
CS-102 DS-class03 Class DS Lectures .pdf
CS-102 DS-class03 Class DS Lectures .pdfCS-102 DS-class03 Class DS Lectures .pdf
CS-102 DS-class03 Class DS Lectures .pdf
ssuser034ce1
 
CS-102 DS-class_01_02 Lectures Data .pdf
CS-102 DS-class_01_02 Lectures Data .pdfCS-102 DS-class_01_02 Lectures Data .pdf
CS-102 DS-class_01_02 Lectures Data .pdf
ssuser034ce1
 
CS-102 BT_24_3_14 Binary Tree Lectures.pdf
CS-102 BT_24_3_14 Binary Tree Lectures.pdfCS-102 BT_24_3_14 Binary Tree Lectures.pdf
CS-102 BT_24_3_14 Binary Tree Lectures.pdf
ssuser034ce1
 
CS-102 Course_ Binary Tree Lectures .pdf
CS-102 Course_ Binary Tree Lectures .pdfCS-102 Course_ Binary Tree Lectures .pdf
CS-102 Course_ Binary Tree Lectures .pdf
ssuser034ce1
 
CSN221_Lec_27 Computer Architecture and Microprocessor
CSN221_Lec_27 Computer Architecture and MicroprocessorCSN221_Lec_27 Computer Architecture and Microprocessor
CSN221_Lec_27 Computer Architecture and Microprocessor
ssuser034ce1
 
CSN221_Lec_26 Computer Architecture and Microprocessor
CSN221_Lec_26 Computer Architecture and MicroprocessorCSN221_Lec_26 Computer Architecture and Microprocessor
CSN221_Lec_26 Computer Architecture and Microprocessor
ssuser034ce1
 
CSN221_Lec_25 Computer Architecture and Microprocessor
CSN221_Lec_25 Computer Architecture and MicroprocessorCSN221_Lec_25 Computer Architecture and Microprocessor
CSN221_Lec_25 Computer Architecture and Microprocessor
ssuser034ce1
 
CSN221_Lec_36 Computer Architecture and Microprocessor
CSN221_Lec_36 Computer Architecture and MicroprocessorCSN221_Lec_36 Computer Architecture and Microprocessor
CSN221_Lec_36 Computer Architecture and Microprocessor
ssuser034ce1
 
CSN221_Lec_35 Computer Architecture and Microprocessor
CSN221_Lec_35 Computer Architecture and MicroprocessorCSN221_Lec_35 Computer Architecture and Microprocessor
CSN221_Lec_35 Computer Architecture and Microprocessor
ssuser034ce1
 
CSN221_Lec_34 Computer Architecture and Microprocessor
CSN221_Lec_34 Computer Architecture and MicroprocessorCSN221_Lec_34 Computer Architecture and Microprocessor
CSN221_Lec_34 Computer Architecture and Microprocessor
ssuser034ce1
 
CSN221_Lec_22.pdf Computer Architecture and Microprocessor
CSN221_Lec_22.pdf Computer Architecture and MicroprocessorCSN221_Lec_22.pdf Computer Architecture and Microprocessor
CSN221_Lec_22.pdf Computer Architecture and Microprocessor
ssuser034ce1
 
CSN221_Lec_17.pdf Multi Cycle Datapath Design
CSN221_Lec_17.pdf Multi Cycle Datapath DesignCSN221_Lec_17.pdf Multi Cycle Datapath Design
CSN221_Lec_17.pdf Multi Cycle Datapath Design
ssuser034ce1
 
CSN221_Lec_16.pdf MIPS ISA and Datapath design
CSN221_Lec_16.pdf MIPS ISA and Datapath designCSN221_Lec_16.pdf MIPS ISA and Datapath design
CSN221_Lec_16.pdf MIPS ISA and Datapath design
ssuser034ce1
 
CSN221_Lec_15.pdf MIPS ISA and Datapath design
CSN221_Lec_15.pdf MIPS ISA and Datapath designCSN221_Lec_15.pdf MIPS ISA and Datapath design
CSN221_Lec_15.pdf MIPS ISA and Datapath design
ssuser034ce1
 
Computer Architecture CSN221_Lec_37_SpecialTopics.pdf
Computer Architecture CSN221_Lec_37_SpecialTopics.pdfComputer Architecture CSN221_Lec_37_SpecialTopics.pdf
Computer Architecture CSN221_Lec_37_SpecialTopics.pdf
ssuser034ce1
 
CSN221_Lec_4.pdf Computer Organization & Architecture
CSN221_Lec_4.pdf Computer Organization & ArchitectureCSN221_Lec_4.pdf Computer Organization & Architecture
CSN221_Lec_4.pdf Computer Organization & Architecture
ssuser034ce1
 
CS-102 Data Structures huffman coding.pdf
CS-102 Data Structures huffman coding.pdfCS-102 Data Structures huffman coding.pdf
CS-102 Data Structures huffman coding.pdf
ssuser034ce1
 
CS-102 Data Structures HashFunction CS102.pdf
CS-102 Data Structures HashFunction CS102.pdfCS-102 Data Structures HashFunction CS102.pdf
CS-102 Data Structures HashFunction CS102.pdf
ssuser034ce1
 
CS-102 Data Structure lectures on Graphs
CS-102 Data Structure lectures on GraphsCS-102 Data Structure lectures on Graphs
CS-102 Data Structure lectures on Graphs
ssuser034ce1
 
CS-102 DS-class04a Lectures DS Class.pdf
CS-102 DS-class04a Lectures DS Class.pdfCS-102 DS-class04a Lectures DS Class.pdf
CS-102 DS-class04a Lectures DS Class.pdf
ssuser034ce1
 
CS-102 DS-class03 Class DS Lectures .pdf
CS-102 DS-class03 Class DS Lectures .pdfCS-102 DS-class03 Class DS Lectures .pdf
CS-102 DS-class03 Class DS Lectures .pdf
ssuser034ce1
 
CS-102 DS-class_01_02 Lectures Data .pdf
CS-102 DS-class_01_02 Lectures Data .pdfCS-102 DS-class_01_02 Lectures Data .pdf
CS-102 DS-class_01_02 Lectures Data .pdf
ssuser034ce1
 
CS-102 BT_24_3_14 Binary Tree Lectures.pdf
CS-102 BT_24_3_14 Binary Tree Lectures.pdfCS-102 BT_24_3_14 Binary Tree Lectures.pdf
CS-102 BT_24_3_14 Binary Tree Lectures.pdf
ssuser034ce1
 
CS-102 Course_ Binary Tree Lectures .pdf
CS-102 Course_ Binary Tree Lectures .pdfCS-102 Course_ Binary Tree Lectures .pdf
CS-102 Course_ Binary Tree Lectures .pdf
ssuser034ce1
 
Ad

Recently uploaded (20)

211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf
211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf
211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf
inmishra17121973
 
Artificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptxArtificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptx
aditichinar
 
Machine learning project on employee attrition detection using (2).pptx
Machine learning project on employee attrition detection using (2).pptxMachine learning project on employee attrition detection using (2).pptx
Machine learning project on employee attrition detection using (2).pptx
rajeswari89780
 
AI-assisted Software Testing (3-hours tutorial)
AI-assisted Software Testing (3-hours tutorial)AI-assisted Software Testing (3-hours tutorial)
AI-assisted Software Testing (3-hours tutorial)
Vəhid Gəruslu
 
Metal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistryMetal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistry
mee23nu
 
MAQUINARIA MINAS CEMA 6th Edition (1).pdf
MAQUINARIA MINAS CEMA 6th Edition (1).pdfMAQUINARIA MINAS CEMA 6th Edition (1).pdf
MAQUINARIA MINAS CEMA 6th Edition (1).pdf
ssuser562df4
 
new ppt artificial intelligence historyyy
new ppt artificial intelligence historyyynew ppt artificial intelligence historyyy
new ppt artificial intelligence historyyy
PianoPianist
 
Level 1-Safety.pptx Presentation of Electrical Safety
Level 1-Safety.pptx Presentation of Electrical SafetyLevel 1-Safety.pptx Presentation of Electrical Safety
Level 1-Safety.pptx Presentation of Electrical Safety
JoseAlbertoCariasDel
 
DT REPORT by Tech titan GROUP to introduce the subject design Thinking
DT REPORT by Tech titan GROUP to introduce the subject design ThinkingDT REPORT by Tech titan GROUP to introduce the subject design Thinking
DT REPORT by Tech titan GROUP to introduce the subject design Thinking
DhruvChotaliya2
 
theory-slides-for react for beginners.pptx
theory-slides-for react for beginners.pptxtheory-slides-for react for beginners.pptx
theory-slides-for react for beginners.pptx
sanchezvanessa7896
 
Fort night presentation new0903 pdf.pdf.
Fort night presentation new0903 pdf.pdf.Fort night presentation new0903 pdf.pdf.
Fort night presentation new0903 pdf.pdf.
anuragmk56
 
introduction to machine learining for beginers
introduction to machine learining for beginersintroduction to machine learining for beginers
introduction to machine learining for beginers
JoydebSheet
 
π0.5: a Vision-Language-Action Model with Open-World Generalization
π0.5: a Vision-Language-Action Model with Open-World Generalizationπ0.5: a Vision-Language-Action Model with Open-World Generalization
π0.5: a Vision-Language-Action Model with Open-World Generalization
NABLAS株式会社
 
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptxExplainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
MahaveerVPandit
 
some basics electrical and electronics knowledge
some basics electrical and electronics knowledgesome basics electrical and electronics knowledge
some basics electrical and electronics knowledge
nguyentrungdo88
 
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdffive-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
AdityaSharma944496
 
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
charlesdick1345
 
Development of MLR, ANN and ANFIS Models for Estimation of PCUs at Different ...
Development of MLR, ANN and ANFIS Models for Estimation of PCUs at Different ...Development of MLR, ANN and ANFIS Models for Estimation of PCUs at Different ...
Development of MLR, ANN and ANFIS Models for Estimation of PCUs at Different ...
Journal of Soft Computing in Civil Engineering
 
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G..."Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
Infopitaara
 
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptxLidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
RishavKumar530754
 
211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf
211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf
211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf
inmishra17121973
 
Artificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptxArtificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptx
aditichinar
 
Machine learning project on employee attrition detection using (2).pptx
Machine learning project on employee attrition detection using (2).pptxMachine learning project on employee attrition detection using (2).pptx
Machine learning project on employee attrition detection using (2).pptx
rajeswari89780
 
AI-assisted Software Testing (3-hours tutorial)
AI-assisted Software Testing (3-hours tutorial)AI-assisted Software Testing (3-hours tutorial)
AI-assisted Software Testing (3-hours tutorial)
Vəhid Gəruslu
 
Metal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistryMetal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistry
mee23nu
 
MAQUINARIA MINAS CEMA 6th Edition (1).pdf
MAQUINARIA MINAS CEMA 6th Edition (1).pdfMAQUINARIA MINAS CEMA 6th Edition (1).pdf
MAQUINARIA MINAS CEMA 6th Edition (1).pdf
ssuser562df4
 
new ppt artificial intelligence historyyy
new ppt artificial intelligence historyyynew ppt artificial intelligence historyyy
new ppt artificial intelligence historyyy
PianoPianist
 
Level 1-Safety.pptx Presentation of Electrical Safety
Level 1-Safety.pptx Presentation of Electrical SafetyLevel 1-Safety.pptx Presentation of Electrical Safety
Level 1-Safety.pptx Presentation of Electrical Safety
JoseAlbertoCariasDel
 
DT REPORT by Tech titan GROUP to introduce the subject design Thinking
DT REPORT by Tech titan GROUP to introduce the subject design ThinkingDT REPORT by Tech titan GROUP to introduce the subject design Thinking
DT REPORT by Tech titan GROUP to introduce the subject design Thinking
DhruvChotaliya2
 
theory-slides-for react for beginners.pptx
theory-slides-for react for beginners.pptxtheory-slides-for react for beginners.pptx
theory-slides-for react for beginners.pptx
sanchezvanessa7896
 
Fort night presentation new0903 pdf.pdf.
Fort night presentation new0903 pdf.pdf.Fort night presentation new0903 pdf.pdf.
Fort night presentation new0903 pdf.pdf.
anuragmk56
 
introduction to machine learining for beginers
introduction to machine learining for beginersintroduction to machine learining for beginers
introduction to machine learining for beginers
JoydebSheet
 
π0.5: a Vision-Language-Action Model with Open-World Generalization
π0.5: a Vision-Language-Action Model with Open-World Generalizationπ0.5: a Vision-Language-Action Model with Open-World Generalization
π0.5: a Vision-Language-Action Model with Open-World Generalization
NABLAS株式会社
 
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptxExplainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
MahaveerVPandit
 
some basics electrical and electronics knowledge
some basics electrical and electronics knowledgesome basics electrical and electronics knowledge
some basics electrical and electronics knowledge
nguyentrungdo88
 
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdffive-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
AdityaSharma944496
 
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
charlesdick1345
 
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G..."Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
Infopitaara
 
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptxLidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
RishavKumar530754
 
Ad

CSN221_Lec_5.pdf Computer Organization, CPU Structure and Functions

  • 1. Course Website: http://faculty.iitr.ac.in/~sudiproy.fcs/csn221_2015.html Piazza Site: https://piazza.com/iitr.ac.in/fall2015/csn221 Dr. Sudip Roy CSN‐221: COMPUTER ARCHITECTURE AND MICROPROCESSORS Computer Organization, CPU Structure and Functions (Lecture - 5)
  • 2. Datapath and Control: • Datapath: • Memory, registers, adders, ALU, and communication buses • Each step (fetch, decode, execute, save result) requires communication (data transfer) paths between memory, registers and ALU • Control: • Datapath for each step is set up by control signals that set up dataflow directions on communication buses and select ALU and memory functions • Control signals are generated by a control unit consisting of one or more finite‐state machines Dr. Sudip Roy 2 Instruction e.g., ADD A, B, C Operator / Control Operand / Data
  • 3. Arithmetic & Logic Unit (ALU):  Does all the calculations for the processor  Everything else in the computer is there to service this unit  Handles integers  May handle floating point (real) numbers  May be separate FPU (math co‐processor)  May be on chip separate FPU (486DX +) • ALU Inputs & Outputs: Dr. Sudip Roy 3
  • 4. What does a processor work? Dr. Sudip Roy 4  Instruction cycle: 1. Fetch instructions 2. Interpret (decode) instructions 3. Fetch data 4. Process (Execute) data 5. Write data Once the computer has been started (bootstrapped) it continually executes instructions (until the computer is stopped) Different instructions take different amounts of time to execute (typically)
  • 5. Program Counter (PC): Sometimes called as instruction pointer (IP) or instruction address register (IAR) or instruction counter (IC) In most processors, the PC is incremented after fetching an instruction, and holds the memory address of (“points to”) the next instruction that would be executed In a processor where this increment precedes the fetch, the PC points to the current instruction being executed Dr. Sudip Roy 5
  • 6. Example: Instruction Execution • MULT x, y, product 1. Fetch the instruction code from Memory[PC] 2. Decode the instruction. This reveals that it's a multiply instruction, and that the operands are memory locations x, y, and product. 3. Fetch x and y from memory. 4. Multiply x and y, storing the result in a CPU register. 5. Save the result from the CPU to memory location product. Dr. Sudip Roy 6
  • 7. Instruction Cycle: • A complete instruction consists of operation code addressing mode zero or more operands  immediately available data (embedded within the instruction)  the address where the data can be found in main memory Dr. Sudip Roy 7 Fetch Instruction Start Execute Instruction Fetch Operand Decode Instruction
  • 8. Instruction Set Architecture (ISA): Software design Hardware circuits Dr. Sudip Roy 8
  • 9. Instruction Set Architecture: Software Design Each computer CPU must be designed to accommodate and understand instructions according to specific formats. Examples: All instructions must have an operation code specified NOP no operation TSTST test and set  Most instructions will require one, or more, operands  These may be (immediate) data to be used directly  or, addresses of memory locations where data will be found (including the address of yet another location) Dr. Sudip Roy 9 OpCode OpCode Operand (Address)
  • 10. Instruction Set Architecture: Software Design Sometimes the instruction format requires a code, called the Mode, that specifies a particular addressing format to be distinguished from other possible formats direct addressing indirect addressing indexed addressing relative addressing doubly indirect addressing etc. Dr. Sudip Roy 10 OpCode Op. (Addr.) Op. (Addr.) Mode Mode
  • 11. Instruction Set Architecture: Hardware Circuits • Everything that the computer can do is the result of designing and building devices to carry out each function – no magic! • At the most elementary level the devices are called logic gates. • There are many possible gate types, each perform a specific Boolean operation (e.g. AND, OR, NOT, NAND, NOR, XOR, XNOR) • ALL circuits, hence all functions, are defined in terms of the basic gates • We apply Boolean Algebra and Boolean Calculus in order to design circuits and then optimize our designs Dr. Sudip Roy 11
  • 12. Instruction Set Architecture: Hardware Circuits • Data is represented by various types of “signals”, including electrical, magnetic, optical and so on. • Data “moves” through the computer along wires that form the various bus networks (address, data, control) and which interconnect the gates. • Combinations of gates are called integrated circuits (IC). Dr. Sudip Roy 12
  • 13. Instruction Set Architecture: CU (Control Unit) • The control unit must decode instructions, set up for communication with RAM addresses and manage the data stored in register and accumulator storages. • Each such (CU) operation requires separate circuitry to perform the specialized tasks. • It is also necessary for computer experts to have knowledge of the various data representations to be used on the machine in order to design components that have the desired behaviors. Dr. Sudip Roy 13
  • 14. Instruction Set Architecture: ALU • All instructions together are called the instruction set • CISC complex instruction set computer • RISC reduced instruction set computer • Each ALU instruction requires a separate circuit, although some instructions may incorporate the circuit logic of other instructions Dr. Sudip Roy 14
  • 15. RISC vs. CISC: • Most common microprocessor designs such as the Intel 80x86 and Motorola 68K series followed the CISC philosophy. • But recent changes in software and hardware technology have forced a re‐ examination of CISC and many modern CISC processors are hybrids, implementing many RISC principles. • The first RISC projects came from IBM, Stanford, and UC‐Berkeley in the late 70s and early 80s. The IBM 801, Stanford MIPS, and Berkeley RISC 1 and 2 were all designed with a similar philosophy which has become known as RISC. Dr. Sudip Roy 15
  • 16. RISC vs. CISC: • Certain design features have been characteristic of most RISC processors: • one cycle execution time: RISC processors have a CPI (clock per instruction) of one cycle. This is due to the optimization of each instruction on the CPU and a technique called PIPELINING • pipelining: a technique that allows for simultaneous execution of parts, or stages, of instructions to more efficiently process instructions; • large number of registers: the RISC design philosophy generally incorporates a larger number of registers to prevent in large amounts of interactions with memory CISC was developed to make compiler development simpler. It shifts most of the burden of generating machine instructions to the processor. For example, instead of having to make a compiler write long machine instructions to calculate a square‐root, a CISC processor would have a built‐in ability to do this. E.g. Pentium is considered a modern CISC processor Dr. Sudip Roy 16
  • 17. RISC vs. CISC: Most common microprocessor designs such as the Intel 80x86 and Motorola 68K series followed the CISC philosophy. But recent changes in software and hardware technology have forced a re‐ examination of CISC and many modern CISC processors are hybrids, implementing many RISC principles. Dr. Sudip Roy 17 CISC RISC Complex instructions require multiple cycles Reduced instructions take 1 cycle Many instructions can reference memory Only Load and Store instructions can reference memory Instructions are executed one at a time Uses pipelining to execute instructions Few general registers Many general registers
  • 18. RISC vs. CISC: CISC • ‐Effectively realizes one particular High Level Language Computer System in HW ‐ recurring HW development costs when change needed RISC • ‐Allows effective realization of any High Level Language Computer System in SW ‐ recurring SW development costs when change needed Hybrid solutions • ‐RISC core & CISC interface • ‐Still has specific performance tuning Optimal ISA • ‐Between RISC & CISC • ‐Few, carefully chosen, useful complex instructions • ‐Still has complexity handling problems Dr. Sudip Roy 18
  • 19. Memory Hierarchy in a Computer: Dr. Sudip Roy 19 Key to your Architectural Design: Due to size of DRAM Due to cost and wire delays (wires on‐chip cost much less, and are faster)