SlideShare ist ein Scribd-Unternehmen logo
1 von 24
Instruction Set
Architecture – II
CS2052 Computer Architecture
Computer Science & Engineering
University of Moratuwa
Dilum Bandara
Dilum.Bandara@uom.lk
Outline
 Types of memory
 Von Neumann vs. Harvard architecture
 Addressing modes
 RISC & CISC
2
Blocks of a Microprocessor
3
Literal
Address
Operation
Program
Memory
Instruction
Register
STACK Program Counter
Instruction
Decoder
Timing, Control and Register selection
Accumulator
RAM &
Data
Registers
ALU
IO
IO
FLAG &
Special
Function
Registers
Clock
Reset
Interrupts
Program Execution Section Register Processing Section
Set up
Set up
Modify
Address
Internal data bus
Source: Makis Malliris & Sabir Ghauri, UWE
Memory
 Instruction memory
 Store program instructions
 Data memory
 Store data for instructions
 Stack
 e.g., stack of plates
 For temporary storage of state
 Initially stored in ROM
 Or Flash
 Read/Write while in RAM
4
Memory Architectures
5
Source: Introduction to PIC Microcontroller – Part 1 by Khan Wahid
Von Neumann vs. Harvard
Architecture
6
Memory Addressing
 Place an
address on
address bus
 Read or write
operation
 Data placed on
data bus
7
Source: www.alf.sd83.bc.ca/courses/It12/using_it/processor_speed.htm
Memory Addressing (Cont.)
8
Address Data
Word
No of words
0
9
Memory Addressing (Cont.)
Memory Capacity = Word Size × No of Words
 Example
 PIC 16F877A can store up to 8K instructions
 Each instruction is 14-bit
 This is the size of Instruction Register
 What is the size of instruction memory in KB?
 8 × 1024 x 14 /(8 x 1024) = 14 KB
9
Example – Memory Addressing
 PIC 16F877A can store up to 8K
instructions
 What is the length of an instruction
address?
 No of bits required to uniquely address
each word
 log2 8 × 1024 = log2 213 = 13 bits
 This is the size of Program Counter
 How many bits are required to
address 348 instructions?
10
0
8K -1
Example – Instruction Memory
 How many bits we need to address 4Kbit
memory?
 It depends on smallest unit (word length) that we need
to address
 Suppose 8-bit addressable
 4Kb/8b = 512 locations
 Requires log2 512 = 9 bits
11
Addressing Modes
 Way the microprocessor
 Identifies location of data
 Access data
 Absolute address
 Actual physical address
 Direct addressing
 Relative address
 Address relative to a known reference
 Indirect addressing
12
 Segments
 Special areas in memory that is used to hold code, data, & stack
13
Programmers View of Memory
0
100
50
100 50
150
SS – Stack Segment
DS – Data Segment
CS – Code Segment
14
Segment + Offset Addressing
 Indicate address using segment boundary &
offset
 Example 1
 What is the actual memory location if DS register is
03E0h & offset is 32h?
DS 03E0
Offset 32 +
Address 412
15
Pointer Registers
 Are used to hold offset values
 Example 2
 What is the actual memory location if CS register is
39B0h & Instruction Pointer (IP) register is 514h?
CS 39B0
Offset 514 +
Address 3EC4
Addressing Modes
1. Immediate addressing
 Data/operand specified in instruction
 e.g., MOVLW k
2. Direct/Register addressing
 Register address is specified in instruction
 e.g., MOVF f, d
16
Addressing Modes (Cont.)
3. Indexed addressing
 Index Register store index
 Value in index register is
added to address specified
in instruction
 e.g., while accessing an
element in an array
 MOV R1, Table[2]
17
…..
1st
Element
2nd
Element
12th
Element
3rd
Element
215
Index Register
Addressing Modes (Cont.)
4. Base Register
addressing
 Same idea as Index
Register addressing
 Used with segments
 Enable relocation of
code
 e.g., MOV R1, [21]
