SlideShare a Scribd company logo
1 of 24
Chapter 4
The Von Neumann
Model
4-2
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
The Stored Program Computer
1943: ENIAC
• Presper Eckert and John Mauchly -- first general electronic computer.
(or was it John V. Atananasoff in 1939?)
• Hard-wired program -- settings of dials and switches.
1944: Beginnings of EDVAC
• among other improvements, includes program stored in memory
1945: John von Neumann
• wrote a report on the stored program concept,
known as the First Draft of a Report on EDVAC
The basic structure proposed in the draft became known
as the “von Neumann machine” (or model).
• a memory, containing instructions and data
• a processing unit, for performing arithmetic and logical operations
• a control unit, for interpreting instructions
For more history, see http://www.maxmon.com/history.htm
4-3
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Von Neumann Model
M E M O R Y
C O N T R O L U N IT
M A R M D R
IR
P R O C E S S IN G U N IT
A L U T E M P
P C
O U T P U T
M o n i t o r
P r i n t e r
L E D
D is k
IN P U T
K e y b o a r d
M o u s e
S c a n n e r
D is k
4-4
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Memory
k x m array of stored bits (k is usually 2n
)
Address
• unique (n-bit) identifier of location
Contents
• m-bit value stored in location
Basic Operations:
LOAD
• read a value from a memory location
STORE
• write a value to a memory location
•
•
•
0000
0001
0010
0011
0100
0101
0110
1101
1110
1111
00101101
10100010
4-5
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Interface to Memory
How does processing unit get data to/from memory?
MAR: Memory Address Register
MDR: Memory Data Register
To read a location (A):
1. Write the address (A) into the MAR.
2. Send a “read” signal to the memory.
3. Read the data from MDR.
To write a value (X) to a location (A):
1. Write the data (X) to the MDR.
2. Write the address (A) into the MAR.
3. Send a “write” signal to the memory.
M E M O R Y
M A R M D R
4-6
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Processing Unit
Functional Units
• ALU = Arithmetic and Logic Unit
• could have many functional units.
some of them special-purpose
(multiply, square root, …)
• LC-2 performs ADD, AND, NOT
Registers
• Small, temporary storage
• Operands and results of functional units
• LC-2 has eight register (R0, …, R7)
Word Size
• number of bits normally processed by ALU in one instruction
• also width of registers
• LC-2 is 16 bits
P R O C E S S IN G U N IT
A L U T E M P
4-7
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Input and Output
Devices for getting data into and out of computer
memory
Each device has its own interface,
usually a set of registers like the
memory’s MAR and MDR
• LC-2 supports keyboard (input) and console (output)
• keyboard: data register (KBDR) and status register (KBSR)
• console: data register (CRTDR) and status register (CRTSR)
Some devices provide both input and output
• disk, network
Program that controls access to a device is
usually called a driver.
IN P U T
K e y b o a r d
M o u s e
S c a n n e r
D is k
O U T P U T
M o n i t o r
P r i n t e r
L E D
D is k
4-8
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Control Unit
Orchestrates execution of the program
Instruction Register (IR) contains the current instruction.
Program Counter (PC) contains the address
of the next instruction to be executed.
Control unit:
• reads an instruction from memory
 the instruction’s address is in the PC
• interprets the instruction, generating signals
that tell the other components what to do
 an instruction may take many machine cycles to complete
