SlideShare a Scribd company logo
ELEC2041 Microprocessors and Interfacing Lecture 5: Programmer’s Model of  Microprocessors   http://webct.edtec.unsw.edu.au/ March 2005 Saeid Nooshabadi [email_address]
Overview ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Recall: Pre-Requisite ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Review: What is Subject about? ,[object Object],I/O system Processor Compiler Operating System (Windows XP) Application (Netscape) Digital Design Circuit Design Instruction Set Architecture Datapath & Control  transistors Memory Hardware Software Assembler ELEC2041
Review:Programming Levels of Representation ,[object Object],[object Object],[object Object],[object Object],High Level Language Program (e.g., C) Assembly  Language Program (e.g. ARM) Machine  Language Program (ARM) Control Signal Specification Compiler Assembler Machine Interpretation temp = v[k]; v[k] = v[k+1]; v[k+1] = temp; 1110 0101 1001 0010 0000 0000 0000 0000  1110 0101 1001 0010 0000 0000 0000 0100  1110 0101 1000 0010 0001 0000 0000 0000  1110 0101 1000 0010 0001 0000 0000 0100 ° ° ALUOP[0:3] <= InstReg[9:11] & MASK ELEC2041
Review: 5 Classic Components of a Computer Network/Bus ALU Registers Control Datapath Memory Processor Input Output Control Datapath Memory Processor Input Output
An Expanded View of the Memory Systems Control Datapath Hard disk (Virtual Memory) Processor Register Main Memory 2 nd  Cache Cache Fastest Slowest Smallest Biggest Highest Lowest Speed: Size: Cost: ,[object Object],[object Object],[object Object]
Registers ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],In ARM r15 (pc) is the program counter. It points to the  instructions  in memory 32-bit ALU Data: 32 bits Data: 32 bits Register file ARM has 16 Register: r0 - r15, (each 32 bits) From memory Selectors:4 bits
Fetch Decode Execute Cycle Obtain instruction from program storage Determine required actions Locate and obtain operand data Compute result value or status Deposit results in storage for later use Determine successor instruction Memory Processor Input Output ALU Registers Instruction Fetch Instruction Decode Operand Fetch Execute Result Store Next Instruction Control  Datapath
The Programmer’s Model of a Microcomputer Instruction Set: ldr  r0 , [r2, #0] add  r2, r3, r4 Memory: 80000004  ldr  r0 , [r2, #0]  80000008   add r2, r3, r4 8000000B   23456 80000010   AEF0 Memory mapped I/O 80000100  input 80000108   output Registers: r0 - r3, pc Programmer’s Model Addressing Modes: ldr r12,  [r1,#0] mov  r1  , r3 How to access data in registers and memory? i.e. how to determine and specify the data address in registers and memory
Memory Address Space (ARM 7TDMI) E0832004 add  r2, r3, r4 instruction 0x80000000 instruction 0x80000004 E0452006 sub r2, r5, r6 0x80000008 E5920000 ldr  r0, [r2] 0x00000020 instruction Data  20 hex  =   32 10 0x8000000C Since 1980 almost every  machine uses addresses  to level of 8-bits (bytes)  Addresses interpretations Binary Contents Same as variable Same as variable value 2 30  = address space size in words  4 x 2 30  = address space size in bytes = 4GBytes A word (4 bytes in memory)
16 Visible Registers (ARM 7TDMI) In ARM pc is the program counter.  It  points to (contains the address of ) the instructions being fetched from memory. They will be covered later
Instruction Set (ARM 7TDMI) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Registers
Data Processing Instructions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Registers All will be covered in detail later
Memory Access Instructions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],All will be covered in detail later
Control Flow Instructions ,[object Object],[object Object],[object Object],[object Object],[object Object],All will be covered in detail later 0x80000000 0x80000004 0x80000008 E0832004 add  r2, r3, r4 instruction instruction E0452006 sub r2, r5, r6 E5920000 ldr  r0, [r2] EA000004  br 0x80000018  instruction instruction 0x8000000C 0x80000018 E0852005 add  r2, r5, r5 instruction
What’s this stuff good for? GameBoy! ,[object Object],[object Object],[object Object],[object Object],IEEE Spectrum Feb 2003
Computers In the News! ,[object Object],[object Object],[object Object],[object Object],[object Object],http://www.convergencepromotions.com/IQ/issue5/iss5(Pg58-59).pdf
ELEC2041 Reading Materials (#2/2) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
ELEC2041  Laboratory Schedule ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Laboratory Groups ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Laboratory Format ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Assemble, link and run your program using the GNU Tools.  Show your working program to the Laboratory Assessor. Checkpoint 3:    Signature:
ELEC2041 Software ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],All Tools included in the Companion CD-ROM
Laboratory Documentation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Sample Assembly Program 0x20 0x94 2 0x0000001E C statement: k = k - 2 Location for variable  k 0x80 0x84 0x88 0x8C 0x90 E3A02094 mov r2, #0x94 Instruction (Data proc.) Instruction (Data proc.) E3A05002 mov r5, #2 E5920000 ldr  r0, [r2] 0x00000020 Instruction (Mem Access) Data  20 hex  =   32 10 Binary Contents E0400005 sub r0, r0, r5 E5820000 str  r0, [r2] Instruction (Data proc) Instruction (Mem Access) 0x94 r2  0x94 r5  2 r2 r0 0x94 0x20 r0 r5 0x2 0x1E - r0 r2 r0 0x94 0x1E
Compilation ,[object Object],[object Object],[object Object],[object Object],[object Object]
Conclusion ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