18
21st
value
1st
value
2nd
value
…..
…..
215
Base Register
Addressing Modes (Cont.)
5. Register indirect addressing
 Address is stored in some other register
 Instruction specify which register to look at
 Address field of instruction can be smaller than actual
physical address
19
Source: http://cnx.org/content/m29425/latest/
Example – 8086 Addressing Modes
20
Source: www.electronics.dit.ie
Swapping Data
 Swap contents of W with register R5
 Use only PIC instructions
 No register-register operations
 Routine requires 2 temporary
locations W
tempA
tempB
R5
movwf tempA
movf R5, 0
movwf tempB
movf tempA, 0
movwf R5
movf tempB, 0
21
Stack
 For temporary storage of state
 Last in first out
 e.g., stack of plates
 Example
100 CALL Delay
101 .....
214 Delay: .....
.....
218 Return
22
Source: http://sir.unl.edu/portal/bios/Stack.php
Stack Example
105 a
{
…
112 b()
…
}
231 b
{
…
236 f()
…
}
175 f
{
…
179 g()
…
} 23
113
180
237
CISC vs. RISC
Complex Instruction Set
Computer
 Many instructions
 e.g., 75-100
 Many instructions are
macro-like
 Simplifies programming
 Most microcontrollers are
based on CISC concept
 e.g., PDP-11, VAX,
Motorola 68k
 PIC is an exception
Reduced Instruction Set
Computers
 Few instructions
 e.g., 30-40
 Smaller chip, smaller pin
count, & very low-power
consumption
 Simple but fast instructions
 Harvard architecture,
instruction pipelining
 Industry trend for
microprocessor design
 e.g., Intel Pentium, PIC 24

Weitere ähnliche Inhalte

Was ist angesagt?

Computer registers
Computer registersComputer registers
Computer registersJatin Grover
 
Instruction Execution Cycle
Instruction Execution CycleInstruction Execution Cycle
Instruction Execution Cycleutsav_shah
 
Computer Organization and Architecture.
Computer Organization and Architecture.Computer Organization and Architecture.
Computer Organization and Architecture.CS_GDRCST
 
Computer architecture instruction formats
Computer architecture instruction formatsComputer architecture instruction formats
Computer architecture instruction formatsMazin Alwaaly
 
Memory Reference Instructions
Memory Reference InstructionsMemory Reference Instructions
Memory Reference InstructionsRabin BK
 
Types of Addressing modes- COA
Types of Addressing modes- COATypes of Addressing modes- COA
Types of Addressing modes- COARuchi Maurya
 
Microprogram Control
Microprogram Control Microprogram Control
Microprogram Control Anuj Modi
 
Instruction cycle presentation
Instruction   cycle presentationInstruction   cycle presentation
Instruction cycle presentationMoniba Irfan
 
Micro programmed control
Micro programmed  controlMicro programmed  control
Micro programmed controlShashank Singh
 
Computer instruction
Computer instructionComputer instruction
Computer instructionSanjeev Patel
 
Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)Gaditek
 
Control unit design
Control unit designControl unit design
Control unit designDhaval Bagal
 

Was ist angesagt? (20)

Computer registers
Computer registersComputer registers
Computer registers
 
Instruction Execution Cycle
Instruction Execution CycleInstruction Execution Cycle
Instruction Execution Cycle
 
Cpu organisation
Cpu organisationCpu organisation
Cpu organisation
 
Computer Organization and Architecture.
Computer Organization and Architecture.Computer Organization and Architecture.
Computer Organization and Architecture.
 
Computer architecture instruction formats
Computer architecture instruction formatsComputer architecture instruction formats
Computer architecture instruction formats
 
Basic Computer Organization and Design
Basic  Computer  Organization  and  DesignBasic  Computer  Organization  and  Design
Basic Computer Organization and Design
 
Memory Reference Instructions
Memory Reference InstructionsMemory Reference Instructions
Memory Reference Instructions
 
itft-Clock generator
itft-Clock generatoritft-Clock generator
itft-Clock generator
 
Types of Addressing modes- COA
Types of Addressing modes- COATypes of Addressing modes- COA
Types of Addressing modes- COA
 