C O N T R O L U N IT
I RP C
4-9
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Instruction Processing
Decode instructionDecode instruction
Evaluate addressEvaluate address
Fetch operands from memoryFetch operands from memory
Execute operationExecute operation
Store resultStore result
Fetch instruction from memoryFetch instruction from memory
4-10
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Instruction
The instruction is the fundamental unit of work.
Specifies two things:
• opcode: operation to be performed
• operands: data/locations to be used for operation
An instruction is encoded as a sequence of bits.
(Just like data!)
• Often, but not always, instructions have a fixed length,
such as 16 or 32 bits.
• Control unit interprets instruction:
generates sequence of control signals to carry out operation.
• Operation is either executed completely, or not at all.
A computer’s instructions and their formats is known as its
Instruction Set Architecture (ISA).
4-11
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Example: LC-2 ADD Instruction
LC-2 has 16-bit instructions.
• Each instruction has a four-bit opcode, bits [15:12].
LC-2 has eight registers (R0-R7) for temporary storage.
• Sources and destination of ADD are registers.
“Add the contents of R2 to the contents of R6,
and store the result in R6.”
4-12
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Example: LC-2 LDR Instruction
Load instruction -- reads data from memory
Base + offset mode:
• add offset to base register -- result is memory address
• load from memory address into destination register
“Add the value 6 to the contents of R3 to form a
memory address. Load the contents stored in
that address to R2.”
4-13
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Instruction Processing: FETCH
Load next instruction (at address stored in PC)
from memory
into Instruction Register (IR).
• Load contents of PC into MAR.
• Send “read” signal to memory.
• Read contents of MDR, store in IR.
Then increment PC, so that it points to
the next instruction in sequence.
• PC becomes PC+1.
EAEA
OPOP
EXEX
SS
FF
DD
4-14
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Instruction Processing: DECODE
First identify the opcode.
• In LC-2, this is always the first four bits of instruction.
• A 4-to-16 decoder asserts a control line corresponding
to the desired opcode.
Depending on opcode, identify other operands
from the remaining bits.
• Example:
for LDR, last six bits is offset
for ADD, last three bits is source operand #2
EAEA
OPOP
EXEX
SS
FF
DD
4-15
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Instruction Processing: EVALUATE ADDRESS
For instructions that require memory access,
compute address used for access.
Examples:
• add offset to base register (as in LDR)
• add offset to PC (or to part of PC)
• add offset to zero
EAEA
OPOP
EXEX
SS
FF
DD
4-16
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Instruction Processing: FETCH OPERANDS
Obtain source operands needed to
perform operation.
Examples:
• load data from memory (LDR)
• read data from register file (ADD) EAEA
OPOP
EXEX
SS
FF
DD
4-17
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Instruction Processing: EXECUTE
Perform the operation,
using the source operands.
Examples:
• send operands to ALU and assert ADD signal
• do nothing (e.g., for loads and stores) EAEA
OPOP
EXEX
SS
FF
DD
4-18
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Instruction Processing: STORE
Write results to destination.
(register or memory)
Examples:
• result of ADD is placed in destination register
• result of memory load is placed in destination register
• for store instruction, data is stored to memory
write address to MAR, data to MDR
assert WRITE signal to memory
EAEA
OPOP
EXEX
SS
FF
DD
4-19
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Changing the Sequence of Instructions
In the FETCH phase,
we incremented the Program Counter by 1.
What if we don’t want to always execute the instruction
that follows this one?
• examples: loop, if-then, function call
Need special instructions that change the contents
of the PC.
These are called jumps and branches.
• jumps are unconditional -- they always change the PC
• branches are conditional -- they change the PC only if
some condition is true (e.g., the contents of a register is zero)
4-20
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Example: LC-2 JMPR Instruction
Set the PC to the value obtained by adding an offset
to a register. This becomes the address of the next
instruction to fetch.
“Add the value of 6 to the contents of R3,
and load the result into the PC.”
4-21
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Instruction Processing Summary
Instructions look just like data -- it’s all interpretation.
Three basic kinds of instructions:
• computational instructions (ADD, AND, …)
• data movement instructions (LD, ST, …)
• control instructions (JMP, BRnz, …)
Six basic phases of instruction processing:
F → D → EA → OP → EX → S
• not all phases are needed by every instruction
• phases may take variable number of machine cycles
4-22
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Driving Force: The Clock
The clock is a signal that keeps the control unit moving.
• At each clock “tick,” control unit moves to the next
machine cycle -- may be next instruction or
next phase of current instruction.
Clock generator circuit:
• Based on crystal oscillator
• Generates regular sequence of “0” and “1” logic levels
• Clock cycle (or machine cycle) -- rising edge to rising edge
“1”
“0”
time→Machine
Cycle
4-23
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Instructions vs. Clock Cycles
MIPS vs. MHz
• MIPS = millions of instructions per second
• MHz = millions of clock cycles per second
These are not the same -- why?
4-24
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Stopping the Clock
Control unit will repeat instruction processing sequence
as long as clock is running.
• If not processing instructions from your application,
then it is processing instructions from the Operating System (OS).
• The OS is a special program that manages processor
and other resources.
To stop the computer:
• AND the clock generator signal with ZERO
• when control unit stops seeing the CLOCK signal, it stops processing