More Related Content

What's hot

Assembly fundamentals
Assembly fundamentalsAssembly fundamentals
Assembly fundamentals
Syed Zaid Irshad
 
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMING
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMINGChapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMING
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMING
Frankie Jones
 
Chapter 1 computer abstractions and technology
Chapter 1 computer abstractions and technologyChapter 1 computer abstractions and technology
Chapter 1 computer abstractions and technology
BATMUNHMUNHZAYA
 
Chapter 4 the processor
Chapter 4 the processorChapter 4 the processor
Chapter 4 the processor
s9007912
 
Instruction Set Architecture – II
Instruction Set Architecture – IIInstruction Set Architecture – II
Instruction Set Architecture – II
Dilum Bandara
 
Mp &mc programs
Mp &mc programsMp &mc programs
Mp &mc programs
Haritha Hary
 
MIPS Assembly Language I
MIPS Assembly Language IMIPS Assembly Language I
MIPS Assembly Language I
LiEdo
 
Introduction to Assembly Language Programming
Introduction to Assembly Language ProgrammingIntroduction to Assembly Language Programming
Introduction to Assembly Language Programming
Rahul P
 
Internet protocol
Internet protocolInternet protocol
Internet protocol
Online
 
isa architecture
isa architectureisa architecture
isa architecture
AJAL A J
 
