ESE 150 – Digital Audio Basics

Slides:



Advertisements
Similar presentations
Part 4: combinational devices
Advertisements

Give qualifications of instructors: DAP
Penn ESE370 Fall DeHon 1 ESE370: Circuit-Level Modeling, Design, and Optimization for Digital Systems Day 24: November 4, 2011 Synchronous Circuits.
CS 151 Digital Systems Design Lecture 37 Register Transfer Level
Logic Circuits Another look at Floating Point Numbers Common Combinational Logic Circuits Timing Sequential Circuits Note: Multiplication & Division in.
11/16/2004EE 42 fall 2004 lecture 331 Lecture #33: Some example circuits Last lecture: –Edge triggers –Registers This lecture: –Example circuits –shift.
Computer ArchitectureFall 2008 © August 20 th, Introduction to Computer Architecture Lecture 2 – Digital Logic Design.
Combinational Logic1 DIGITAL LOGIC DESIGN by Dr. Fenghui Yao Tennessee State University Department of Computer Science Nashville, TN.
Penn ESE Spring DeHon 1 ESE (ESE534): Computer Organization Day 5: January 24, 2007 ALUs, Virtualization…
ENGIN112 L26: Shift Registers November 3, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 26 Shift Registers.
CS3350B Computer Architecture Winter 2015 Lecture 5.2: State Circuits: Circuits that Remember Marc Moreno Maza [Adapted.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Logic Circuits I.
Introduction to Computing Systems from bits & gates to C & beyond Chapter 3 Digital Logic Structures Transistors Logic gates & Boolean logic Combinational.
CPS120: Introduction to Computer Science
CHAPTER 4 Combinational Logic
Abdullah Said Alkalbani University of Buraimi
1 ENGG 1015 Tutorial Digital Logic (II) (70 pages) 15 Oct Learning Objectives  Learn about Boolean Algebra (SoP/PoS, DrMorgan's Theorem, simplification),
1 Ethics of Computing MONT 113G, Spring 2012 Session 5 Binary Addition.
CS/COE0447 Computer Organization & Assembly Language
Logic Design CS221 1 st Term combinational circuits Cairo University Faculty of Computers and Information.
Digital Logic Design Basics Combinational Circuits Sequential Circuits Pu-Jen Cheng Adapted from the slides prepared by S. Dandamudi for the book, Fundamentals.
4–1. BSCS 5 th Semester Introduction Logic diagram: a graphical representation of a circuit –Each type of gate is represented by a specific graphical.
1 CS/COE0447 Computer Organization & Assembly Language Logic Design Appendix C.
Appendix C Basics of Logic Design. Appendix C — Logic Basic — 2 Logic Design Basics §4.2 Logic Design Conventions Objective: To understand how to build.
Week 1: Introduction and Logic gates IT3002 – Computer Architecture
Introduction to the FPGA and Labs
Hardware Description Languages: Verilog
This chapter in the book includes: Objectives Study Guide
Sequential Logic Design

Prof. Sin-Min Lee Department of Computer Science
Flip Flops Lecture 10 CAP
Introduction to Registers
ESE534 Computer Organization
COMP541 Sequential Logic – 2: Finite State Machines
Basics of digital systems
CS Chapter 3 (3A and ) – Part 4 of 5
Basics of Digital Logic Design Presentation D
This chapter in the book includes: Objectives Study Guide
Assistant Prof. Fareena Saqib Florida Institute of Technology
ECE Digital logic Lecture 16: Synchronous Sequential Logic
Inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture #21 State Elements: Circuits that Remember Hello to James Muerle in the.
Digital Design Fundamentals
Basics Combinational Circuits Sequential Circuits Ahmad Jawdat
Chapter 4 Gates and Circuits.
CS Fall 2005 – Lec. #5 – Sequential Logic - 1
Fundamentals of Computer Science Part i2
Digital Logic Structures Logic gates & Boolean logic
触发器 Flip-Flops 刘鹏 浙江大学信息与电子工程学院 March 27, 2018
CS/COE0447 Computer Organization & Assembly Language
Day 26: November 1, 2013 Synchronous Circuits
Lecture 8 Logistics Last lecture Last last lecture Today
CSE 370 – Winter Sequential Logic - 1
Week 7: Gates and Circuits: PART II
Digital Logic.
CSE 370 – Winter Sequential Logic-2 - 1
Dr. Clincy Professor of CS
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
CS/COE0447 Computer Organization & Assembly Language
Guest Lecture by David Johnston
Logic Circuits I Lecture 3.
Overview Last lecture Digital hardware systems Today
Digital Logic Circuits
ESE 150 – Digital Audio Basics
ESE 150 – Digital Audio Basics
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
Lecture 18 Logistics Last lecture Today HW5 due today (with extra 10%)
Digital Circuits and Logic
Lecture 4 Sequential units. Registers
Instructor: Michael Greenbaum
Presentation transcript:

ESE 150 – Digital Audio Basics Lecture #7 – Digital Logic ESE 150 – Digital Audio Basics ESE150 Spring 2019 Based on slides © 2009--2019 DeHon

----------------click MP3 Player / iPhone / Droid ESE150 Spring 2019 So far MIC A/D 10101001101 DFT Identify Masking Huffman encoding Music 1 domain conversion 5,6 Numbers correspond to course weeks compress sample freq pyscho- acoustics 3 2 4 Huffman Decode IDFT EULA ----------------click OK D/A 10101001101 speaker MP3 Player / iPhone / Droid

How Process How do we build a machine to perform these operations? ESE150 Spring 2019 How Process How do we build a machine to perform these operations? From Digital Samples  compressed digital data  Digital Samples Down to bottom If we can build one kind of primitive element, …and connect together large collections of them can build a machine to perform any digital computation

Lecture Topics Setup Where are we? Combinational Logic ESE150 Spring 2019 Lecture Topics Setup Where are we? Combinational Logic Sequential Logic FPGAs Next Lab

----------------click MP3 Player / iPhone / Droid ESE150 Spring 2019 Course Map 7,8,9 10101001101 File- System MIC CPU A/D 10 10101001101 NIC Music 1 domain conversion 5,6 Numbers correspond to course weeks compress sample freq pyscho- acoustics 3 2 4 13 11 EULA ----------------click OK D/A NIC speaker MP3 Player / iPhone / Droid 12

----------------click MP3 Player / iPhone / Droid ESE150 Spring 2019 Course Map – Week 8 MIC A/D 10101 Music 1 domain conversion 5,6 Numbers correspond to course weeks compress sample freq pyscho- acoustics 3 2 4 EULA ----------------click OK D/A 10101001101 speaker MP3 Player / iPhone / Droid

ESE150 Spring 2019 Combinational Logic

Gate Primitive binary function Can specify function with a Truth Table ESE150 Spring 2019 Gate Primitive binary function Computes a binary output from a small number of binary inputs Can specify function with a Truth Table Defines the output for each input combination Input 0 Input 1 Output 1

AND Gate AND Output is 1 (true) when all inputs are 1 (true) Input 0 ESE150 Spring 2019 AND Gate AND Output is 1 (true) when all inputs are 1 (true) Input 0 Input 1 AND 1

NOT Gate Not Output is opposite of input input NOT 1 ESE150 Spring 2019 NOT Gate Not Output is opposite of input input NOT 1

OR Gate OR Output is 1 (true) when any input is 1 (true) ESE150 Spring 2019 OR Gate OR Output is 1 (true) when any input is 1 (true) (fillin truth table for OR) Input 0 Input 1 OR 1

Claim Can compute any Boolean Function from AND, OR, NOT ESE150 Spring 2019 Claim Can compute any Boolean Function from AND, OR, NOT (actually from NAND)

Model: Combinational Logic ESE150 Spring 2019 Model: Combinational Logic Compute some “function” f(i0,i1,…in)  o0,o1,…om Each unique input vector implies a particular, deterministic, output vector

Big AND AND How build n-input AND from AND2 gates? ESE150 Spring 2019 Big AND AND Output is 1 (true) when all inputs are 1 (true) How build n-input AND from AND2 gates?

Big OR OR How build n-input OR from OR2? ESE150 Spring 2019 Big OR OR Output is 1 (true) when any input is 1 (true) How build n-input OR from OR2?

ESE150 Spring 2019 Input Case How can we create an expression that is true for a specific input case? E.g. have a function of 4 inputs: a, b, c, d How many potential values for a, b, c, d? Rows in our truth table Give one example of values for a, b, c, d? How create an expression that is true for that case?

Single Output Digital Function ESE150 Spring 2019 Single Output Digital Function Given have logic to implement each input case How implement entire function? a b c F(a,b,c) 1

Multiple Output Function ESE150 Spring 2019 Multiple Output Function What do you do if your Digital Function needs multiple output bits?

Combinational Logic as Gates ESE150 Spring 2019 Start with truth table Single output {0, 1} Use inverters to produce complements of inputs For each input case If output is a 1 Develop an AND to detect that case Decompose AND into gates OR together the output of all such AND functions Decompose OR into gates Multiple outputs Repeat for each output This solution won’t typically be the smallest or fastest…

ESE150 Spring 2019 Conclude Can implement any combinational logic function out of a collection of OR2, AND2, NOT gates

ESE150 Spring 2019 NAND2 Gate NAND = NOT AND Output is 0 (true) when all inputs are 1 (true); 0 otherwise Input 0 Input 1 NAND 1

NAND Universality How implement NOT from NAND2? AND2 from NAND2? ESE150 Spring 2019 NAND Universality How implement NOT from NAND2? AND2 from NAND2? What function does this circuit implement? Input 0 Input 1 Function? 1

NAND Universality Can implement ESE150 Spring 2019 NAND Universality Can implement NOT from NAND2 AND2 from NAND2 OR2 from NAND2 Can implement any combinational logic function out of a collection of OR2, AND2, NOT gates Therefore: Can implement any combinational logic function out of a collection of NAND2 gates

Multiplexer Gate MUX When S=0, output=i0 When S=1, output=i1 S i0 i1 ESE150 Spring 2019 Multiplexer Gate MUX When S=0, output=i0 When S=1, output=i1 S i0 i1 Mux2(S,i0,i1) 1 Truth Table? AND, OR, NOT Implementation?

Arithmetic Addition is also a digital logic function ESE150 Spring 2019 Arithmetic Addition is also a digital logic function Maps set of inputs (a3 a2 a1 a0 b3 b2 b1 b0) To an output bit vector (c4 c3 c2 c1 c0) …as is subtraction, multiplication, division, square root….

Full Adder Adds 3 inputs to produce 2b output Binary inputs: a, b, c ESE150 Spring 2019 Full Adder Adds 3 inputs to produce 2b output Binary inputs: a, b, c Binary outputs: carry, sum Two bit result: carry*2 +sum = a+b+c Can produce truth table and logic (Lab)

Example: Bit-Level Addition Penn ESE534 Spring2016 -- DeHon Example: Bit-Level Addition Addition Base 2 example Work together C: 11011010000 A: 01101101010 B: 01100101100 S: 1010010110 C: 1011010000 A: 01101101010 B: 01100101100 S: 010010110 C: 0 A: 01101101010 B: 01100101100 S: C: 11011010000 A: 01101101010 B: 01100101100 S: 11010010110 A: 01101101010 B: 01100101100 S: C: 11010000 A: 01101101010 B: 01100101100 S: 0010110 C: 000 A: 01101101010 B: 01100101100 S: 10 C: 00 A: 01101101010 B: 01100101100 S: 0 C: 0000 A: 01101101010 B: 01100101100 S: 110 C: 10000 A: 01101101010 B: 01100101100 S: 0110 C: 1010000 A: 01101101010 B: 01100101100 S: 010110 C: 010000 A: 01101101010 B: 01100101100 S: 10110 C: 011010000 A: 01101101010 B: 01100101100 S: 10010110

N-Bit Adder Given Full Adders ESE150 Spring 2019 N-Bit Adder Given Full Adders Can build N-bit adder by connecting N full adders

ESE150 Spring 2019 Sequential Logic

Mux with Feedback What happens when S=0? What happens when S=1? ESE150 Spring 2019 Mux with Feedback What happens when S=0? What happens when S=1?

ESE150 Spring 2019 Mux with Feedback Assuming i0 doesn’t change what happens when S goes from 0 to 1?

Latch Element that can hold a previous value of an input ESE150 Spring 2019 Latch Element that can hold a previous value of an input

Flip-Flop (FF) Use a pair to create a flip-flop What happens when ESE150 Spring 2019 Flip-Flop (FF) Use a pair to create a flip-flop Also call register What happens when CLK is low (0) ? CLK is high (1) ? CLK transitions from 0 to 1?

Flip-Flop (FF) Use a pair to create a flip-flop ESE150 Spring 2019 Flip-Flop (FF) Use a pair to create a flip-flop Also call register Sample D input on 01 transition of clock (CLK) Never an open path from DQ One of the mux latches always in hold state

State Element Latch or Register is a state element ESE150 Spring 2019 State Element Latch or Register is a state element Allows circuit to remember a value Build computations that Depend on past inputs Reuse hardware in time

Accumulator What happens: Start with a3:a0 at 0 CLK low I3:i0=2 (0010) ESE150 Spring 2019 Accumulator What happens: Start with a3:a0 at 0 CLK low I3:i0=2 (0010) FF inputs? CLK goes high: a3:a0? I3:0=3 (0011)

Accumulator a=0 while (true) Accumulates input values i ESE150 Spring 2019 Accumulator a=0 while (true) a=a+getInput(); Accumulates input values i Integration or summation

State for Sequencing and Control ESE150 Spring 2019 State for Sequencing and Control Useful when trying to control things E.g. Perform a sequence of operations Robot Open-gripper Move-forward Close-gripper Lift

State for Conditional Control ESE150 Spring 2019 State for Conditional Control Useful when need to behave differently based on something in the past Remember if elevator going up or down Remember/count coins from consumer Remember some mode set by user Displaying in Centigrade or Fahrenheit Idea Store state Use as input to logic

Finite-State Machine (FSM) ESE150 Spring 2019 Finite-State Machine (FSM) Sequential model of computation State (in registers) + combinational logic Compute outputs and next state from inputs and state

FSM Example Simplified Vending Machine ESE150 Spring 2019 FSM Example Simplified Vending Machine Only input quarters Only vend one item (output signal to indicate vending) Item costs 2 quarters Coin Return request and control Two states: waiting, one-quarter (one) Two inputs: quarter, coin-return (creturn) Two outputs: vend, return-quarter (qreturn)

Truth Table Model Complete together state quarter creturn vend qreturn ESE150 Spring 2019 Truth Table Model Complete together state quarter creturn vend qreturn next waiting 1 one

Truth Table Model state quarter creturn vend qreturn next waiting 1 ESE150 Spring 2019 Truth Table Model state quarter creturn vend qreturn next waiting 1 one

Switch-Statement Model ESE150 Spring 2019 Switch-Statement Model While (true) switch (state) { case waiting: if (quarter && !creturn) state=one; else state=waiting; qreturn=quarter && creturn; vend=0; break;

Switch-Statement Model (cont.) ESE150 Spring 2019 Switch-Statement Model (cont.) case one: if ((quarter && !creturn)|| (!quarter&&creturn)) state=waiting; else state=one; qreturn=creturn; vend=quarter&& !creturn; break; } // switch } // while

FSM Graph Model !quarter/ quarter&creturn/ vend=0, qreturn=0 ESE150 Spring 2019 FSM Graph Model !quarter/ vend=0, qreturn=0 quarter&creturn/ vend=0, qreturn=1 waiting quarter&!creturn/ vend=1, qreturn=0 !quarter&creturn/ vend=0, qreturn=1 quarter&!creturn/ vend=0, qreturn=0 one !quarter&!creturn/ vend=0, qreturn=0 !quarter&!creturn/ vend=0, qreturn=0

ESE150 Spring 2019 Programmable Logic

Mux can be a programmable Gate ESE150 Spring 2019 Mux can be a programmable Gate Programmable Gate Can be programmed to act as any gate Use state (e.g. FF) to “program” truth table of a gate Input 0 Input 1 Output 1

ESE150 Spring 2019 Example: AND How do we program to behave as AND2?

ESE150 Spring 2019 Example: OR How do we program to behave as OR2?

Look-Up Table (LUT) Can generalize to any number of inputs ESE150 Spring 2019 Look-Up Table (LUT) Can generalize to any number of inputs

Connecting Gates Once we can build gates ESE150 Spring 2019 Connecting Gates Once we can build gates …still need to connect the gates together. Select which gate outputs become inputs to other gates.

Mux can be Programmable Interconnect ESE150 Spring 2019 Mux can be Programmable Interconnect Trick: Use multiplexer to programmably select gate input.

ESE150 Spring 2019 Programmable Blocks

Programmable Gates and Interconnect ESE150 Spring 2019 Programmable Gates and Interconnect If time permits: How program (fill in yellow programmable cells) to implement a full adder?

Field-Programmable Gate Array (FPGA) ESE150 Spring 2019 Field-Programmable Gate Array (FPGA) Collection of Programmable Gates Can “program” by setting state bits LUTs that can be programmed to be any gate With optional Flip-Flops to use for state Programmable interconnect to “wire” the gates together

Field-Programmable Gate Array (FPGA) ESE150 Spring 2019 Field-Programmable Gate Array (FPGA)

Next Lab Program an FPGA in Verilog Build an adder ESE150 Spring 2019 Next Lab Program an FPGA in Verilog Build an adder Build an accumulator

ESE150 Spring 2019 Big Ideas Can implement any combinational digital logic function from nand2 gates Can implement any FSM from nand2 gates and registers Can build a single chip that can be programmed to behave as any collection of gates As long as don’t need more gates than it provides

Learn More CIS240 – do a bit more logic ESE150 Spring 2019 Learn More CIS240 – do a bit more logic ESE370 – how to implement gates, latches, and memories from transistors ESE532 – how to build large-scale computations from logic

Reminder Formal Lab Report Due Sunday (11:59pm) ESE150 Spring 2019 Reminder Formal Lab Report Due Sunday (11:59pm) Extra Lab Session to help Don’t get stuck for hours on any piece Midterm solutions on syllabus