Memory Organization
Memory OrganizationMemory Organization
Memory Organization
 
Microprogram Control
Microprogram Control Microprogram Control
Microprogram Control
 
Instruction cycle presentation
Instruction   cycle presentationInstruction   cycle presentation
Instruction cycle presentation
 
Micro programmed control
Micro programmed  controlMicro programmed  control
Micro programmed control
 
Computer instruction
Computer instructionComputer instruction
Computer instruction
 
ADDRESSING MODES
ADDRESSING MODESADDRESSING MODES
ADDRESSING MODES
 
Array Processor
Array ProcessorArray Processor
Array Processor
 
Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)
 
System call
System callSystem call
System call
 
Parallel processing
Parallel processingParallel processing
Parallel processing
 
Control unit design
Control unit designControl unit design
Control unit design
 

Andere mochten auch

Andere mochten auch (8)

Risc & cisk
Risc & ciskRisc & cisk
Risc & cisk
 
CISC vs RISC Processor Architecture
CISC vs RISC Processor ArchitectureCISC vs RISC Processor Architecture
CISC vs RISC Processor Architecture
 
Plataformas cisc e risc
Plataformas cisc e riscPlataformas cisc e risc
Plataformas cisc e risc
 
Risc cisc Difference
Risc cisc DifferenceRisc cisc Difference
Risc cisc Difference
 
Risc processors
Risc processorsRisc processors
Risc processors
 
Tibor
TiborTibor
Tibor
 
RISC Vs CISC, Harvard v/s Van Neumann
RISC Vs CISC, Harvard v/s Van NeumannRISC Vs CISC, Harvard v/s Van Neumann
RISC Vs CISC, Harvard v/s Van Neumann
 
Flynns classification
Flynns classificationFlynns classification
Flynns classification
 

Ähnlich wie Instruction Set Architecture – II

(246431835) instruction set principles (2) (1)
(246431835) instruction set principles (2) (1)(246431835) instruction set principles (2) (1)
(246431835) instruction set principles (2) (1)Alveena Saleem
 
other-architectures.ppt
other-architectures.pptother-architectures.ppt
other-architectures.pptJaya Chavan
 
Module 1-ppt System programming
Module 1-ppt System programmingModule 1-ppt System programming
Module 1-ppt System programmingvishnu sankar
 
Module 2 instruction set
Module 2 instruction set Module 2 instruction set
Module 2 instruction set Deepak John
 
Compreport
CompreportCompreport
Compreportxdarlord
 
Ec 252 ec-252-l10-instruction sets and addressing modes
Ec 252 ec-252-l10-instruction sets and addressing modesEc 252 ec-252-l10-instruction sets and addressing modes
Ec 252 ec-252-l10-instruction sets and addressing modesbhshmuec
 
Instruction set (prasenjit dey)
Instruction set (prasenjit dey)Instruction set (prasenjit dey)
Instruction set (prasenjit dey)Prasenjit Dey
 
Pai unit 1_l1-l2-l3-l4_upload
Pai unit 1_l1-l2-l3-l4_uploadPai unit 1_l1-l2-l3-l4_upload
Pai unit 1_l1-l2-l3-l4_uploadYogesh Deshpande
 
Instruction Set (Part 2)
Instruction Set (Part 2)Instruction Set (Part 2)
Instruction Set (Part 2)Ajeng Savitri
 
Please send the answers to my email. Mirre06@hotmail.comSomeone se.pdf
Please send the answers to my email. Mirre06@hotmail.comSomeone se.pdfPlease send the answers to my email. Mirre06@hotmail.comSomeone se.pdf
Please send the answers to my email. Mirre06@hotmail.comSomeone se.pdfebrahimbadushata00
 
Instruction set.pptx
Instruction set.pptxInstruction set.pptx
Instruction set.pptxssuser000e54
 
CS304PC:Computer Organization and Architecture Session 12 Instruction Format...
CS304PC:Computer Organization and Architecture  Session 12 Instruction Format...CS304PC:Computer Organization and Architecture  Session 12 Instruction Format...
CS304PC:Computer Organization and Architecture Session 12 Instruction Format...Asst.prof M.Gokilavani
 