(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
 
05 instruction set design and architecture
05 instruction set design and architecture05 instruction set design and architecture
05 instruction set design and architectureWaqar Jamil
 
TCP IP
TCP IP TCP IP
TCP IP
muh kemal
 
Lec 12-15 mips instruction set processor
Lec 12-15 mips instruction set processorLec 12-15 mips instruction set processor
Lec 12-15 mips instruction set processor
Mayank Roy
 
Lec02
Lec02Lec02
Ch02 TCP/IP Concepts Review
Ch02 TCP/IP Concepts ReviewCh02 TCP/IP Concepts Review
Ch02 TCP/IP Concepts Review
phanleson
 
10 Instruction Sets Characteristics
10  Instruction  Sets Characteristics10  Instruction  Sets Characteristics
10 Instruction Sets CharacteristicsJeanie Delos Arcos
 
VTU 4TH SEM CSE MICROPROCESSORS SOLVED PAPERS OF JUNE-2014 & JUNE-2015
VTU 4TH SEM CSE MICROPROCESSORS SOLVED PAPERS OF JUNE-2014 & JUNE-2015VTU 4TH SEM CSE MICROPROCESSORS SOLVED PAPERS OF JUNE-2014 & JUNE-2015
VTU 4TH SEM CSE MICROPROCESSORS SOLVED PAPERS OF JUNE-2014 & JUNE-2015
vtunotesbysree
 

What's hot (20)

Assembly fundamentals
Assembly fundamentalsAssembly fundamentals
Assembly fundamentals
 
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMING
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMINGChapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMING
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMING
 
06 mips-isa
06 mips-isa06 mips-isa
06 mips-isa
 
Chapter 1 computer abstractions and technology
Chapter 1 computer abstractions and technologyChapter 1 computer abstractions and technology
Chapter 1 computer abstractions and technology
 
Chapter 4 the processor
Chapter 4 the processorChapter 4 the processor
Chapter 4 the processor
 
Instruction Set Architecture – II
Instruction Set Architecture – IIInstruction Set Architecture – II
Instruction Set Architecture – II
 
Mp &mc programs
Mp &mc programsMp &mc programs
Mp &mc programs
 
MIPS Assembly Language I
MIPS Assembly Language IMIPS Assembly Language I
MIPS Assembly Language I
 
Introduction to Assembly Language Programming
Introduction to Assembly Language ProgrammingIntroduction to Assembly Language Programming
Introduction to Assembly Language Programming
 
Internet protocol
Internet protocolInternet protocol
Internet protocol
 
isa architecture
isa architectureisa architecture
isa architecture
 
(246431835) instruction set principles (2) (1)
(246431835) instruction set principles (2) (1)(246431835) instruction set principles (2) (1)
(246431835) instruction set principles (2) (1)
 
05 instruction set design and architecture
05 instruction set design and architecture05 instruction set design and architecture
05 instruction set design and architecture
 
TCP IP
TCP IP TCP IP
TCP IP
 
Lec 12-15 mips instruction set processor
Lec 12-15 mips instruction set processorLec 12-15 mips instruction set processor
Lec 12-15 mips instruction set processor
 
Lec02
Lec02Lec02
Lec02
 
Instruction codes
Instruction codesInstruction codes
Instruction codes
 
Ch02 TCP/IP Concepts Review
Ch02 TCP/IP Concepts ReviewCh02 TCP/IP Concepts Review
Ch02 TCP/IP Concepts Review
 
10 Instruction Sets Characteristics
10  Instruction  Sets Characteristics10  Instruction  Sets Characteristics
10 Instruction Sets Characteristics
 
VTU 4TH SEM CSE MICROPROCESSORS SOLVED PAPERS OF JUNE-2014 & JUNE-2015
VTU 4TH SEM CSE MICROPROCESSORS SOLVED PAPERS OF JUNE-2014 & JUNE-2015VTU 4TH SEM CSE MICROPROCESSORS SOLVED PAPERS OF JUNE-2014 & JUNE-2015
VTU 4TH SEM CSE MICROPROCESSORS SOLVED PAPERS OF JUNE-2014 & JUNE-2015
 

Viewers also liked

Presentation on Scaling
Presentation on ScalingPresentation on Scaling
Presentation on Scaling
Raviraj Kaur
 
Short channel effects
Short channel effectsShort channel effects
Short channel effects
ashish bait
 
Short Channel Effect In MOSFET
Short Channel Effect In MOSFETShort Channel Effect In MOSFET
Short Channel Effect In MOSFET
Sudhanshu Srivastava
 
The ARM Architecture: ARM : ARM Architecture
The ARM Architecture: ARM : ARM ArchitectureThe ARM Architecture: ARM : ARM Architecture
The ARM Architecture: ARM : ARM Architecture
sreea4
 
MOSFET and Short channel effects
MOSFET and Short channel effectsMOSFET and Short channel effects
MOSFET and Short channel effects
Lee Rather
 
Introduction to ARM Architecture
Introduction to ARM ArchitectureIntroduction to ARM Architecture
Introduction to ARM Architecture
Racharla Rohit Varma
 
Arm architecture
Arm architectureArm architecture

Viewers also liked (7)

Presentation on Scaling
Presentation on ScalingPresentation on Scaling
Presentation on Scaling
 
Short channel effects
Short channel effectsShort channel effects
Short channel effects
 
Short Channel Effect In MOSFET
Short Channel Effect In MOSFETShort Channel Effect In MOSFET
Short Channel Effect In MOSFET
 
The ARM Architecture: ARM : ARM Architecture
The ARM Architecture: ARM : ARM ArchitectureThe ARM Architecture: ARM : ARM Architecture
The ARM Architecture: ARM : ARM Architecture
 
MOSFET and Short channel effects
MOSFET and Short channel effectsMOSFET and Short channel effects
MOSFET and Short channel effects
 
Introduction to ARM Architecture
Introduction to ARM ArchitectureIntroduction to ARM Architecture
Introduction to ARM Architecture
 
Arm architecture
Arm architectureArm architecture
Arm architecture
 

Similar to Lect05 Prog Model

Introduction to computer architecture .pptx
Introduction to computer architecture .pptxIntroduction to computer architecture .pptx
Introduction to computer architecture .pptx
Fatma Sayed Ibrahim
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptx
vipinkmenon1
 
Lecture1 - Computer Architecture
Lecture1 - Computer ArchitectureLecture1 - Computer Architecture
Lecture1 - Computer Architecture
Volodymyr Ushenko
 
Computer architecture instruction formats
Computer architecture instruction formatsComputer architecture instruction formats
Computer architecture instruction formats
Mazin Alwaaly
 
Chapter_01_See_Program_Running.pptx
Chapter_01_See_Program_Running.pptxChapter_01_See_Program_Running.pptx
Chapter_01_See_Program_Running.pptx
WaleedAbdullah2k19EE
 
EEE226a.ppt
EEE226a.pptEEE226a.ppt
EEE226a.ppt
SaifulAhmad27
 
Cao 2012
Cao 2012Cao 2012
Cao 2012
Raja Basharat
 
Embedded System Programming on ARM Cortex M3 and M4 Course
Embedded System Programming on ARM Cortex M3 and M4 CourseEmbedded System Programming on ARM Cortex M3 and M4 Course
Embedded System Programming on ARM Cortex M3 and M4 Course
FastBit Embedded Brain Academy
 
other-architectures.ppt
other-architectures.pptother-architectures.ppt
other-architectures.ppt
Jaya Chavan
 
Design and simulation of a non pipelined multi cycle 16 bit risc educational ...
Design and simulation of a non pipelined multi cycle 16 bit risc educational ...Design and simulation of a non pipelined multi cycle 16 bit risc educational ...
Design and simulation of a non pipelined multi cycle 16 bit risc educational ...
IAEME Publication
 
bms_complete_co_ppt.aaaaaaaaaaaaaaaaaaaaa
bms_complete_co_ppt.aaaaaaaaaaaaaaaaaaaaabms_complete_co_ppt.aaaaaaaaaaaaaaaaaaaaa
bms_complete_co_ppt.aaaaaaaaaaaaaaaaaaaaa
arshadahmedkkp
 
System concept and hardware
System concept and hardwareSystem concept and hardware
System concept and hardware
fiza1975
 
Instruction codes
Instruction codesInstruction codes
Instruction codes
pradeepa velmurugan
 
UNIT 2_ESD.pdf
UNIT 2_ESD.pdfUNIT 2_ESD.pdf
UNIT 2_ESD.pdf
SaralaT3
 
05-machine-basics.pptx
05-machine-basics.pptx05-machine-basics.pptx
05-machine-basics.pptx
EricMax6
 
arm 7 microprocessor architecture ans pin diagram.ppt
arm 7 microprocessor architecture ans pin diagram.pptarm 7 microprocessor architecture ans pin diagram.ppt
arm 7 microprocessor architecture ans pin diagram.ppt
manikandan970975
 
05-machine-basics.pptx
05-machine-basics.pptx05-machine-basics.pptx
05-machine-basics.pptx
HarinarayananRajeev1
 
microprocessor
 microprocessor microprocessor
microprocessor
ATTO RATHORE
 

Similar to Lect05 Prog Model (20)

Introduction to computer architecture .pptx
Introduction to computer architecture .pptxIntroduction to computer architecture .pptx
Introduction to computer architecture .pptx
 
Highlevel assemly
Highlevel assemlyHighlevel assemly
Highlevel assemly
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptx
 
Lecture1 - Computer Architecture
Lecture1 - Computer ArchitectureLecture1 - Computer Architecture
Lecture1 - Computer Architecture
 
Computer architecture instruction formats
Computer architecture instruction formatsComputer architecture instruction formats
Computer architecture instruction formats
 
Chapter_01_See_Program_Running.pptx
Chapter_01_See_Program_Running.pptxChapter_01_See_Program_Running.pptx
Chapter_01_See_Program_Running.pptx
 
EEE226a.ppt
EEE226a.pptEEE226a.ppt
EEE226a.ppt
 
Cao 2012
Cao 2012Cao 2012
Cao 2012
 
Embedded System Programming on ARM Cortex M3 and M4 Course
Embedded System Programming on ARM Cortex M3 and M4 CourseEmbedded System Programming on ARM Cortex M3 and M4 Course
Embedded System Programming on ARM Cortex M3 and M4 Course
 
other-architectures.ppt
other-architectures.pptother-architectures.ppt
other-architectures.ppt
 
Design and simulation of a non pipelined multi cycle 16 bit risc educational ...
Design and simulation of a non pipelined multi cycle 16 bit risc educational ...Design and simulation of a non pipelined multi cycle 16 bit risc educational ...
Design and simulation of a non pipelined multi cycle 16 bit risc educational ...
 
bms_complete_co_ppt.aaaaaaaaaaaaaaaaaaaaa
bms_complete_co_ppt.aaaaaaaaaaaaaaaaaaaaabms_complete_co_ppt.aaaaaaaaaaaaaaaaaaaaa
bms_complete_co_ppt.aaaaaaaaaaaaaaaaaaaaa
 
System concept and hardware
System concept and hardwareSystem concept and hardware
System concept and hardware
 
8086 Microprocessor
8086 Microprocessor8086 Microprocessor
8086 Microprocessor
 
Instruction codes
Instruction codesInstruction codes
Instruction codes
 
UNIT 2_ESD.pdf
UNIT 2_ESD.pdfUNIT 2_ESD.pdf
UNIT 2_ESD.pdf
 
05-machine-basics.pptx
05-machine-basics.pptx05-machine-basics.pptx
05-machine-basics.pptx
 
arm 7 microprocessor architecture ans pin diagram.ppt
arm 7 microprocessor architecture ans pin diagram.pptarm 7 microprocessor architecture ans pin diagram.ppt
arm 7 microprocessor architecture ans pin diagram.ppt
 
05-machine-basics.pptx
05-machine-basics.pptx05-machine-basics.pptx
05-machine-basics.pptx
 
microprocessor
 microprocessor microprocessor
microprocessor
 

Recently uploaded

Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
CatarinaPereira64715
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
Fwdays
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 

Recently uploaded (20)

Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 

Lect05 Prog Model

  • 1. ELEC2041 Microprocessors and Interfacing Lecture 5: Programmer’s Model of Microprocessors http://webct.edtec.unsw.edu.au/ March 2005 Saeid Nooshabadi [email_address]
  • 2.
  • 3.
  • 4.
  • 5.
  • 6. Review: 5 Classic Components of a Computer Network/Bus ALU Registers Control Datapath Memory Processor Input Output Control Datapath Memory Processor Input Output
  • 7.
  • 8.
  • 9. Fetch Decode Execute Cycle Obtain instruction from program storage Determine required actions Locate and obtain operand data Compute result value or status Deposit results in storage for later use Determine successor instruction Memory Processor Input Output ALU Registers Instruction Fetch Instruction Decode Operand Fetch Execute Result Store Next Instruction Control Datapath
  • 10. The Programmer’s Model of a Microcomputer Instruction Set: ldr r0 , [r2, #0] add r2, r3, r4 Memory: 80000004 ldr r0 , [r2, #0] 80000008 add r2, r3, r4 8000000B 23456 80000010 AEF0 Memory mapped I/O 80000100 input 80000108 output Registers: r0 - r3, pc Programmer’s Model Addressing Modes: ldr r12, [r1,#0] mov r1 , r3 How to access data in registers and memory? i.e. how to determine and specify the data address in registers and memory
  • 11. Memory Address Space (ARM 7TDMI) E0832004 add r2, r3, r4 instruction 0x80000000 instruction 0x80000004 E0452006 sub r2, r5, r6 0x80000008 E5920000 ldr r0, [r2] 0x00000020 instruction Data 20 hex = 32 10 0x8000000C Since 1980 almost every machine uses addresses to level of 8-bits (bytes) Addresses interpretations Binary Contents Same as variable Same as variable value 2 30 = address space size in words 4 x 2 30 = address space size in bytes = 4GBytes A word (4 bytes in memory)
  • 12. 16 Visible Registers (ARM 7TDMI) In ARM pc is the program counter. It points to (contains the address of ) the instructions being fetched from memory. They will be covered later
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25. Sample Assembly Program 0x20 0x94 2 0x0000001E C statement: k = k - 2 Location for variable k 0x80 0x84 0x88 0x8C 0x90 E3A02094 mov r2, #0x94 Instruction (Data proc.) Instruction (Data proc.) E3A05002 mov r5, #2 E5920000 ldr r0, [r2] 0x00000020 Instruction (Mem Access) Data 20 hex = 32 10 Binary Contents E0400005 sub r0, r0, r5 E5820000 str r0, [r2] Instruction (Data proc) Instruction (Mem Access) 0x94 r2 0x94 r5 2 r2 r0 0x94 0x20 r0 r5 0x2 0x1E - r0 r2 r0 0x94 0x1E
  • 26.
  • 27.