More Related Content

What's hot

Computer organisation
Computer organisationComputer organisation
Computer organisationMohd Arif
 
Introduction to CPU registers
Introduction to CPU registersIntroduction to CPU registers
Introduction to CPU registersMuhammad Waqas
 
Computer Organization
Computer OrganizationComputer Organization
Computer Organizationanishgoel
 
Addressing modes (detailed data path)
Addressing modes (detailed data path)Addressing modes (detailed data path)
Addressing modes (detailed data path)Mahesh Kumar Attri
 
Central processing unit
Central processing unitCentral processing unit
Central processing unitjyoti_lakhani
 
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 processorMayank Roy
 
Computer organization and architecture
Computer organization and architectureComputer organization and architecture
Computer organization and architectureSubesh Kumar Yadav
 
Computer organization basics
Computer organization  basicsComputer organization  basics
Computer organization basicsDeepak John
 
central processing unit and pipeline
central processing unit and pipelinecentral processing unit and pipeline
central processing unit and pipelineRai University
 
Flag registers, addressing modes, instruction set
Flag registers, addressing modes, instruction setFlag registers, addressing modes, instruction set
Flag registers, addressing modes, instruction setaviban
 
Computer Organization and 8085 microprocessor notes
Computer Organization and 8085 microprocessor notesComputer Organization and 8085 microprocessor notes
Computer Organization and 8085 microprocessor notesLakshmi Sarvani Videla
 
Introduction to 8085 Microprocessor
Introduction to 8085 MicroprocessorIntroduction to 8085 Microprocessor
Introduction to 8085 MicroprocessorRavi Anand
 

What's hot (19)

Computer organisation
Computer organisationComputer organisation
Computer organisation
 
Introduction to CPU registers
Introduction to CPU registersIntroduction to CPU registers
Introduction to CPU registers
 
Chapter 8
Chapter 8Chapter 8
Chapter 8
 
Computer Organization
Computer OrganizationComputer Organization
Computer Organization
 
Addressing modes (detailed data path)
Addressing modes (detailed data path)Addressing modes (detailed data path)
Addressing modes (detailed data path)
 
Central processing unit
Central processing unitCentral processing unit
Central processing unit
 
register
registerregister
register
 
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
 
Basic Computer Organization and Design
Basic  Computer  Organization  and  DesignBasic  Computer  Organization  and  Design
Basic Computer Organization and Design
 
Computer organization and architecture
Computer organization and architectureComputer organization and architecture
Computer organization and architecture
 
Computer organization basics
Computer organization  basicsComputer organization  basics
Computer organization basics
 
8085 alp programs
8085 alp programs8085 alp programs
8085 alp programs
 
central processing unit and pipeline
central processing unit and pipelinecentral processing unit and pipeline
central processing unit and pipeline
 
Instruction codes
Instruction codesInstruction codes
Instruction codes
 
Flag registers, addressing modes, instruction set
Flag registers, addressing modes, instruction setFlag registers, addressing modes, instruction set
Flag registers, addressing modes, instruction set
 
Computer Organization and 8085 microprocessor notes
Computer Organization and 8085 microprocessor notesComputer Organization and 8085 microprocessor notes
Computer Organization and 8085 microprocessor notes
 
Processor Basics
Processor BasicsProcessor Basics
Processor Basics
 
Introduction to 8085 Microprocessor
Introduction to 8085 MicroprocessorIntroduction to 8085 Microprocessor
Introduction to 8085 Microprocessor
 
Introduction to 8085 Microprocessor
Introduction to 8085 MicroprocessorIntroduction to 8085 Microprocessor
Introduction to 8085 Microprocessor
 

Viewers also liked