Ähnlich wie Instruction Set Architecture – II (20)

(246431835) instruction set principles (2) (1)
(246431835) instruction set principles (2) (1)(246431835) instruction set principles (2) (1)
(246431835) instruction set principles (2) (1)
 
other-architectures.ppt
other-architectures.pptother-architectures.ppt
other-architectures.ppt
 
Ch2 csda
Ch2 csdaCh2 csda
Ch2 csda
 
Module 1-ppt System programming
Module 1-ppt System programmingModule 1-ppt System programming
Module 1-ppt System programming
 
Module 2 instruction set
Module 2 instruction set Module 2 instruction set
Module 2 instruction set
 
Compreport
CompreportCompreport
Compreport
 
Ec 252 ec-252-l10-instruction sets and addressing modes
Ec 252 ec-252-l10-instruction sets and addressing modesEc 252 ec-252-l10-instruction sets and addressing modes
Ec 252 ec-252-l10-instruction sets and addressing modes
 
Register & Memory
Register & MemoryRegister & Memory
Register & Memory
 
Instruction codes
Instruction codesInstruction codes
Instruction codes
 
Cao 2012
Cao 2012Cao 2012
Cao 2012
 
Instruction set (prasenjit dey)
Instruction set (prasenjit dey)Instruction set (prasenjit dey)
Instruction set (prasenjit dey)
 
Bc0040
Bc0040Bc0040
Bc0040
 
Al2ed chapter2
Al2ed chapter2Al2ed chapter2
Al2ed chapter2
 
Pai unit 1_l1-l2-l3-l4_upload
Pai unit 1_l1-l2-l3-l4_uploadPai unit 1_l1-l2-l3-l4_upload
Pai unit 1_l1-l2-l3-l4_upload
 
Instruction Set (Part 2)
Instruction Set (Part 2)Instruction Set (Part 2)
Instruction Set (Part 2)
 
Please send the answers to my email. Mirre06@hotmail.comSomeone se.pdf
Please send the answers to my email. Mirre06@hotmail.comSomeone se.pdfPlease send the answers to my email. Mirre06@hotmail.comSomeone se.pdf
Please send the answers to my email. Mirre06@hotmail.comSomeone se.pdf
 
Instruction set.pptx
Instruction set.pptxInstruction set.pptx
Instruction set.pptx
 
microprocessor
 microprocessor microprocessor
microprocessor
 
CS304PC:Computer Organization and Architecture Session 12 Instruction Format...
CS304PC:Computer Organization and Architecture  Session 12 Instruction Format...CS304PC:Computer Organization and Architecture  Session 12 Instruction Format...
CS304PC:Computer Organization and Architecture Session 12 Instruction Format...
 
x86_1.ppt
x86_1.pptx86_1.ppt
x86_1.ppt
 

Mehr von Dilum Bandara

Introduction to Machine Learning
Introduction to Machine LearningIntroduction to Machine Learning
Introduction to Machine LearningDilum Bandara
 
Time Series Analysis and Forecasting in Practice
Time Series Analysis and Forecasting in PracticeTime Series Analysis and Forecasting in Practice
Time Series Analysis and Forecasting in PracticeDilum Bandara
 
Introduction to Dimension Reduction with PCA
Introduction to Dimension Reduction with PCAIntroduction to Dimension Reduction with PCA
Introduction to Dimension Reduction with PCADilum Bandara
 
Introduction to Descriptive & Predictive Analytics
Introduction to Descriptive & Predictive AnalyticsIntroduction to Descriptive & Predictive Analytics
Introduction to Descriptive & Predictive AnalyticsDilum Bandara
 
Introduction to Concurrent Data Structures
Introduction to Concurrent Data StructuresIntroduction to Concurrent Data Structures
Introduction to Concurrent Data StructuresDilum Bandara
 
Hard to Paralelize Problems: Matrix-Vector and Matrix-Matrix
Hard to Paralelize Problems: Matrix-Vector and Matrix-MatrixHard to Paralelize Problems: Matrix-Vector and Matrix-Matrix
Hard to Paralelize Problems: Matrix-Vector and Matrix-MatrixDilum Bandara
 
