Review for Final Exam LC3 – Controller FPGAs Multipliers

Slides:



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

A Digital Circuit Toolbox
Control path Recall that the control path is the physical entity in a processor which: fetches instructions, fetches operands, decodes instructions, schedules.
PART 5: (2/2) Processor Internals CHAPTER 15: CONTROL UNIT OPERATION 1.
Registers and Counters. Register Register is built with gates, but has memory. The only type of flip-flop required in this class – the D flip-flop – Has.
Chapter 5 The LC-3.
Processor System Architecture
CHAPTER 4 COMPUTER SYSTEM – Von Neumann Model
Chapter 5 The LC-3 LC-3 Computer Architecture Memory Map
Recap – Our First Computer WR System Bus 8 ALU Carry output A B S C OUT F 8 8 To registers’ input/output and clock inputs Sequence of control signal combinations.
Chapters 5 - The LC-3 LC-3 Computer Architecture Memory Map
Chapters 4 & 5: LC-3 Computer Architecture Machine Instructions Assembly language Programming in Machine and Assembly Language.
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
Computer Organization and Architecture
Lecture 13 - Introduction to the Central Processing Unit (CPU)
Micro-operations Are the functional, or atomic, operations of a processor. A single micro-operation generally involves a transfer between registers, transfer.
Lecture 2: Field Programmable Gate Arrays September 13, 2004 ECE 697F Reconfigurable Computing Lecture 2 Field Programmable Gate Arrays.
SAP1 (Simple-As-Possible) Computer
Conversion from one number base to another Equation simplification Conversion to/from SOP/POS Minimization using Karnaugh Maps Minterm and Maxterm Equations.
Introduction to Computing Systems from bits & gates to C & beyond Chapter 4 The Von Neumann Model Basic components Instruction processing.
EXECUTION OF COMPLETE INSTRUCTION
FPGA-Based System Design: Chapter 3 Copyright  2004 Prentice Hall PTR FPGA Fabric n Elements of an FPGA fabric –Logic element –Placement –Wiring –I/O.
FPGA-Based System Design: Chapter 3 Copyright  2004 Prentice Hall PTR Topics n FPGA fabric architecture concepts.
The von Neumann Model – Chapter 4
Basic Sequential Components CT101 – Computing Systems Organization.
Introduction to Computing Systems from bits & gates to C & beyond Chapter 5 The LC-3 Instruction Set Architecture ISA Overview Operate instructions Data.
Chapter 5 The LC Instruction Set Architecture ISA = All of the programmer-visible components and operations of the computer memory organization.
CPE232 Basic MIPS Architecture1 Computer Organization Multi-cycle Approach Dr. Iyad Jafar Adapted from Dr. Gheith Abandah slides
8085. Microcomputer Major components of the computer - the processor, the control unit, one or more memory ICs, one or more I/O ICs, and the clock Major.
September 26, 2001Systems Architecture I1 Systems Architecture I (CS ) Lecture 2: Implementation of a Simplified Computer Jeremy R. Johnson Wednesday,
12/13/ _01 1 Computer Organization EEC-213 Computer Organization Electrical and Computer Engineering.
ESS | FPGA for Dummies | | Maurizio Donna FPGA for Dummies Basic FPGA architecture.
Spring 2007W. Rhett Davis with minor modification by Dean Brock UNCA ECE 406Slide 1 ECE 406 – Design of Complex Digital Systems Lecture 12: Intro to the.
© BYU LC3-DC Page 1 ECEn 224 LC3-DC Designing The LC-3 Control IR PC enaMARMenaPC enaALU enaMDR ALU AB.
Processor Data Path and Control How they work together.
Von Neumann Model Computer Organization I 1 September 2009 © McQuain, Feng & Ribbens The Stored Program Computer 1945: John von Neumann –
09 MUX Page 1 ECEn/CS 224 Multiplexers Decoders ROMs (LUTs)
Spring 20067W. Rhett Davis with minor modification by Dean Brock UNCA ECE 406Slide 1 ECE 406 Design of Complex Digital Systems Lecture 11: Data Converter,
Spring 2009W. Rhett DavisNC State UniversityECE 406Slide 1 ECE 406 – Design of Complex Digital Systems Lecture 12: Intro to the LC-3 Micro-architecture.
Jeremy R. Johnson William M. Mongan
FPGA-Based System Design: Chapter 3 Copyright  2004 Prentice Hall PTR Topics n FPGA fabric architecture concepts.
Logic Gates Dr.Ahmed Bayoumi Dr.Shady Elmashad. Objectives  Identify the basic gates and describe the behavior of each  Combine basic gates into circuits.
© BYU 19 FPGA Page 1 ECEn 224 Field Programmable Gate Array FPGA.
© BYU LC3-3 Page 1 ECEn 224 The LC-3 State Machine.
LC-3 Datapath ECE/CS 252, Fall 2010 Prof. Mikko Lipasti Department of Electrical and Computer Engineering University of Wisconsin – Madison.
This chapter in the book includes: Objectives Study Guide
ETE Digital Electronics
Sequential Logic Design
Dr.Ahmed Bayoumi Dr.Shady Elmashad
CS161 – Design and Architecture of Computer Systems
SAP1 (Simple-As-Possible) Computer
Topics SRAM-based FPGA fabrics: Xilinx. Altera..
Chap 7. Register Transfers and Datapaths
William Stallings Computer Organization and Architecture 7th Edition
Basics of digital systems
This chapter in the book includes: Objectives Study Guide
The LC-3 Instruction Set Architecture Data Movement instructions
Instructor: Alexander Stoytchev
Topic 6 LC-3.
William Stallings Computer Organization and Architecture 7th Edition
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.
Joseph Ravichandran, Srijan Chakraborty, Kanad Sarkar
Levels in Processor Design
Levels in Processor Design
Levels in Processor Design
FIGURE 5-1 MOS Transistor, Symbols, and Switch Models
Basic components Instruction processing
Instruction Set Architecture
Presentation transcript:

Review for Final Exam LC3 – Controller FPGAs Multipliers Debounce Circuit Basic Operation of N and P Type FETs Logic Gates Built from FETs

Input Forming Logic Output Forming Logic Current State LC-3 Datapath F

Current State Datapath Control IFL OFL LC-3 Datapath Next State Datapath Status

Instruction Fetch 1. Copy PC contents to MAR 2. Perform memory read enaPC = 1 & ldMAR= 1 ldMAR enaPC ldPC PC 2. Perform memory read selMDR=1 & ldMDR=1 selPC Increment PC selPC = 00 & ldPC = 1 3. Copy memory output register contents to IR enaMDR = 1 & ldIR = 1 selMDR A B ALU ldIR IR ldMDR enaMDR

The Control Logic Flip Flops OFL IFL IR N Z P aluControl nzpMatch enaMARM selEAB1 selEAB2 selMAR memWE enaALU enaMDR selMDR regWE enaPC selPC ldMDR ldMAR DR SR1 SR2 ldPC ldIR Flip Flops OFL IFL IR N Z P

The Fetch Cycle PC MAR PC  PC+1, Mem[MAR]  MDR MDR  IR Fetch0 enaPC ldMAR selPC <= “00” ldPC selMDR <= ‘1’ ldMDR Fetch1 Fetch2 enaMDR ldIR

A Note on Timing In all cases: Buses are driven and muxes are selected during a state Registers and memory inputs are latched on the rising clock edge at the end of the state

Fetch 0 master loads during the last state of the previous instruction F0 master loads

PC contents are driven onto the Bus The contents of the PC are loaded into MAR Fetch 0 Fetch 1 Fetch 2 PC contents are driven onto the Bus

The contents of the PC are loaded into MAR Fetch 0 Fetch 1 Fetch 2 MAR and F1 masters load

Data is fetched from memory / PC is incremented Fetch Instruction into MDR / Increment PC Fetch 0 Fetch 1 Fetch 2 Data is fetched from memory / PC is incremented

MDR, PC and F2 masters load Fetch Instruction into MDR / Increment PC Fetch 0 Fetch 1 Fetch 2 MDR, PC and F2 masters load

MDR contents are driven onto the Bus Load the instruction into the IR Fetch 0 Fetch 1 Fetch 2 MDR contents are driven onto the Bus

Load the instruction into the IR Fetch 0 Fetch 1 Fetch 2 IR master loads

The LEA Instruction R[DR]  PC + IR[8:0] 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 LEA 1110 DR PCoffset9 selEAB1 <= ‘0’ selEAB2 <= “10” selMAR <= ‘0’ enaMARM DR <= IR[11:9] regWE LEA0 R[DR]  PC + IR[8:0] Note that the PC Offset is always a 2’s complement (signed) value to Fetch0

