ECE 190 Lecture 08 February 10, 2011 1 V. Kindratenko The von Neumann model Lecture Topics FSM (continued from last lecture) Von Neumann model LC-3 as a von Neumann machine Lecture materials Textbook Ch. 4 Textbook Appendix C Homework HW2 due February 17 at 5pm in the ECE 190 drop-off box Machine problem MP1.2 due February 17 at 5pm submitted electronically. Announcements Exam is next week. Check Compass for your day/room exam assignment. Remember you can have one sheet of paper with hand-written notes at the exam. No books or calculators.ECE 190 Lecture 08 February 10, 2011 2 V. Kindratenko FSM (continued from last lecture) Finish last lecture’s FSM exampleECE 190 Lecture 08 February 10, 2011 3 V. Kindratenko Von Neumann model Concept - The von Neumann model/architecture refers to a computer organization which is based on the stored-program concept - Stored-program concept refers to the computer architecture in which data and program are stored in the same memory o The von Neumann architecture ≈ stored-program concept - First computers built in 1940’s were program-controlled computers o Programmed by setting switches and physically connecting functional units - Stored-program digital computes kept their program (set of instructions) and data in read-write random-access memory Von Neumann model components - Memory – stores data and program - Processing unit – performs the data processing - Input – means to enter data and program - Output – means to extract results - Control unit – controls the order of the instruction execution Processing unitTemporary storageALUControl unitPCIRFSMMemoryMDR MARInput deviceOutput deviceECE 190 Lecture 08 February 10, 2011 4 V. Kindratenko Memory - In the last lecture we built a 22-by-3-bit memory o 3-bit addressability – at each memory location we can store 3 bits of information o 22 address space – there are that many unique memory locations that can be addressed individually o This memory can be thought of as an array, or sequence of locations that are sequentially numbered 00111011001011addresswhat is stored at a given location note address and the value stored in memory at that address o In this example, memory location ‘01’ contains value ‘111’ and memory lication’11’ contains value ‘010’ - A modern computer with 1 GB of memory o 8-bit (one byte) addressability – at each memory location we can store one byte of data o 230 address space - 230 uniquely addressable memory locations - In general, we will think of memory as a device capable of storing m n-bit words o n – addressability o m – address space o to interact with the memory, we will need n-bit data line, log2m-bit address line, and 1-bit WE line nm. . .ndatalog2maddressWEECE 190 Lecture 08 February 10, 2011 5 V. Kindratenko - Actual interaction with memory is implemented using two special-purpose registers, called MAR (memory address register) and MDR (memory data register) - To read a value form memory o Place the address of the memory location to read from in the MAR Memory circuit then will transfer data from memory to MDR o Read value from MDR - To write a value o Place the address of the memory location to write to in the MAR o Place the value to be stored in the memory in the MDR o Assert (set to 1) WE signal Memory circuit then will transfer data from MDR to memory Processing unit - Carries out actual processing of information - In the simples form, it consists of two main parts o An ALU that implements a few basic operations, such as ADD, AND, etc. As an example, LC-3 computer’s ALU has ADD, AND, and NOT operations only o A temporary storage, typically a set of few registers for storing few words of data As an example, LC-3 computer has 8 registers o The size of data items processed by the ALU is referred to as the word length, and each data item is referred to as a word As an example, LC-3 computer has word length of 16 bits (or two bytes) In a modern 64-bit microprocessor, word length is 64 bits (or 8 bytes) Input and Output - In order for computer to process the information, the information itself needs to be entered into the memory - In order for us to know the results of processing the information, the results need to be output in such a way that we can see them - To accomplish this, computers have some form of input and output devices, generically referred to as peripherals - As an example, LC-43 computer has keyboard as an input device and monitor as an output device - In the simplest form, input and output devices work with memory directly, that is, an input device places a value into some memory location and an output device reads and displays a value from some memory location o Such I/O is referred to as memory-mapped I/O Control unit - Directs the work of all other units - Keeps track of which instruction is being executed, and which instruction will be processed next; for this it uses two special-purpose registersECE 190 Lecture 08 February 10, 2011 6 V. Kindratenko o Instruction register (IR) contains current instruction being executed o Program counter (PC) register keeps a pointer (address) to the next instruction to be executed o In general, control unit can be thought of as a large FSM and the control unit cycles between different states as it directs the rest of the computer to execute a given instruction LC-3 as a von Neumann machine - In this course we will study a computer, called Little Machine 3, or LC-3 which is an implementation of the basic von Neumann architecture:ECE 190 Lecture 08 February 10, 2011 7 V. Kindratenko Stored program concept - Program is stored in some part of computer memory as a sequence of instructions - Instructions are represented and stored in memory as binary words MemoryPart of memory used to store instructionsPart of memory used to store data - Control unit reads an instruction form the memory o Instruction address of the next instruction to be executed is stored in PC The Instruction - The most basic unit of computer processing - In the simplest form, consists of two parts o Opcode (operation code) – a portion of a machine language instruction that specifies the operation to be performed o Operands – a part of a machine language instruction that specifies the data to be operated on - LC-3 instruction format example o 16-bits (one machine word) o The
View Full Document