Von neuman
Von neumanVon neuman
Von neumantuxman82
 
Registers
RegistersRegisters
RegistersGaditek
 
Final presentation2
Final presentation2Final presentation2
Final presentation2emilyahlers
 
Cờ Tướng - Cờ tướng khai cuộc hiện đại
Cờ Tướng - Cờ tướng khai cuộc hiện đạiCờ Tướng - Cờ tướng khai cuộc hiện đại
Cờ Tướng - Cờ tướng khai cuộc hiện đạiTran Tuan
 
Cờ Tướng - Cát chiêu thực dụng
Cờ Tướng - Cát chiêu thực dụngCờ Tướng - Cát chiêu thực dụng
Cờ Tướng - Cát chiêu thực dụngTran Tuan
 
Cờ Tướng - Thuận pháo cổ điển và hiện đại - Tập 2
Cờ Tướng - Thuận pháo cổ điển và hiện đại - Tập 2Cờ Tướng - Thuận pháo cổ điển và hiện đại - Tập 2
Cờ Tướng - Thuận pháo cổ điển và hiện đại - Tập 2Tran Tuan
 
Asee Klub Banja Koviljača 2013.Pozitivna Produktivnost Srđan Nonković ASEE
Asee Klub Banja Koviljača 2013.Pozitivna Produktivnost Srđan Nonković ASEEAsee Klub Banja Koviljača 2013.Pozitivna Produktivnost Srđan Nonković ASEE
Asee Klub Banja Koviljača 2013.Pozitivna Produktivnost Srđan Nonković ASEEAdizesSEE
 
Cờ Tướng - Thuận pháo cổ điển và hiện đại - Tập 1
Cờ Tướng - Thuận pháo cổ điển và hiện đại - Tập 1Cờ Tướng - Thuận pháo cổ điển và hiện đại - Tập 1
Cờ Tướng - Thuận pháo cổ điển và hiện đại - Tập 1Tran Tuan
 
Asee Klub Skoplje 2013. - Y generacija Robert Kamerer
Asee Klub Skoplje 2013. - Y generacija  Robert KamererAsee Klub Skoplje 2013. - Y generacija  Robert Kamerer
Asee Klub Skoplje 2013. - Y generacija Robert KamererAdizesSEE
 
Cờ Tướng - Quất trung bí
Cờ Tướng - Quất trung bíCờ Tướng - Quất trung bí
Cờ Tướng - Quất trung bíTran Tuan
 
Coins coins and more coins
Coins coins and more coinsCoins coins and more coins
Coins coins and more coinscheryl4752
 
Cờ Tướng - 63 yếu lĩnh trong cờ tướng
Cờ Tướng - 63 yếu lĩnh trong cờ tướng Cờ Tướng - 63 yếu lĩnh trong cờ tướng
Cờ Tướng - 63 yếu lĩnh trong cờ tướng Tran Tuan
 

Viewers also liked (20)

Shift registers
Shift registersShift registers
Shift registers
 
Von neuman
Von neumanVon neuman
Von neuman
 
Registers
RegistersRegisters
Registers
 
Shift registers
Shift registersShift registers
Shift registers
 
Final presentation2
Final presentation2Final presentation2
Final presentation2
 
Cờ Tướng - Cờ tướng khai cuộc hiện đại
Cờ Tướng - Cờ tướng khai cuộc hiện đạiCờ Tướng - Cờ tướng khai cuộc hiện đại
Cờ Tướng - Cờ tướng khai cuộc hiện đại
 
Cờ Tướng - Cát chiêu thực dụng
Cờ Tướng - Cát chiêu thực dụngCờ Tướng - Cát chiêu thực dụng
Cờ Tướng - Cát chiêu thực dụng
 
Atlas did not shrug
Atlas did not shrugAtlas did not shrug
Atlas did not shrug
 
Cờ Tướng - Thuận pháo cổ điển và hiện đại - Tập 2
Cờ Tướng - Thuận pháo cổ điển và hiện đại - Tập 2Cờ Tướng - Thuận pháo cổ điển và hiện đại - Tập 2
Cờ Tướng - Thuận pháo cổ điển và hiện đại - Tập 2
 