Introduction to Map-Reduce Programming with Hadoop
Introduction to Map-Reduce Programming with HadoopIntroduction to Map-Reduce Programming with Hadoop
Introduction to Map-Reduce Programming with HadoopDilum Bandara
 
Embarrassingly/Delightfully Parallel Problems
Embarrassingly/Delightfully Parallel ProblemsEmbarrassingly/Delightfully Parallel Problems
Embarrassingly/Delightfully Parallel ProblemsDilum Bandara
 
Introduction to Warehouse-Scale Computers
Introduction to Warehouse-Scale ComputersIntroduction to Warehouse-Scale Computers
Introduction to Warehouse-Scale ComputersDilum Bandara
 
Introduction to Thread Level Parallelism
Introduction to Thread Level ParallelismIntroduction to Thread Level Parallelism
Introduction to Thread Level ParallelismDilum Bandara
 
CPU Memory Hierarchy and Caching Techniques
CPU Memory Hierarchy and Caching TechniquesCPU Memory Hierarchy and Caching Techniques
CPU Memory Hierarchy and Caching TechniquesDilum Bandara
 
Data-Level Parallelism in Microprocessors
Data-Level Parallelism in MicroprocessorsData-Level Parallelism in Microprocessors
Data-Level Parallelism in MicroprocessorsDilum Bandara
 
Instruction Level Parallelism – Hardware Techniques
Instruction Level Parallelism – Hardware TechniquesInstruction Level Parallelism – Hardware Techniques
Instruction Level Parallelism – Hardware TechniquesDilum Bandara
 
Instruction Level Parallelism – Compiler Techniques
Instruction Level Parallelism – Compiler TechniquesInstruction Level Parallelism – Compiler Techniques
Instruction Level Parallelism – Compiler TechniquesDilum Bandara
 
CPU Pipelining and Hazards - An Introduction
CPU Pipelining and Hazards - An IntroductionCPU Pipelining and Hazards - An Introduction
CPU Pipelining and Hazards - An IntroductionDilum Bandara
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
High Performance Networking with Advanced TCP
High Performance Networking with Advanced TCPHigh Performance Networking with Advanced TCP
High Performance Networking with Advanced TCPDilum Bandara
 
Introduction to Content Delivery Networks
Introduction to Content Delivery NetworksIntroduction to Content Delivery Networks
Introduction to Content Delivery NetworksDilum Bandara
 
Peer-to-Peer Networking Systems and Streaming
Peer-to-Peer Networking Systems and StreamingPeer-to-Peer Networking Systems and Streaming
Peer-to-Peer Networking Systems and StreamingDilum Bandara
 

Mehr von Dilum Bandara (20)

Introduction to Machine Learning
Introduction to Machine LearningIntroduction to Machine Learning
Introduction to Machine Learning
 
Time Series Analysis and Forecasting in Practice
Time Series Analysis and Forecasting in PracticeTime Series Analysis and Forecasting in Practice
Time Series Analysis and Forecasting in Practice
 
Introduction to Dimension Reduction with PCA
Introduction to Dimension Reduction with PCAIntroduction to Dimension Reduction with PCA
Introduction to Dimension Reduction with PCA
 
Introduction to Descriptive & Predictive Analytics
Introduction to Descriptive & Predictive AnalyticsIntroduction to Descriptive & Predictive Analytics
Introduction to Descriptive & Predictive Analytics
 
Introduction to Concurrent Data Structures
Introduction to Concurrent Data StructuresIntroduction to Concurrent Data Structures
Introduction to Concurrent Data Structures
 
Hard to Paralelize Problems: Matrix-Vector and Matrix-Matrix
Hard to Paralelize Problems: Matrix-Vector and Matrix-MatrixHard to Paralelize Problems: Matrix-Vector and Matrix-Matrix
Hard to Paralelize Problems: Matrix-Vector and Matrix-Matrix
 
