Spring 2002INEL 4206 Microprocessors Lecture 4 1 Practical Universal Computers Prof. Bienvenido Velez Lecture 4 Bits Wires Gates Turing Machines.

Slides:



Advertisements
Similar presentations
Control path Recall that the control path is the physical entity in a processor which: fetches instructions, fetches operands, decodes instructions, schedules.
Advertisements

ARITHMETIC LOGIC SHIFT UNIT
CHAPTER 4 COMPUTER SYSTEM – Von Neumann Model
Midterm Wednesday Chapter 1-3: Number /character representation and conversion Number arithmetic Combinational logic elements and design (DeMorgan’s Law)
Levels in Processor Design
Computer Structure - Datapath and Control Goal: Design a Datapath  We will design the datapath of a processor that includes a subset of the MIPS instruction.
Overview The von Neumann Machine - the programmable digital computer Introducing the LC-3 Computer - A “toy” computer for us to learn from Computer machine.
Computer ArchitectureFall 2008 © September 17th, 2008 Majd F. Sakr CS-447– Computer Architecture.
Henry Hexmoor1 Chapter 10- Control units We introduced the basic structure of a control unit, and translated assembly instructions into a binary representation.
Chapter 7. Basic Processing Unit
Overview von Neumann Model Components of a Computer Some Computer Organization Models The Computer Bus An Example Organization: The LC-3.
Chapter 6 Memory and Programmable Logic Devices
Princess Sumaya Univ. Computer Engineering Dept. Chapter 4: IT Students.
Micro-operations Are the functional, or atomic, operations of a processor. A single micro-operation generally involves a transfer between registers, transfer.
Introduction to Computer Architecture and System
Computer Science 210 Computer Organization The von Neumann Architecture.
1 Computer Organization Today: First Hour: Computer Organization –Section 11.3 of Katz’s Textbook –In-class Activity #1 Second Hour: Test Review.
Digital Design and Computer Architecture Dr. Robert D. Kent LT Ext Lecture 1 Introduction.
Spring 2006ICOM 4036 Programming Laguages Lecture 2 1 The Nature of Computing Prof. Bienvenido Velez ICOM 4036 Lecture 2.
General Concepts of Computer Organization Overview of Microcomputer.
A Simple Computer Architecture Digital Logic Design Instructor: Kasım Sinan YILDIRIM.
Princess Sumaya Univ. Computer Engineering Dept. Chapter 5:
Computer Architecture And Organization UNIT-II General System Architecture.
The Nature of Computing INEL 4206 – Microprocessors Lecture 3 Bienvenido Vélez Ph. D. School of Engineering University of Puerto Rico - Mayagüez.
The Nature of Computing INEL 4206 – Microprocessors Lecture 2 Bienvenido Vélez Ph. D. School of Engineering University of Puerto Rico - Mayagüez.
September 26, 2001Systems Architecture I1 Systems Architecture I (CS ) Lecture 2: Implementation of a Simplified Computer Jeremy R. Johnson Wednesday,
Computer Organization CDA 3103 Dr. Hassan Foroosh Dept. of Computer Science UCF © Copyright Hassan Foroosh 2002.
Lecture 15 Microarchitecture Level: Level 1. Microarchitecture Level The level above digital logic level. Job: to implement the ISA level above it. The.
CBP 2006Comp 4070 Concepts and Philosophy of Computing 1 Wrestling with Complex Stuff. With the Correct Approach, even the smallest guy will succeed!
Our programmer needs to do this !
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.
Overview von Neumann Architecture Computer component Computer function
Computer Organization and Assembly Languages Yung-Yu Chuang 2005/09/29
Fall 2004ICOM 4036 Programming Laguages Lecture 2 1 Low-Level Programming Prof. Bienvenido Velez ICOM 4036 Lecture 2.
MARC ProgramEssential Computing for Bioinformatics 1 The Nature of Computing Prof. Bienvenido Velez ICOM 4995 Lecture 3.
1 Basic Processor Architecture. 2 Building Blocks of Processor Systems CPU.
Jeremy R. Johnson William M. Mongan
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Control Unit.
Types of Micro-operation  Transfer data between registers  Transfer data from register to external  Transfer data from external to register  Perform.
Functions of Processor Operation Addressing modes Registers i/o module interface Memory module interface Interrupts.
Fall 2002INEL 4206 Microprocessors Lecture 4 1 Easy I Control Unit (Level 3 Flowcharts) DI → ABUS → AO fetchop1 FetchOp 00 11x opcode aoprsoprloadstorebrnjump.
Computer Organization and Architecture Lecture 1 : Introduction
CS161 – Design and Architecture of Computer Systems
CS161 – Design and Architecture of Computer Systems
ECE 4110–5110 Digital System Design
Control Unit Lecture 6.
Chapter 4 The Von Neumann Model
Overview Control Memory Comparison of Implementations
Processor (I).
CS/COE0447 Computer Organization & Assembly Language
Computer Science 210 Computer Organization
Basic Processing Unit Unit- 7 Engineered for Tomorrow CSE, MVJCE.
Computer Organization and Design
A Multiple Clock Cycle Instruction Implementation
MIPS Processor.
Low-Level Programming
Levels in Processor Design
Fundamental Concepts Processor fetches one instruction at a time and perform the operation specified. Instructions are fetched from successive memory locations.
Computer Architecture
William Stallings Computer Organization and Architecture 8th Edition
Computer Architecture
The Von Neumann Architecture Odds and Ends
Control Unit (single cycle implementation)
The Nature of Computing
Control Unit (single cycle implementation)
A Top-Level View Of Computer Function And Interconnection
Chapter 4 The Von Neumann Model
Presentation transcript:

Spring 2002INEL 4206 Microprocessors Lecture 4 1 Practical Universal Computers Prof. Bienvenido Velez Lecture 4 Bits Wires Gates Turing Machines

Spring 2002INEL 4206 Microprocessors Lecture 4 2 Outline The von Neumann Architecture –Big Idea: Interpretation –Stored program concept Designing a simple processor –Instruction Set Architecture –Data Paths –Control Unit

Spring 2002INEL 4206 Microprocessors Lecture 4 3 The (John) Von Neumann Architecture (late 40’s) I/O devices Central Processing Unit (CPU) Memory Allow communication with outside world Interprets instructions Stores both programs and data After 60 years … most processors still look like this!

Spring 2002INEL 4206 Microprocessors Lecture 4 4 The von Neumann Architecture Central Processing (CPU) I/O devices Central Processing Unit (CPU) Memory Control Unit (FSM) Data Paths Interconnected registers, muxes, decoders, … controlstatus active passive

Spring 2002INEL 4206 Microprocessors Lecture 4 5 The (John) Von Neuman Architecture The Memory Unit I/O devices Central Processing Unit (CPU) Memory 0 1ADD A 2SUB B 3JUMP 1 A B … N-1 word size address space

Spring 2002INEL 4206 Microprocessors Lecture 4 6 The (John) Von Neuman Architecture Stored Program Concept 0 1ADD A 2SUB B 3JUMP 1 A B … N-1 Program Instructions Program Data Programs and their data coexist in memory Processor, under program control, keeps track of what needs to be interpreted as instructions and what as data.

Spring 2002INEL 4206 Microprocessors Lecture 4 7 Easy I A Simple Accumulator Processor Instruction Set Architecture (ISA) Instruction Format (16 bits) IopcodeX I = Indirect bit

Spring 2002INEL 4206 Microprocessors Lecture 4 8 NameOpcodeAction I=0 Action I=1 Comp AC ← not ACAC <- not AC ShR AC ← AC / 2 BrN AC < 0 ⇒ PC ← XAC < 0 ⇒ PC ← MEM[X] Jump PC ← XPC ← MEM[X] Store MEM[X] ← ACMEM[MEM[X]] ← AC Load AC ← MEM[X]AC ← MEM[MEM[X]] And AC ← AC and XAC ← AC and MEM[X] Add AC ← AC + XAC ← AC + MEM[X] Easy I A Simple Accumulator Processor Instruction Set Architecture (ISA) Instruction Set Easy all right … but universal it is!

Spring 2002INEL 4206 Microprocessors Lecture 4 9 Easy I A Simple Accumulator Processor Instruction Set Architecture (ISA) Accumulator (AC) is implicit operand to many instructions. No need to use instruction bits to specify one of the operands. More bits left for address and opcodes. Although simple, Easy I is universal. (given enough memory). Can you see this? Immediate bit specifies level of indirection for the location of the operand. I = 1: operand in X field (immediate). I=1 operand in memory location X (indirect). Some Immediate Observations on the Easy I ISA

Spring 2002INEL 4206 Microprocessors Lecture 4 10 ADDRESSBUSADDRESSBUS Easy I Data Paths Typically, designing a processor is an iterative (aka trial end error) process A0 A bus AB AC PC ALU DATABUSDATABUS DI

Spring 2002INEL 4206 Microprocessors Lecture 4 11 Processor Design Process Done Initial Data Path Design c-unit Measure Happy? Start yes no Review Data Path

Spring 2002INEL 4206 Microprocessors Lecture 4 12 Easy I Memory Interface CPU MEMORY address data word memory op {R,W,NOP}

Spring 2002INEL 4206 Microprocessors Lecture 4 13 Easy I Control Unit (Level 0 Flowcharts) Fetch Decode Execute Read next instruction Determine what it does and prepare to do it. Fetch operands. Do it! We will ignore indirect bit (assuming I = 0) for now