Laser Shock Peening - LSP
Laser Shock Peening - LSPLaser Shock Peening - LSP
Laser Shock Peening - LSP
 
Asee Klub Banja Koviljača 2013.Pozitivna Produktivnost Srđan Nonković ASEE
Asee Klub Banja Koviljača 2013.Pozitivna Produktivnost Srđan Nonković ASEEAsee Klub Banja Koviljača 2013.Pozitivna Produktivnost Srđan Nonković ASEE
Asee Klub Banja Koviljača 2013.Pozitivna Produktivnost Srđan Nonković ASEE
 
Cờ Tướng - Thuận pháo cổ điển và hiện đại - Tập 1
Cờ Tướng - Thuận pháo cổ điển và hiện đại - Tập 1Cờ Tướng - Thuận pháo cổ điển và hiện đại - Tập 1
Cờ Tướng - Thuận pháo cổ điển và hiện đại - Tập 1
 
Coursera
CourseraCoursera
Coursera
 
Asee Klub Skoplje 2013. - Y generacija Robert Kamerer
Asee Klub Skoplje 2013. - Y generacija  Robert KamererAsee Klub Skoplje 2013. - Y generacija  Robert Kamerer
Asee Klub Skoplje 2013. - Y generacija Robert Kamerer
 
Healthy lifestyle
Healthy lifestyleHealthy lifestyle
Healthy lifestyle
 
Cờ Tướng - Quất trung bí
Cờ Tướng - Quất trung bíCờ Tướng - Quất trung bí
Cờ Tướng - Quất trung bí
 
Coins coins and more coins
Coins coins and more coinsCoins coins and more coins
Coins coins and more coins
 
Cờ Tướng - 63 yếu lĩnh trong cờ tướng
Cờ Tướng - 63 yếu lĩnh trong cờ tướng Cờ Tướng - 63 yếu lĩnh trong cờ tướng
Cờ Tướng - 63 yếu lĩnh trong cờ tướng
 
Ugm lansman bulteni
Ugm lansman bulteniUgm lansman bulteni
Ugm lansman bulteni
 
IPTV Sistemleri
IPTV SistemleriIPTV Sistemleri
IPTV Sistemleri
 

Similar to Von Neumann Model Explained

Unit-3 Von Neumann Architecture.ppt
Unit-3 Von Neumann Architecture.pptUnit-3 Von Neumann Architecture.ppt
Unit-3 Von Neumann Architecture.pptSatheeswaranV
 
Von neuman architecture
Von neuman architectureVon neuman architecture
Von neuman architecturessuserf06014
 
PattPatelCh04.ppt
PattPatelCh04.pptPattPatelCh04.ppt
PattPatelCh04.pptDipakShow2
 
ICT-Lecture_12(VonNeumannArchitecture).pptx
ICT-Lecture_12(VonNeumannArchitecture).pptxICT-Lecture_12(VonNeumannArchitecture).pptx
ICT-Lecture_12(VonNeumannArchitecture).pptxSirRafiLectures
 
isa architecture
isa architectureisa architecture
isa architectureAJAL A J
 
Computer organiztion5
Computer organiztion5Computer organiztion5
Computer organiztion5Umang Gupta
 
UNIT 3 - General Purpose Processors
UNIT 3 - General Purpose ProcessorsUNIT 3 - General Purpose Processors
UNIT 3 - General Purpose ProcessorsButtaRajasekhar2
 
Unit1_Basic_Structure_of_Computer-7-11-2022-11am.ppt.pdf
Unit1_Basic_Structure_of_Computer-7-11-2022-11am.ppt.pdfUnit1_Basic_Structure_of_Computer-7-11-2022-11am.ppt.pdf
Unit1_Basic_Structure_of_Computer-7-11-2022-11am.ppt.pdfIronMan665214
 
Basic computer organization and design
Basic computer organization and designBasic computer organization and design
Basic computer organization and designmahesh kumar prajapat
 
