The von Neumann Model – Chapter 4 COMP 2620 Dr. James Money COMP 2620 1.

Slides:



Advertisements
Similar presentations
Processor Data Path and Control Diana Palsetia UPenn
Advertisements

Chapter 4 The Von Neumann Model
Chapter 4 The Von Neumann Model
Chapter 5 The LC-3.
Chapter 4 - ISA 1.The Von Neumann Model. 4-2 The Stored Program Computer 1943: ENIAC Presper Eckert and John Mauchly -- first general electronic computer.
Computer Systems. Computer System Components Computer Networks.
CHAPTER 4 COMPUTER SYSTEM – Von Neumann Model
LC-3 Instruction Set Architecture (Textbook’s Chapter 5)
Midterm Wednesday Chapter 1-3: Number /character representation and conversion Number arithmetic Combinational logic elements and design (DeMorgan’s Law)
LC-3 Architecture Patt and Patel Ch. 4 1.
Overview The von Neumann Machine - the programmable digital computer Introducing the LC-3 Computer - A “toy” computer for us to learn from Computer machine.
Chapters 5 - The LC-3 LC-3 Computer Architecture Memory Map
Henry Hexmoor1 Chapter 10- Control units We introduced the basic structure of a control unit, and translated assembly instructions into a binary representation.
Overview von Neumann Model Components of a Computer Some Computer Organization Models The Computer Bus An Example Organization: The LC-3.
Lecture 13 - Introduction to the Central Processing Unit (CPU)
Computer Science 210 Computer Organization The Instruction Execution Cycle.
Micro-operations Are the functional, or atomic, operations of a processor. A single micro-operation generally involves a transfer between registers, transfer.
Computer Science 210 Computer Organization The von Neumann Architecture.
Introduction to Computing Systems from bits & gates to C & beyond Chapter 4 The Von Neumann Model Basic components Instruction processing.
Introduction to Computing Systems from bits & gates to C & beyond The Von Neumann Model Basic components Instruction processing.
Chapter 4 The Von Neumann Model
The von Neumann Model – Chapter 4
Chapter 5 The LC Instruction Set Architecture ISA = All of the programmer-visible components and operations of the computer memory organization.
Introduction to Computer Engineering CS/ECE 252, Fall 2009 Prof. Mark D. Hill Computer Sciences Department University of Wisconsin – Madison.
Introduction to Computing Systems from bits & gates to C & beyond Chapter 4 The Von Neumann Model Basic components Instruction processing.
Chapter 5 The LC Instruction Set Architecture ISA = All of the programmer-visible components and operations of the computer memory organization.
Fetch-execute cycle.
The von Neumann Model – Chapter 4 COMP 2620 Dr. James Money COMP
Von Neumann Model Computer Organization I 1 September 2009 © McQuain, Feng & Ribbens The Stored Program Computer 1945: John von Neumann –
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Control Unit.
Question What technology differentiates the different stages a computer had gone through from generation 1 to present?
Chapter 4 The Von Neumann Model
Designing a CPU –Reading a programs instruction from memory –Decoding the instruction –Executing the instruction –Transferring Data to/From memory / IO.
Computer Organization Instructions Language of The Computer (MIPS) 2.
Introduction to Computing Systems and Programming The LC-2.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Control Unit.
Click to edit Master title style Click to edit Master text styles – –Second level Third level – –Fourth level » »Fifth level 1 – –Second level Third level.
Logic Gates Dr.Ahmed Bayoumi Dr.Shady Elmashad. Objectives  Identify the basic gates and describe the behavior of each  Combine basic gates into circuits.
Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 251 Introduction to Computer Organization.
Dr.Ahmed Bayoumi Dr.Shady Elmashad
Control Unit Lecture 6.
Lecture 13 - Introduction to the Central Processing Unit (CPU)
Chapter 4 The Von Neumann Model
Computer Science 210 Computer Organization
Chapter 4 The Von Neumann Model
Introduction to Computer Engineering
Chapter 4 The Von Neumann Model
Computer Science 210 Computer Organization
Chapter 5 The LC-3.
The Processor and Machine Language
Chapter 4 The Von Neumann Model
Computer Science 210 Computer Organization
Computer Science 210 Computer Organization
Functional Units.
Introduction to Computer Engineering
Topic 6 LC-3.
The Von Neumann Model Basic components Instruction processing
Introduction to Computer Engineering
The Little Man Computer
Fundamental Concepts Processor fetches one instruction at a time and perform the operation specified. Instructions are fetched from successive memory locations.
Computer Architecture
Chapter 4 The Von Neumann Model
The Stored Program Computer
Basic components Instruction processing
Objectives Describe common CPU components and their function: ALU Arithmetic Logic Unit), CU (Control Unit), Cache Explain the function of the CPU as.
Introduction to Computer Engineering
Introduction to Computer Engineering
Introduction to Computer Engineering
Introduction to Computer Engineering
Chapter 4 The Von Neumann Model
Presentation transcript:

The von Neumann Model – Chapter 4 COMP 2620 Dr. James Money COMP

The LC-3 as a von Neumann Machine

Note the two kinds of arrowheads in the diagram: – Filled in – control signals for the processing of data elements – Not Filled in – denotes data elements and the flow of data along the path The ALU has two input data elements and one output The ALUK line controls the operation performed by the ALU

The LC-3 as a von Neumann Machine Note the lines with the slash through them and the number next to it This indicates the number of bits transmitted along the data and/or control path Same notation applies to both data and control paths

Memory Memory contains the storage elements along with the MAR for addressing the memory elements The MDR holds the contents of a memory location to/from storage MAR is 16 bits, so the address space is 2 16 The MDR is 16 bits indicating each memory location is 16 bits

Input/Output There are two: – Keyboard – Monitor For the keyboard, there are two registers: – KBDR – keyboard data register which has the ASCII code if the keys struck – KBSR – keyboard status register for status about the keys struck

Input/Output The monitor has also two registers: – DDR – ASCII code of the character to be displayed on the screen – DSR – the associated status information for the character to be printed on the screen We will talk more about these in detail in Chapter 8

Processing Unit This consists of the – ALU – arithmetic and logic unit – Eight registers R0,R1,…,R7 Use to store temporary values Also used as operands for operations

Processing Unit The ALU only has three operations: – Addition – Bitwise AND – Bitwise NOT We will have to spend some time implementing the other functions to achieve full assembly language

Control Unit This contains the parts to control flow of the program executing It contains the finite state machine, which directs all activity Processing is carried out step-by-step and not clock cycle by clock cycle There is the CLK input to the finite state machine which specifies how long each clock cycle lasts

Control Unit The Instruction Register (IR) is input to finite state machine and has the current instruction This is input to the finite state machine since it determines what activities must be carried out The Program Counter (PC) keeps track of the next instruction to be executed

Control Unit Note all the outputs from the finite state machine are controls These control processing in various parts of the computer For example, the ALUK of 2 bits controls which operation is performed by the ALU Another is the GateALU which controls whether the output of the ALU is provided to the processor during the current clock cycle.

Instruction Processing The most basic unit of processing is the instruction There are two parts: – Opcode – what the instruction does – Operands – the parameters to the opcode, for example Registers Constants

Instruction Processing Each instruction is 16 bits, or one word on the LC-3 The bits are numbered left to right from [15] to [0]. Bits [15:12] contain the opcode There are at most 2 4 = 16 opcodes Bits [11:0] are operands

Instruction Cycle Each instruction is handled in a systematic way through a sequence of steps call the instruction cycle Each step is called a phase There are six phases to the cycle

Instruction Cycle The six phases of the instruction cycle are: – Fetch – Decode – Evaluate Address – Fetch Operands – Execute – Store Result

FETCH Fetch obtains the next instruction from memory and loads it into the IR of the control unit We first use the PC to find the address of the next instruction

FETCH The FETCH stage takes multiple steps: – MAR is loaded with the value of PC and increment the PC – Memory is interrogated which results in the instruction being placed in the MDR – The IR is loaded with the contents of the MDR Note the PC must be incremented at the same time

FETCH Note that the first step takes 1 machine cycle The second one can take multiple machine cycles Step 3 takes on machine cycle

DECODE This step looks at the highest 4 bits to determine what to do A 4-to-16 decoder decides which of the 16 opcodes is to be processed Input is IR[15:12] The output line is the one that corresponds to the opcode

EVALUATE ADDRESS This phase reads the memory address needed to process the instruction An example is the LDR – Causes a value stored in memory to be loaded into a register – The memory location is in the form base+offset – This final memory location is being evaluated at this step

FETCH OPERANDS This phase obtains the source operands For the LDR example, the MAR is loaded with the address of the EVALUATE ADDRESS phase and reading memory with data in the MDR For ADD, this would be obtaining the values for the source operands

Execute In this phase, the instruction is actually executed For ADD, this is the step of performing the addition in the ALU

STORE RESULT The last phase is to write the result to the correct location This may involve writing to memory or registers

Instruction Cycle Once STORE RESULT is done, the control unit starts again with a new machine instruction It begins with FETCH and repeats The PC already has the location of the next instruction to execute Continues until processing order breaks

Example: LC-3 ADD Instruction LC-3 has 16-bit instructions. – Each instruction has a four-bit opcode, bits [15:12]. LC-3 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.”

Example: LC-3 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 of that memory location to R2.”