Introduction to Map-Reduce Programming with Hadoop
Introduction to Map-Reduce Programming with HadoopIntroduction to Map-Reduce Programming with Hadoop
Introduction to Map-Reduce Programming with Hadoop
 
Embarrassingly/Delightfully Parallel Problems
Embarrassingly/Delightfully Parallel ProblemsEmbarrassingly/Delightfully Parallel Problems
Embarrassingly/Delightfully Parallel Problems
 
Introduction to Warehouse-Scale Computers
Introduction to Warehouse-Scale ComputersIntroduction to Warehouse-Scale Computers
Introduction to Warehouse-Scale Computers
 
Introduction to Thread Level Parallelism
Introduction to Thread Level ParallelismIntroduction to Thread Level Parallelism
Introduction to Thread Level Parallelism
 
CPU Memory Hierarchy and Caching Techniques
CPU Memory Hierarchy and Caching TechniquesCPU Memory Hierarchy and Caching Techniques
CPU Memory Hierarchy and Caching Techniques
 
Data-Level Parallelism in Microprocessors
Data-Level Parallelism in MicroprocessorsData-Level Parallelism in Microprocessors
Data-Level Parallelism in Microprocessors
 
Instruction Level Parallelism – Hardware Techniques
Instruction Level Parallelism – Hardware TechniquesInstruction Level Parallelism – Hardware Techniques
Instruction Level Parallelism – Hardware Techniques
 
Instruction Level Parallelism – Compiler Techniques
Instruction Level Parallelism – Compiler TechniquesInstruction Level Parallelism – Compiler Techniques
Instruction Level Parallelism – Compiler Techniques
 
CPU Pipelining and Hazards - An Introduction
CPU Pipelining and Hazards - An IntroductionCPU Pipelining and Hazards - An Introduction
CPU Pipelining and Hazards - An Introduction
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
High Performance Networking with Advanced TCP
High Performance Networking with Advanced TCPHigh Performance Networking with Advanced TCP
High Performance Networking with Advanced TCP
 
Introduction to Content Delivery Networks
Introduction to Content Delivery NetworksIntroduction to Content Delivery Networks
Introduction to Content Delivery Networks
 
Peer-to-Peer Networking Systems and Streaming
Peer-to-Peer Networking Systems and StreamingPeer-to-Peer Networking Systems and Streaming
Peer-to-Peer Networking Systems and Streaming
 
Mobile Services
Mobile ServicesMobile Services
Mobile Services
 

Kürzlich hochgeladen

VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfRagavanV2
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Standamitlee9823
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdfSuman Jyoti
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756dollysharma2066
 
Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Christo Ananth
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...SUHANI PANDEY
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXssuser89054b
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapRishantSharmaFr
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 

Kürzlich hochgeladen (20)

Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
 