BASIC COMPUTER ORGANIZATION AND DESIGN
BASIC  COMPUTER  ORGANIZATION  AND  DESIGNBASIC  COMPUTER  ORGANIZATION  AND  DESIGN
BASIC COMPUTER ORGANIZATION AND DESIGNDr. Ajay Kumar Singh
 
COA CHAPTER 5
COA CHAPTER 5COA CHAPTER 5
COA CHAPTER 5Mori77
 
Instruction codes and computer registers
Instruction codes and computer registersInstruction codes and computer registers
Instruction codes and computer registersmahesh kumar prajapat
 
Computer Organization & Architecture (COA) Unit 2
Computer Organization & Architecture (COA) Unit 2Computer Organization & Architecture (COA) Unit 2
Computer Organization & Architecture (COA) Unit 2parthivrathodlits
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAAiman Hud
 

Similar to Von Neumann Model Explained (20)

Unit-3 Von Neumann Architecture.ppt
Unit-3 Von Neumann Architecture.pptUnit-3 Von Neumann Architecture.ppt
Unit-3 Von Neumann Architecture.ppt
 
Von neuman architecture
Von neuman architectureVon neuman architecture
Von neuman architecture
 
PattPatelCh04.ppt
PattPatelCh04.pptPattPatelCh04.ppt
PattPatelCh04.ppt
 
ICT-Lecture_12(VonNeumannArchitecture).pptx
ICT-Lecture_12(VonNeumannArchitecture).pptxICT-Lecture_12(VonNeumannArchitecture).pptx
ICT-Lecture_12(VonNeumannArchitecture).pptx
 
isa architecture
isa architectureisa architecture
isa architecture
 
Computer organiztion5
Computer organiztion5Computer organiztion5
Computer organiztion5
 
CPU Architecture
CPU ArchitectureCPU Architecture
CPU Architecture
 
UNIT 3 - General Purpose Processors
UNIT 3 - General Purpose ProcessorsUNIT 3 - General Purpose Processors
UNIT 3 - General Purpose Processors
 
Bc0040
Bc0040Bc0040
Bc0040
 
Unit1_Basic_Structure_of_Computer-7-11-2022-11am.ppt.pdf
Unit1_Basic_Structure_of_Computer-7-11-2022-11am.ppt.pdfUnit1_Basic_Structure_of_Computer-7-11-2022-11am.ppt.pdf
Unit1_Basic_Structure_of_Computer-7-11-2022-11am.ppt.pdf
 
unit2 (1).ppt
unit2 (1).pptunit2 (1).ppt
unit2 (1).ppt
 
Ch5 official.ppt
Ch5 official.pptCh5 official.ppt
Ch5 official.ppt
 
Unit. 3 coa.ppt
Unit. 3 coa.pptUnit. 3 coa.ppt
Unit. 3 coa.ppt
 
Basic computer organization and design
Basic computer organization and designBasic computer organization and design
Basic computer organization and design
 
BASIC COMPUTER ORGANIZATION AND DESIGN
BASIC  COMPUTER  ORGANIZATION  AND  DESIGNBASIC  COMPUTER  ORGANIZATION  AND  DESIGN
BASIC COMPUTER ORGANIZATION AND DESIGN
 
COA CHAPTER 5
COA CHAPTER 5COA CHAPTER 5
COA CHAPTER 5
 
Instruction codes and computer registers
Instruction codes and computer registersInstruction codes and computer registers
Instruction codes and computer registers
 
CPU.ppd
CPU.ppdCPU.ppd
CPU.ppd
 
Computer Organization & Architecture (COA) Unit 2
Computer Organization & Architecture (COA) Unit 2Computer Organization & Architecture (COA) Unit 2
Computer Organization & Architecture (COA) Unit 2
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
 

Recently uploaded

Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 

Recently uploaded (20)

Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 