The LDR Instruction MAR  R[BaseR]+offset6 MDR  Mem[MAR] R[DR]  MDR SR1 <= IR[8:6] selEAB1 <= ‘1’ selEAB2 <= “01” selMAR <= ‘0’ enaMARM ldMAR LDR0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 LDR 0110 DR BaseR offset6 LDR1 selMDR <= ‘1’ ldMDR MAR  R[BaseR]+offset6 MDR  Mem[MAR] R[DR]  MDR LDR2 enaMDR DR <= IR[11:9] regWE to Fetch0

The LDI Instruction MAR  PC + IR[8:0] MDR  Mem[MAR] MAR  MDR selEAB1 <= ‘0’ selEAB2 <= “10” selMAR <= ‘0’ enaMARM ldMAR LDI0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 LDI1 LDI 1010 DR PCoffset9 selMDR <= ‘1’ ldMDR LDI2 enaMDR ldMAR MAR  PC + IR[8:0] MDR  Mem[MAR] MAR  MDR R[DR]  MDR LDI3 selMDR <= ‘1’ ldMDR LDI4 enaMDR DR <= IR[11:9] regWE to Fetch0

The STR Instruction MAR  R[BaseR]+offset MDR  R[SR] Write memory SR1 <= IR[8:6] selEAB1 <= ‘1’ selEAB2 <= “01” selMAR <= ‘0’ enaMARM ldMAR STR0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 STR 0111 SR BaseR offset6 SR1 <= IR[11:9] aluControl <= PASS enaALU selMDR <= ‘0’ ldMDR STR1 MAR  R[BaseR]+offset MDR  R[SR] Write memory STR2 memWE to Fetch0

The STI Instruction MAR  PC + IR[8:0] MDR  M[MAR] MAR  MDR selEAB1 <= ‘0’ selEAB2 <= “10” selMAR <= ‘0’ enaMARM ldMAR STI0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 STI1 STI 1011 SR PCoffset9 selMDR <= ‘1’ ldMDR STI2 enaMDR ldMAR MAR  PC + IR[8:0] MDR  M[MAR] MAR  MDR MDR  R[SR] Write memory SR1 <= IR[11:9] aluControl <= PASS enaALU selMDR <= ‘0’ ldMDR STI3 STI4 memWE to Fetch0

The JSRR Instruction 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 JSRR 0100 00 BaseR 000000 JSRR0 enaPC DR <= “111”, regWE Note: Same opcode as JSR! (determined by IR bit 11) R7  PC PC  R[BaseR] SR1 <= IR[8:6] selEAB1 <= ‘1’ selEAB2 <= “00” selPC <= “01” ldPC JSRR1 to Fetch0

FPGAs

Using ROM as Combinational Logic F A C schem1 8 x 1 ROM (LUT) A B C F lut1 tt1

Mapping Larger Functions To ROMs LUT (CD) B C D f1 LUT A’f1 + Af2 f2 F LUT (B+C) B C D A Very similar to how we decomposed functions to implement with MUX blocks…

Mapping a Gate Network to LUTs

Mapping a Gate Network to 3LUTs

Mapping Same Network to 4LUTs

Programmable logic elements (LEs) FPGAs – What Are They? Programmable logic elements (LEs) Programmable wiring areas I/O Buffers I/O Buffers I/O Buffers I/O Buffers communicate between FPGA and the outside world I/O Buffers An FPGA is a Programmable Logic Device (PLD) It can be programmed to perform any function desired.

An FPGA Architecture (Island Style) Logic Elements Column Wires Row wires Each LE is configured to do a function Wire intersections are programmed to either connect or not

Programmable Interconnect Junction Column wire =1 ON Connected Row wire Unconnected =0 OFF

Example Problem Generate the N, Z, P status flags for a microprocessor D0-D5 Z D5 N P N’

Can be done with wiring only or with 1 4LUT Example Problem Generate the N, Z, P status flags for a microprocessor Z’ D0-D5 Z D5 N P N’ Can be done with wiring only or with 1 4LUT Will require 2 4LUTs Will require 1 4LUT