Instruction Set Architecture – II

  • 1. Instruction Set Architecture – II CS2052 Computer Architecture Computer Science & Engineering University of Moratuwa Dilum Bandara Dilum.Bandara@uom.lk
  • 2. Outline  Types of memory  Von Neumann vs. Harvard architecture  Addressing modes  RISC & CISC 2
  • 3. Blocks of a Microprocessor 3 Literal Address Operation Program Memory Instruction Register STACK Program Counter Instruction Decoder Timing, Control and Register selection Accumulator RAM & Data Registers ALU IO IO FLAG & Special Function Registers Clock Reset Interrupts Program Execution Section Register Processing Section Set up Set up Modify Address Internal data bus Source: Makis Malliris & Sabir Ghauri, UWE
  • 4. Memory  Instruction memory  Store program instructions  Data memory  Store data for instructions  Stack  e.g., stack of plates  For temporary storage of state  Initially stored in ROM  Or Flash  Read/Write while in RAM 4
  • 5. Memory Architectures 5 Source: Introduction to PIC Microcontroller – Part 1 by Khan Wahid
  • 6. Von Neumann vs. Harvard Architecture 6
  • 7. Memory Addressing  Place an address on address bus  Read or write operation  Data placed on data bus 7 Source: www.alf.sd83.bc.ca/courses/It12/using_it/processor_speed.htm
  • 8. Memory Addressing (Cont.) 8 Address Data Word No of words 0 9
  • 9. Memory Addressing (Cont.) Memory Capacity = Word Size × No of Words  Example  PIC 16F877A can store up to 8K instructions  Each instruction is 14-bit  This is the size of Instruction Register  What is the size of instruction memory in KB?  8 × 1024 x 14 /(8 x 1024) = 14 KB 9
  • 10. Example – Memory Addressing  PIC 16F877A can store up to 8K instructions  What is the length of an instruction address?  No of bits required to uniquely address each word  log2 8 × 1024 = log2 213 = 13 bits  This is the size of Program Counter  How many bits are required to address 348 instructions? 10 0 8K -1
  • 11. Example – Instruction Memory  How many bits we need to address 4Kbit memory?  It depends on smallest unit (word length) that we need to address  Suppose 8-bit addressable  4Kb/8b = 512 locations  Requires log2 512 = 9 bits 11
  • 12. Addressing Modes  Way the microprocessor  Identifies location of data  Access data  Absolute address  Actual physical address  Direct addressing  Relative address  Address relative to a known reference  Indirect addressing 12
  • 13.  Segments  Special areas in memory that is used to hold code, data, & stack 13 Programmers View of Memory 0 100 50 100 50 150 SS – Stack Segment DS – Data Segment CS – Code Segment
  • 14. 14 Segment + Offset Addressing  Indicate address using segment boundary & offset  Example 1  What is the actual memory location if DS register is 03E0h & offset is 32h? DS 03E0 Offset 32 + Address 412
  • 15. 15 Pointer Registers  Are used to hold offset values  Example 2  What is the actual memory location if CS register is 39B0h & Instruction Pointer (IP) register is 514h? CS 39B0 Offset 514 + Address 3EC4
  • 16. Addressing Modes 1. Immediate addressing  Data/operand specified in instruction  e.g., MOVLW k 2. Direct/Register addressing  Register address is specified in instruction  e.g., MOVF f, d 16
  • 17. Addressing Modes (Cont.) 3. Indexed addressing  Index Register store index  Value in index register is added to address specified in instruction  e.g., while accessing an element in an array  MOV R1, Table[2] 17 ….. 1st Element 2nd Element 12th Element 3rd Element 215 Index Register
  • 18. Addressing Modes (Cont.) 4. Base Register addressing  Same idea as Index Register addressing  Used with segments  Enable relocation of code  e.g., MOV R1, [21] 18 21st value 1st value 2nd value ….. ….. 215 Base Register
  • 19. Addressing Modes (Cont.) 5. Register indirect addressing  Address is stored in some other register  Instruction specify which register to look at  Address field of instruction can be smaller than actual physical address 19 Source: http://cnx.org/content/m29425/latest/
  • 20. Example – 8086 Addressing Modes 20 Source: www.electronics.dit.ie
  • 21. Swapping Data  Swap contents of W with register R5  Use only PIC instructions  No register-register operations  Routine requires 2 temporary locations W tempA tempB R5 movwf tempA movf R5, 0 movwf tempB movf tempA, 0 movwf R5 movf tempB, 0 21
  • 22. Stack  For temporary storage of state  Last in first out  e.g., stack of plates  Example 100 CALL Delay 101 ..... 214 Delay: ..... ..... 218 Return 22 Source: http://sir.unl.edu/portal/bios/Stack.php
  • 23. Stack Example 105 a { … 112 b() … } 231 b { … 236 f() … } 175 f { … 179 g() … } 23 113 180 237
  • 24. CISC vs. RISC Complex Instruction Set Computer  Many instructions  e.g., 75-100  Many instructions are macro-like  Simplifies programming  Most microcontrollers are based on CISC concept  e.g., PDP-11, VAX, Motorola 68k  PIC is an exception Reduced Instruction Set Computers  Few instructions  e.g., 30-40  Smaller chip, smaller pin count, & very low-power consumption  Simple but fast instructions  Harvard architecture, instruction pipelining  Industry trend for microprocessor design  e.g., Intel Pentium, PIC 24