Spring 2002INEL 4206 Microprocessors Lecture 4 14 Easy I Control Unit (Level 1 Flowcharts) Fetch AoprSoprLoadStoreJumpBrN Level 1: Each box may take several CPU cycles to execute Reset What?

Spring 2002INEL 4206 Microprocessors Lecture 4 15 What makes a CPU cycle? CU Logic FSM logic state Data Paths Logic ALU, latches, memory Cycle time must accommodate signal propagation

Spring 2002INEL 4206 Microprocessors Lecture 4 16 Easy I Control Unit (Level 2 Flowcharts) Each box may take only one CPU cycle to execute 0 → PC reset1 PC → AO PC + 2 → PC reset2 RESET fetch Byte Addressable Can you tell why?

Spring 2002INEL 4206 Microprocessors Lecture 4 17 Easy I Control Unit (Level 3 Flowcharts) AO → EAB EDB → DI branch on opcode fetch FETCH 00 11x opcode aoprsoprloadstorebrnjump 00 00x Opcode must be an input to CU’s sequential circuit Invariant At the beginning of the fetch cycle AO holds address of instruction to be fetched and PC points to following instruction Memory Bus Operation

Spring 2002INEL 4206 Microprocessors Lecture 4 18 Easy I Control Unit (Level 2 Flowcharts) DI → ABUS → ALUA AC → ALUB ALU → AC PC → AO PC + 2 → PC aopr AOpr fetch Restore fetch invariant

Spring 2002INEL 4206 Microprocessors Lecture 4 19 Easy I Control Unit (Level 2 Flowcharts) AC → ALUB ALU → AC PC → AO PC + 2 → PC sopr SOpr fetch

Spring 2002INEL 4206 Microprocessors Lecture 4 20 Easy I Control Unit (Level 2 Flowcharts) DI → ABUS → AO load1 DI → ABUS → ALUA ALU → AC PC → AO PC + 2 → PC load2 Load fetch AO → EAB EDB → DI load3

Spring 2002INEL 4206 Microprocessors Lecture 4 21 Easy I Control Unit (Level 2 Flowcharts) DI → ABUS → AO store1 store2 Store fetch AC → EDB AO → EAB PC → AO PC + 2 → PC

Spring 2002INEL 4206 Microprocessors Lecture 4 22 Easy I Control Unit (Level 2 Flowcharts) PC → AO PC + 2 → PC brn1 brn2 BrN fetch DI → PC DI → AO PC + 2 → PC AC:15 1 (AC<0) 0 (AC>0) Bit 15 of AC input to the CU’s sequential circuit Assume branch not taken. Allow AC:15 to propagate. Can we accomplish all this in 1 cycle? How?

Spring 2002INEL 4206 Microprocessors Lecture 4 23 Inside the Easy-I PC +2 Adder ABUS PC 0 pcsel pcis PC capable of loading and incrementing simultaneously PC

Spring 2002INEL 4206 Microprocessors Lecture 4 24 Easy I Control Unit (Level 2 Flowcharts) DI → PC DI → AO PC + 2 → PC jump JUMP fetch

Spring 2002INEL 4206 Microprocessors Lecture 4 25 Easy I Data Paths (with control points) le ADDRESSBUSADDRESSBUS A0 A bus AB AC PC ALU DATABUSDATABUS DI le op is sel le sel

Spring 2002INEL 4206 Microprocessors Lecture 4 26 Easy I Control Unit State Transition Table (Part I) Curr State opcodeAC:15Next State ALU op Mem OP PC sel PC is DI le AC le AO sel AO le EDB sel reset1xx xxxxreset2XXXNOP01X00X0X reset2xx xxxxfetchXXXNOP X fetch00 00xxsoprXXXNOP11X10X0X fetch00 010xbrn1XXXRD11X10X0X fetch00 011xjumpXXXRD11X10X0X fetch00 100xstore1XXXRD11X10X0X fetch00 101xload1XXXRD11X10X0X fetch00 11xxaoprXXXRD11X10X0X aopr00 110xfetchANDNOP X aopr00 111xfetchADDNOP X sopr00 000xfetchNOTBNOP X sopr00 001xfetchSHRBNOP X

Spring 2002INEL 4206 Microprocessors Lecture 4 27 Easy I Control Unit State Transition Table (Part II) Current State opcodeAC:15Next State ALU op Mem OP PC sel PC is DI le AC le AO sel AO le EDB sel store1xx xxxxstore2XXXNOP11X0011X store2xx xxxxstore3XXXWR load1xx xxxxload2XXXNOP11X0011X load2xx xxxxload3XXXRD11X10X0X load3xx xxxxfetchXXXNOP X brn1xx xxx0fetchXXXNOP X brn1xx xxx1brn2XXXNOP X brn2xx xxxxfetchXXXNOP X jumpxx xxxxfetchXXXNOP X CU with 14 states => 4 bits of state

