1 / 39

Practical Universal Computers

Practical Universal Computers. Bits Wires Gates Turing Machines. Prof. Bienvenido Velez. Lecture 4. Outline. The von Neumann Architecture Big Idea: Interpretation Stored program concept Designing a simple processor Instruction Set Architecture Data Paths Control Unit.

mahsa
Download Presentation

Practical Universal Computers

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Practical Universal Computers Bits Wires Gates Turing Machines Prof. Bienvenido Velez Lecture 4 INEL 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 INEL 4206 Microprocessors Lecture 4

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

  4. Interconnected registers, muxes, decoders, … The von Neumann ArchitectureCentral Processing (CPU) I/O devices Control Unit (FSM) Central Processing Unit (CPU) active control status Data Paths Memory passive INEL 4206 Microprocessors Lecture 4

  5. The (John) Von Neuman ArchitectureThe Memory Unit word size I/O devices address space Central Processing Unit (CPU) Memory INEL 4206 Microprocessors Lecture 4

  6. The (John) Von Neuman ArchitectureStored Program Concept 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. INEL 4206 Microprocessors Lecture 4

  7. 15 14 10 9 0 I opcode X Easy IA Simple Accumulator Processor Instruction Set Architecture (ISA) Instruction Format (16 bits) I = Indirect bit INEL 4206 Microprocessors Lecture 4

  8. Easy IA Simple Accumulator Processor Instruction Set Architecture (ISA) Instruction Set Easy all right … but universal it is! INEL 4206 Microprocessors Lecture 4

  9. Easy IA 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 INEL 4206 Microprocessors Lecture 4

  10. Easy IData Paths A bus PC A0 A D D R E S S B U S D A T A B U S DI A B ALU AC Typically, designing a processor is an iterative (aka trial end error) process INEL 4206 Microprocessors Lecture 4

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

  12. Easy IMemory Interface MEMORY CPU address data word memory op {R,W,NOP} INEL 4206 Microprocessors Lecture 4

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

  14. Easy IControl Unit(Level 1 Flowcharts) Reset Fetch Aopr Sopr Load Store BrN Jump What? Level 1: Each box may take several CPU cycles to execute INEL 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 INEL 4206 Microprocessors Lecture 4

  16. RESET Easy IControl Unit(Level 2 Flowcharts) reset1 Byte Addressable Can you tell why? reset2 fetch Each box may take only one CPU cycle to execute INEL 4206 Microprocessors Lecture 4

  17. aopr sopr load store brn jump FETCH Easy IControl Unit(Level 3 Flowcharts) Memory Bus Operation fetch Invariant At the beginning of the fetch cycle AO holds address of instruction to be fetched and PC points to following instruction 00 11x 00 00x 00 101 00 100 00 010 00 011 opcode Opcode must be an input to CU’s sequential circuit INEL 4206 Microprocessors Lecture 4

  18. AOpr Easy IControl Unit(Level 2 Flowcharts) aopr Restore fetch invariant fetch INEL 4206 Microprocessors Lecture 4

  19. SOpr Easy IControl Unit(Level 2 Flowcharts) sopr fetch INEL 4206 Microprocessors Lecture 4

  20. Load Easy IControl Unit(Level 2 Flowcharts) load1 load2 load3 fetch INEL 4206 Microprocessors Lecture 4

  21. Store Easy IControl Unit(Level 2 Flowcharts) store1 store2 fetch INEL 4206 Microprocessors Lecture 4

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

  23. Inside the Easy-I PC ABUS PC pcis 1 0 0 +2 Adder PC capable of loading and incrementing simultaneously 00 01 10 11 pcsel PC INEL 4206 Microprocessors Lecture 4

  24. JUMP Easy IControl Unit(Level 2 Flowcharts) jump fetch INEL 4206 Microprocessors Lecture 4

  25. Easy IData Paths (with control points) A bus is A D D R E S S B U S PC D A T A B U S sel sel 1 0 le DI A0 le A B op ALU AC le sel 0 1 INEL 4206 Microprocessors Lecture 4

  26. Easy IControl Unit State Transition Table (Part I) INEL 4206 Microprocessors Lecture 4

  27. Easy IControl Unit State Transition Table (Part II) CU with 14 states => 4 bits of state INEL 4206 Microprocessors Lecture 4

  28. Easy-I Control Unit – Some missing details 4-bit Encodings for States ALU Operation Table We know how to implement this ALU ! Control Bus Operation Table INEL 4206 Microprocessors Lecture 4

  29. Easy IControl Unit State Transition Table (Part I) INEL 4206 Microprocessors Lecture 4

  30. Easy IControl Unit State Transition Table (Part II) INEL 4206 Microprocessors Lecture 4

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

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

  33. 64 ROM Addresses with identical content Easy IControl Unit State Transition Table (Part II) 10-bit ROM address 18-bit ROM outputs INEL 4206 Microprocessors Lecture 4

  34. Programmable Logic Arrays INEL 4206 Microprocessors Lecture 4

  35. INEL 4206 Microprocessors Lecture 4

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

  37. PC Building the Easy-I C-UnitMicro-programmed Approach 4 Program (Comb Logic) 00 01 10 11 unused Opcode Mapping 0 1 fetch brn2 AC:15 2 opcode DataPath Control INEL 4206 Microprocessors Lecture 4

  38. Finding the first execute stateCombinational Logic Opcode Mapping opcode INEL 4206 Microprocessors Lecture 4

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

More Related