Von Neumann Model Explained

  • 1. Chapter 4 The Von Neumann Model
  • 2. 4-2 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. The Stored Program Computer 1943: ENIAC • Presper Eckert and John Mauchly -- first general electronic computer. (or was it John V. Atananasoff in 1939?) • Hard-wired program -- settings of dials and switches. 1944: Beginnings of EDVAC • among other improvements, includes program stored in memory 1945: John von Neumann • wrote a report on the stored program concept, known as the First Draft of a Report on EDVAC The basic structure proposed in the draft became known as the “von Neumann machine” (or model). • a memory, containing instructions and data • a processing unit, for performing arithmetic and logical operations • a control unit, for interpreting instructions For more history, see http://www.maxmon.com/history.htm
  • 3. 4-3 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Von Neumann Model M E M O R Y C O N T R O L U N IT M A R M D R IR P R O C E S S IN G U N IT A L U T E M P P C O U T P U T M o n i t o r P r i n t e r L E D D is k IN P U T K e y b o a r d M o u s e S c a n n e r D is k
  • 4. 4-4 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Memory k x m array of stored bits (k is usually 2n ) Address • unique (n-bit) identifier of location Contents • m-bit value stored in location Basic Operations: LOAD • read a value from a memory location STORE • write a value to a memory location • • • 0000 0001 0010 0011 0100 0101 0110 1101 1110 1111 00101101 10100010
  • 5. 4-5 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Interface to Memory How does processing unit get data to/from memory? MAR: Memory Address Register MDR: Memory Data Register To read a location (A): 1. Write the address (A) into the MAR. 2. Send a “read” signal to the memory. 3. Read the data from MDR. To write a value (X) to a location (A): 1. Write the data (X) to the MDR. 2. Write the address (A) into the MAR. 3. Send a “write” signal to the memory. M E M O R Y M A R M D R
  • 6. 4-6 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Processing Unit Functional Units • ALU = Arithmetic and Logic Unit • could have many functional units. some of them special-purpose (multiply, square root, …) • LC-2 performs ADD, AND, NOT Registers • Small, temporary storage • Operands and results of functional units • LC-2 has eight register (R0, …, R7) Word Size • number of bits normally processed by ALU in one instruction • also width of registers • LC-2 is 16 bits P R O C E S S IN G U N IT A L U T E M P
  • 7. 4-7 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Input and Output Devices for getting data into and out of computer memory Each device has its own interface, usually a set of registers like the memory’s MAR and MDR • LC-2 supports keyboard (input) and console (output) • keyboard: data register (KBDR) and status register (KBSR) • console: data register (CRTDR) and status register (CRTSR) Some devices provide both input and output • disk, network Program that controls access to a device is usually called a driver. IN P U T K e y b o a r d M o u s e S c a n n e r D is k O U T P U T M o n i t o r P r i n t e r L E D D is k
  • 8. 4-8 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Control Unit Orchestrates execution of the program Instruction Register (IR) contains the current instruction. Program Counter (PC) contains the address of the next instruction to be executed. Control unit: • reads an instruction from memory  the instruction’s address is in the PC • interprets the instruction, generating signals that tell the other components what to do  an instruction may take many machine cycles to complete C O N T R O L U N IT I RP C
  • 9. 4-9 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Instruction Processing Decode instructionDecode instruction Evaluate addressEvaluate address Fetch operands from memoryFetch operands from memory Execute operationExecute operation Store resultStore result Fetch instruction from memoryFetch instruction from memory
  • 10. 4-10 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Instruction The instruction is the fundamental unit of work. Specifies two things: • opcode: operation to be performed • operands: data/locations to be used for operation An instruction is encoded as a sequence of bits. (Just like data!) • Often, but not always, instructions have a fixed length, such as 16 or 32 bits. • Control unit interprets instruction: generates sequence of control signals to carry out operation. • Operation is either executed completely, or not at all. A computer’s instructions and their formats is known as its Instruction Set Architecture (ISA).
  • 11. 4-11 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Example: LC-2 ADD Instruction LC-2 has 16-bit instructions. • Each instruction has a four-bit opcode, bits [15:12]. LC-2 has eight registers (R0-R7) for temporary storage. • Sources and destination of ADD are registers. “Add the contents of R2 to the contents of R6, and store the result in R6.”
  • 12. 4-12 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Example: LC-2 LDR Instruction Load instruction -- reads data from memory Base + offset mode: • add offset to base register -- result is memory address • load from memory address into destination register “Add the value 6 to the contents of R3 to form a memory address. Load the contents stored in that address to R2.”
  • 13. 4-13 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Instruction Processing: FETCH Load next instruction (at address stored in PC) from memory into Instruction Register (IR). • Load contents of PC into MAR. • Send “read” signal to memory. • Read contents of MDR, store in IR. Then increment PC, so that it points to the next instruction in sequence. • PC becomes PC+1. EAEA OPOP EXEX SS FF DD
  • 14. 4-14 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Instruction Processing: DECODE First identify the opcode. • In LC-2, this is always the first four bits of instruction. • A 4-to-16 decoder asserts a control line corresponding to the desired opcode. Depending on opcode, identify other operands from the remaining bits. • Example: for LDR, last six bits is offset for ADD, last three bits is source operand #2 EAEA OPOP EXEX SS FF DD
  • 15. 4-15 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Instruction Processing: EVALUATE ADDRESS For instructions that require memory access, compute address used for access. Examples: • add offset to base register (as in LDR) • add offset to PC (or to part of PC) • add offset to zero EAEA OPOP EXEX SS FF DD
  • 16. 4-16 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Instruction Processing: FETCH OPERANDS Obtain source operands needed to perform operation. Examples: • load data from memory (LDR) • read data from register file (ADD) EAEA OPOP EXEX SS FF DD
  • 17. 4-17 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Instruction Processing: EXECUTE Perform the operation, using the source operands. Examples: • send operands to ALU and assert ADD signal • do nothing (e.g., for loads and stores) EAEA OPOP EXEX SS FF DD
  • 18. 4-18 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Instruction Processing: STORE Write results to destination. (register or memory) Examples: • result of ADD is placed in destination register • result of memory load is placed in destination register • for store instruction, data is stored to memory write address to MAR, data to MDR assert WRITE signal to memory EAEA OPOP EXEX SS FF DD
  • 19. 4-19 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Changing the Sequence of Instructions In the FETCH phase, we incremented the Program Counter by 1. What if we don’t want to always execute the instruction that follows this one? • examples: loop, if-then, function call Need special instructions that change the contents of the PC. These are called jumps and branches. • jumps are unconditional -- they always change the PC • branches are conditional -- they change the PC only if some condition is true (e.g., the contents of a register is zero)
  • 20. 4-20 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Example: LC-2 JMPR Instruction Set the PC to the value obtained by adding an offset to a register. This becomes the address of the next instruction to fetch. “Add the value of 6 to the contents of R3, and load the result into the PC.”
  • 21. 4-21 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Instruction Processing Summary Instructions look just like data -- it’s all interpretation. Three basic kinds of instructions: • computational instructions (ADD, AND, …) • data movement instructions (LD, ST, …) • control instructions (JMP, BRnz, …) Six basic phases of instruction processing: F → D → EA → OP → EX → S • not all phases are needed by every instruction • phases may take variable number of machine cycles
  • 22. 4-22 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Driving Force: The Clock The clock is a signal that keeps the control unit moving. • At each clock “tick,” control unit moves to the next machine cycle -- may be next instruction or next phase of current instruction. Clock generator circuit: • Based on crystal oscillator • Generates regular sequence of “0” and “1” logic levels • Clock cycle (or machine cycle) -- rising edge to rising edge “1” “0” time→Machine Cycle
  • 23. 4-23 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Instructions vs. Clock Cycles MIPS vs. MHz • MIPS = millions of instructions per second • MHz = millions of clock cycles per second These are not the same -- why?
  • 24. 4-24 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Stopping the Clock Control unit will repeat instruction processing sequence as long as clock is running. • If not processing instructions from your application, then it is processing instructions from the Operating System (OS). • The OS is a special program that manages processor and other resources. To stop the computer: • AND the clock generator signal with ZERO • when control unit stops seeing the CLOCK signal, it stops processing

Editor's Notes

  1. This matches the example in the text, but it may be a little confusing because there is no JMPR in the table in Chapter 5. Instead, there’s a JSRR -- bit 11 determines whether to link or not, which determines whether it’s JMPR or JSRR.