Spring 2002INEL 4206 Microprocessors Lecture 4 28 Easy-I Control Unit – Some missing details StateEncoding reset reset fetch 0010 aopr 0011 sopr 0100 store store store load load load brn brn jump 1101 OperationCodeOutput A000A NOTB001not B AND010A and B ADD011A + B SHRB100B / 2 4-bit Encodings for States ALU Operation Table We know how to implement this ALU ! OperationCode NOP00 ReaD01 WRite10 Control Bus Operation Table

Spring 2002INEL 4206 Microprocessors Lecture 4 29 Easy I Control Unit State Transition Table (Part I) Curr State opcodeAC:15Next State ALU op Mem OP PC sel PC is DI le AC le AO sel AO le EDB sel 0000xx xxxx0001XXX0001X00X0X 0001xx xxxx0010XXX X xx0100XXX0011X10X0X x1011XXX0111X10X0X x1101XXX0111X10X0X x0101XXX0111X10X0X x1000XXX0111X10X0X xx0011XXX0111X10X0X x X x X x X x X

Spring 2002INEL 4206 Microprocessors Lecture 4 30 Easy I Control Unit State Transition Table (Part II) Current State opcodeAC:15Next State ALU op Mem OP PC sel PC is DI le AC le AO sel AO le EDB sel 0101xx xxxx0110XXX0011X0011X 0110xx xxxx0111XXX xx xxxx1001XXX0011X0011X 1001xx xxxx1010XXX0111X10X0X 1010xx xxxx0010XXX X 1011xx xxx00010XXX X 1011xx xxx11100XXX X 1100xx xxxx0010XXX X 1101xx xxxx0010XXX X

Spring 2002INEL 4206 Microprocessors Lecture 4 31 Building the Easy-I C-Unit 2 Approaches Harwired –Apply well known sequential circuit techniques Micro-programmed –Treat state transition table as a program –Build a new abstraction layer The Microprogramming abstraction level A  program

Spring 2002INEL 4206 Microprocessors Lecture 4 32 Building the Easy-I C-Unit Hardwired Approach ROM state AC:15 DI 10 4 Data Paths Memory Unit control bus address bus data bus next state control point signals 5 Control Unit 11 2

Spring 2002INEL 4206 Microprocessors Lecture 4 33 Easy I Control Unit State Transition Table (Part II) 10-bit ROM address 18-bit ROM outputs Current State opcodeAC:15Next State ALU op Mem OP PC sel PC is DI le AC le AO sel AO le EDB sel 0101xx xxxx0110XXX00011X0011X 0110xx xxxx0111XXX xx xxxx1001XXX00011X0011X 1001xx xxxx1010XXX00111X10X0X 1010xx xxxx0010XXX X 1011xx xxx00010XXX X 1011xx xxx11100XXX X 1100xx xxxx0010XXX X 1101xx xxxx0010XXX X 64 ROM Addresses with identical content

Spring 2002INEL 4206 Microprocessors Lecture 4 34 Programmable Logic Arrays

Spring 2002INEL 4206 Microprocessors Lecture 4 35

Spring 2002INEL 4206 Microprocessors Lecture 4 36 Building the Easy-I C-Unit 2 Approaches Harwired –Apply well known sequential circuit techniques Micro-programmed –Treat state transition table as a program –Build a new abstraction layer The Microprogramming abstraction level A  program

Spring 2002INEL 4206 Microprocessors Lecture reset1reset201xx0001X00X0X reset2fetch01xx X fetchxxxx00xx0011X10X0X store1store201xx0011X0011X store2fetch01xx load1load201xx0011X0011X load2load301xx0111X10X0X load3fetch01xx0111X10X0X brn1xxxx11xx X brn2fetch01xx X jumpfetch01xx X Building the Easy-I C-Unit Micro-programmed Approach Next State Bra nch ALU op Mem OP PC sel PC is DI le AC le AO sel AO le EDB sel Opcode Mapping opcode AC:15  Program (Comb Logic) DataPath Control 2  PC 01 fetch 4 brn2 unused

Spring 2002INEL 4206 Microprocessors Lecture 4 38 Finding the first execute state Combinational Logic InstructionOpcodeAC:15First Execute State Comp xsopr ShR xsopr BrN brn1 Jump xjump Store xstore1 Load xload1 And xaopr Add xaopr Opcode Mapping opcode

Spring 2002INEL 4206 Microprocessors Lecture 4 39 Summary Instruction Set Architecture Processor Implementation What we know? From To How do we get here In the first place? What Next? Instruction Set Design