LUT #7: F2 = F1•D4’•D5’  Z output N 1 2 3 4 5 D0 D1 6 7 8 9 10 P D2 11 12 13 14 15 D3 D4 D5 LUT #1: F1 = D0’• D1’• D2’• D3’ LUT #7: F2 = F1•D4’•D5’  Z output LUT #8: F3 = D5  N output LUT #9: F4 = Z’ • N’  P output Z

Configuring an FPGA An FPGA contains a configuration pin Configuration bits are shifted into FPGA using this pin, one bit per cycle Configuration bits in FPGA linked into a long shift register (SIPO) Examples on following slides  conceptual Commercial devices slightly different

Configuration Storage Structure of a 3LUT b0 b1 b2 Configuration Storage Bits (Flip Flops) b3 LUT Output b4 b5 b6 It’s just an 8:1 MUX LUT inputs select which config bit is sent to LUT output Programming LUT function  setting configuration bits b7 3 LUT Inputs

How are the Configuration Bit Flip Flops Loaded? A serial-in/parallel-out (SIPO) shift register These are the configuration bits which the LUT selects from … D Q b6 1 CLK CONFIG 1 D Q b7 CONFIG CLK …

Configuring the Programmable Interconnect Column wire Configuration bit b Arranged in a SIPO shift register also Row wire

Multipliers

Binary Shift/Add Multiplication Multiplicand Result Shift Register 1 1 - - - - ‘0000’ 1 0 1 Shift Register 0000 1 1 0101 Multiplier Full Adder 0101

Binary Shift/Add Multiplication Load 0101 Multiplicand Result Shift Register 1 1 1 1 - - - - ‘0000’ 0 1 Shift Register 1 1 Multiplier Full Adder 0101

Binary Shift/Add Multiplication Multiplicand Result Shift Register 1 1 1 1 - - - ‘0000’ 0 1 Shift Register - 1 Multiplier Full Adder

Binary Shift/Add Multiplication Multiplicand Result Shift Register 1 1 1 1 - - - ‘0000’ 1 0 1 Shift Register 0010 - 1 0101 Multiplier Full Adder 0111

Binary Shift/Add Multiplication Load 0111 Multiplicand Result Shift Register 1 1 1 1 1 1 - - - ‘0000’ 0 1 Shift Register - 1 Multiplier Full Adder 0111

Binary Shift/Add Multiplication Multiplicand Result Shift Register 1 1 1 1 1 1 - - ‘0000’ 0 1 Shift Register - - Multiplier Full Adder

Binary Shift/Add Multiplication Multiplicand Result Shift Register 1 1 1 1 1 1 - - ‘0000’ 0 1 Shift Register 0011 - - 0000 Multiplier Full Adder 0011

Binary Shift/Add Multiplication Load 0011 Multiplicand Result Shift Register 1 1 1 1 1 1 - - ‘0000’ 0 1 Shift Register - - Multiplier Full Adder 0011

Binary Shift/Add Multiplication Multiplicand Result Shift Register 1 1 1 1 1 1 - ‘0000’ 0 1 Shift Register - - - Multiplier Full Adder

Binary Shift/Add Multiplication Multiplicand Result Shift Register 1 1 1 1 1 1 - ‘0000’ 0 1 Shift Register 0001 - - - 0000 Multiplier Full Adder 0001

Binary Shift/Add Multiplication Load 0001 Multiplicand Result Shift Register 1 1 1 1 1 1 - ‘0000’ 0 1 Shift Register - - - Multiplier Full Adder 0001

Binary Shift/Add Multiplication Multiplicand Result Shift Register 1 1 1 1 1 1 ‘0000’ 0 1 Shift Register - - - - Multiplier Full Adder

Debouncer

Draw a State Graph S0 S3 S1 S2 noisy’ clrTimer noisy’•timerDone noisy debounced noisy•timerDone’ noisy noisy•timerDone noisy’ S2 debounced clrTimer noisy

An Improved State Graph noisy’/clrTimer Looks like the FSM can be implemented with just a single FF Do you see why there is no need for a reset input? S0 noisy•timerDone’ noisy•timerDone noisy’•timerDone S1 debounced noisy’•timerDone’ As mentioned, Mealy machines often require fewer states… noisy/clrTimer

Basic Operation of N and P Type FETs N-Type FET P-Type FET S S S S G = Vcc G = Gnd D D D D S S S S G = Gnd G = Vcc D D D D

Logic Gates Built from FETs Logic Gate Implementation Using Field Effect Transistors P I O I1 I2