Multiplexers Section 3-7 Mano & Kime. Multiplexers & Demultiplexers Multiplexers (Selectors) Lab 1 – Behavioral VHDL -- Multiplexers MUX as a Universal.

Slides:



Advertisements
Similar presentations
DISEÑO LÓGICO (DLO) Ejemplos de VHDL.
Advertisements

©2004 Brooks/Cole FIGURES FOR CHAPTER 10 INTRODUCTION TO VHDL Click the mouse to move to the next page. Use the ESC key to exit this chapter. This chapter.
VHDL in digital circuit synthesis (tutorial) dr inż. Miron Kłosowski EA 309
VHDL Lecture 1 Megan Peck EECS 443 Spring 08.
VHDL Programming in CprE 381 Zhao Zhang CprE 381, Fall 2013 Iowa State University Last update: 9/15/2013.
VHDL Refresher ECE 437 April 13, 2015 Motivation ECE 337 is a prerequisite But… –You may have taken 337 a few semesters previous –Breaks causes memory.
Introduction To VHDL for Combinational Logic
INTRO TO VHDL Appendix A: page page VHDL is an IEEE and ANSI standard. VHDL stands for Very High Speed IC hardware description language.
Lecture #28 Page 1 ECE 4110– Sequential Logic Design Lecture #28 Agenda 1.Counters Announcements 1.HW #13 assigned 2.Next: Test #2 Review.
Digital Logic with VHDL EE 230 Digital Systems Fall 2006 (10/17/2006)
EELE 367 – Logic Design Module 4 – Combinational Logic Design with VHDL Agenda 1.Decoders/Encoders 2.Multiplexers/Demultiplexers 3.Tri-State Buffers 4.Comparators.
LECTURE 4: The VHDL N-bit Adder
Introduction to VHDL CLASS MATERIALS EECE 255. Very High Speed Integrated Circuit Hardware Description Language Industry standard language to describe.
Digital Design with VHDL Presented by: Amir Masoud Gharehbaghi
Sequential Statements
1 Lecture 13 VHDL 3/16/09. 2 VHDL VHDL is a hardware description language. The behavior of a digital system can be described (specified) by writing a.
Quad 2-to-1 and Quad 4-to-1 Multiplexers Discussion D2.4 Example 7.
1 VLSI DESIGN USING VHDL Part II A workshop by Dr. Junaid Ahmed Zubairi.
Generic Multiplexers: Parameters Discussion D2.5 Example 8.
2-to-1 Multiplexer: if Statement Discussion D2.1 Example 4.
Introduction to VHDL VHDL Tutorial R. E. Haskell and D. M. Hanna T1: Combinational Logic Circuits.
VHDL Data Types Module F3.1. VHDL Data Types Scalar Integer Enumerated Real (floating point)* Physical* Composite Array Record Access (pointers)* * Not.
FPGAs and VHDL Lecture L12.1. FPGAs and VHDL Field Programmable Gate Arrays (FPGAs) VHDL –2 x 1 MUX –4 x 1 MUX –An Adder –Binary-to-BCD Converter –A Register.
Introduction to VHDL Multiplexers. Introduction to VHDL VHDL is an acronym for VHSIC (Very High Speed Integrated Circuit) Hardware Description Language.
Introduction to VHDL CSCE 496/896: Embedded Systems Witawas Srisa-an.
4-to-1 Multiplexer: case Statement Discussion D2.3 Example 6.
Kazi Fall 2006 EEGN 4941 EEGN-494 HDL Design Principles for VLSI/FPGAs Khurram Kazi Some of the slides were taken from K Gaj’s lecture slides from GMU’s.
Programming in VHDL Using Processes. How Processes Run A process is either in suspend mode or is running. For a process to run, there has to be a change.
Logic Design Fundamentals - 2 Lecture L1.2. Logic Design Fundamentals - 2 Basic Gates Basic Combinational Circuits Basic Sequential Circuits.
Introduction to VHDL Multiplexers Discussion D1.1.
ECE 331 – Digital System Design
VHDL Examples Subra Ganesan Reference: Professor Haskell’s Notes,
EE 367 – Logic Design Lecture #17
1 Part I: VHDL CODING. 2 Design StructureData TypesOperators and AttributesConcurrent DesignSequential DesignSignals and VariablesState Machines A VHDL.
ENG241 Digital Design Week #4 Combinational Logic Design.
VHDL for Combinational Circuits. VHDL We Know Simple assignment statements –f
VHDL Very High Speed Integrated Circuit Hardware Description Language Shiraz University of shiraz spring 2011.
ECE 331 – Digital System Design Multiplexers and Demultiplexers (Lecture #13)
(1) Basic Language Concepts © Sudhakar Yalamanchili, Georgia Institute of Technology, 2006.
VHDL Basics. VHDL BASICS 2 OUTLINE –Component model –Code model –Entity –Architecture –Identifiers and objects –Operations for relations VHDL ET062G &
Lecture #7 Page 1 Lecture #7 Agenda 1.VHDL Data Types Announcements 1.n/a ECE 4110– Digital Logic Design.
2’s Complement 4-Bit Saturator Discussion D2.8 Lab 2.
L19 – Resolved Signals. Resolved Signals  What are resolved signals In systems In VHDL Resolution – Isn’t that for resolving conflicts?  Ref: text Unit.
DATA TYPES 1.Pre-Defined Data Types 2. User-Defined Data Types.
Lecture #18 Page 1 ECE 4110– Sequential Logic Design Lecture #18 Agenda 1.MSI Demultiplexers 2.MSI Tri-State Buffers 3.MSI Comparators Announcements 1.HW.
CS/EE 3700 : Fundamentals of Digital System Design
 Seattle Pacific University EE Logic System DesignMux-Decoder-1 Multiplexers Two alternative forms for a 2:1 Mux Truth Table Functional form Logical.
VHDL Programming Fundamentals Presented By Dr. Pradyut Kumar Biswal Department of Electronics, IIIT Bhubaneswar.
Apr. 3, 2000Systems Architecture I1 Introduction to VHDL (CS 570) Jeremy R. Johnson Wed. Nov. 8, 2000.
May 9, 2001Systems Architecture I1 Systems Architecture I (CS ) Lab 5: Introduction to VHDL Jeremy R. Johnson May 9, 2001.
Lecture #17 Page 1 ECE 4110–5110 Digital System Design Lecture #17 Agenda 1.MSI Multiplexers 2.MSI Encoders Announcements Test 1 closed book, Wednesday.
Lecture #18 Page 1 ECE 4110–5110 Digital System Design Lecture #18 Agenda 1.MSI Demultiplexers 2.MSI Tri-State Buffers 3.MSI Comparators Announcements.
Fundamentals of Digital Signal Processing יהודה אפק, נתן אינטרטור אוניברסיטת תל אביב.
IAY 0600 Digital Systems Design
Combinational logic circuit
Basic Language Concepts
Describing Combinational Logic Using Processes
ENG2410 Digital Design “Combinational Logic Design”
ECE 4110–5110 Digital System Design
ECE 4110–5110 Digital System Design
Combinational Circuits Using VHDL
Mano and Kime Sections 7-6 – 7-8
IAS 0600 Digital Systems Design
CPE 528: Lecture #5 Department of Electrical and Computer Engineering University of Alabama in Huntsville.
ECE 331 – Digital System Design
IAS 0600 Digital Systems Design
VHDL Data Types Module F3.1.
4-Input Gates VHDL for Loops
Digital Logic with VHDL
EEL4712 Digital Design (VHDL Tutorial).
Presentation transcript:

Multiplexers Section 3-7 Mano & Kime

Multiplexers & Demultiplexers Multiplexers (Selectors) Lab 1 – Behavioral VHDL -- Multiplexers MUX as a Universal Element

4– to– 1- Line Multiplexer

4–to–1-Line Multiplexer with Transmission Gates

Quadruple 2–to–1-Line Multiplexer

Typical uses

Multiplexers Multiplexers (Selectors) Lab 1 – Behavioral VHDL -- Multiplexers MUX as a Universal Element

Combinational Circuit Example n-line 2-to-1 Multiplexer n-line 2 x 1 MUX a(n-1:0) b(n-1:0) y(n-1:0) sel sel y 0 a 1 b

library IEEE; use IEEE.std_logic_1164.all; entity mux2g is generic (width:positive); port ( a: in STD_LOGIC_VECTOR(width-1 downto 0); b: in STD_LOGIC_VECTOR(width-1 downto 0); sel: in STD_LOGIC; y: out STD_LOGIC_VECTOR(width-1 downto 0) ); end mux2g; An n-line 2 x 1 MUX a(n-1:0) b(n-1:0) y(n-1:0) sel n-line 2 x 1 MUX

library IEEE; use IEEE.std_logic_1164.all; entity mux2g is generic (width:positive); port ( a: in STD_LOGIC_VECTOR(width-1 downto 0); b: in STD_LOGIC_VECTOR(width-1 downto 0); sel: in STD_LOGIC; y: out STD_LOGIC_VECTOR(width-1 downto 0) ); end mux2g; Entity Each entity must begin with these library and use statements port statement defines inputs and outputs generic statement defines width of bus

library IEEE; use IEEE.std_logic_1164.all; entity mux2g is generic (width:positive); port ( a: in STD_LOGIC_VECTOR(width-1 downto 0); b: in STD_LOGIC_VECTOR(width-1 downto 0); sel: in STD_LOGIC; y: out STD_LOGIC_VECTOR(width-1 downto 0) ); end mux2g; Entity Mode: in or out Data type: STD_LOGIC, STD_LOGIC_VECTOR(width-1 downto 0);

Standard Logic type std_ulogic is (‘U’, -- Uninitialized ‘X’ -- Forcing unknown ‘0’ -- Forcing zero ‘1’ -- Forcing one ‘Z’ -- High impedance ‘W’ -- Weak unknown ‘L’ -- Weak zero ‘H’ -- Weak one ‘-’); -- Don’t care library IEEE; use IEEE.std_logic_1164.all;

Standard Logic Type std_ulogic is unresolved. Resolved signals provide a mechanism for handling the problem of multiple output signals connected to one signal. subtype std_logic is resolved std_ulogic;

architecture mux2g_arch of mux2g is begin mux2_1: process(a, b, sel) begin if sel = '0' then y <= a; else y <= b; end if; end process mux2_1; end mux2g_arch; Architecture a(n-1:0) b(n-1:0) y(n-1:0) sel n-line 2 x 1 MUX Note: <= is signal assignment

architecture mux2g_arch of mux2g is begin mux2_1: process(a, b, sel) begin if sel = '0' then y <= a; else y <= b; end if; end process mux2_1; end mux2g_arch; Architecture entity name process sensitivity list Sequential statements (if…then…else) must be in a process Note begin…end in process Note begin…end in architecture

Digilab2 – DIO1 Boards Spartan II FPGA 8 LEDs LD 8 Switches SW 4 Pushbuttons BTN Four 7-segment displays Pushbutton bn 74HC373 latch ldg <= ‘1’

Top-level Design – Lab 1

library IEEE; use IEEE.std_logic_1164.all; entity lab1 is port ( SW: in STD_LOGIC_VECTOR (1 to 8); BTN4: in STD_LOGIC; ldg: out STD_LOGIC; LD: out STD_LOGIC_VECTOR (1 to 4) ); end lab1;

architecture lab1_arch of lab1 is component mux2g generic(width:positive); port ( a: in STD_LOGIC_VECTOR (width-1 downto 0); b: in STD_LOGIC_VECTOR (width-1 downto 0); sel: in STD_LOGIC; y: out STD_LOGIC_VECTOR (width-1 downto 0) ); end component; constant bus_width: positive := 4; begin ldg <= '1'; -- enable 74HC373 latch SWmux: mux2g generic map(width => bus_width) port map (a => SW(1 to 4), b => SW(5 to 8), sel => BTN4, y => LD); end lab1_arch;

An n-line 4 x 1 multiplexer a(n-1:0) b(n-1 :0) y(n-1 :0) sel(1:0) 8-line 4 x 1 MUX c(n-1 :0) d(n-1 :0) Sely “00”a “01”b “10”c “11”d

An 8-line 4 x 1 multiplexer library IEEE; use IEEE.std_logic_1164.all; entity mux4g is generic(width:positive); port ( a: in STD_LOGIC_VECTOR (width-1 downto 0); b: in STD_LOGIC_VECTOR (width-1 downto 0); c: in STD_LOGIC_VECTOR (width-1 downto 0); d: in STD_LOGIC_VECTOR (width-1 downto 0); sel: in STD_LOGIC_VECTOR (1 downto 0); y: out STD_LOGIC_VECTOR (width-1 downto 0) ); end mux4g;

Example of case statement architecture mux4g_arch of mux4g is begin process (sel, a, b, c, d) begin case sel is when "00" => y <= a; when "01" => y <= b; when "10" => y <= c; when others => y <= d; end case; end process; end mux4g_arch; Must include ALL posibilities in case statement Note implies operator => Sely “00”a “01”b “10”c “11”d

VHDL Architecture Structure architecture name_arch of name is begin end name_arch; Signal assignments Concurrent statements Process 1 Process 2 Concurrent statements Processes contain sequential statements, but execute concurrently within the architecture body

VHDL Process P1: process (<sensitivity list) begin end process P1; Optional process label Within a process: Variables are assigned using := and are updated immediately. Signals are assigned using <= and are updated at the end of the process.

Multiplexers Multiplexers (Selectors) Lab 1 – Behavioral VHDL -- Multiplexers MUX as a Universal Element

Multiplexer as universal combinational module connect input variables x to select inputs of multiplexer s set data inputs to multiplexer equal to values of function for corresponding assignment of select variables using a variable at data inputs reduces size of the multiplexer

Implementing a Boolean Function with a Multiplexer

Implementing a Four- Input Function with a Multiplexer

Networks with 2-input multiplexers

Implementation of SFs with network of MUXes

Design of networks with MUXes

Example

Ordering of variables in subtrees affects the number of MUXes

Example of Shannon’s Decomposition F = x 3 (x 1 + x 2 x 0 ) Implemented using a multiplexer network

F = x 3 (x 1 + x 2 x 0 ) Start with any variable - x 0 for example x 0 = 0 x 0 = 1 F = x 3 x 1 F = x 3 (x 1 + x 2 )

F = x 3 (x 1 + x 2 x 0 ) Then x ! for example x 0 = 0 x 0 = 1 F = x 3 x 1 F = x 3 (x 1 + x 2 ) x 1 = 0 x 1 = 1 F = 0 F = x 3 x 1 = 0 x 1 = 1 F = x 3 x 2 F = x 3

F = x 3 (x 1 + x 2 x 0 ) Then x 2 for example x 0 = 0 x 0 = 1 F = x 3 x 1 F = x 3 (x 1 + x 2 ) x 1 = 0 x 1 = 1 F = 0 F = x 3 x 1 = 0 x 1 = 1 F = x 3 x 2 F = x 3 x 2 = 0 x 2 = 1 F = 0 F = x 3

F = x 3 (x 1 + x 2 x 0 ) x 0 = 0 x 0 = 1 F = x 3 x 1 F = x 3 (x 1 + x 2 ) x 1 = 0 x 1 = 1 F = 0 F = x 3 x 1 = 0 x 1 = 1 F = x 3 x 2 F = x 3 x 2 = 0 x 2 = 1 F = 0 F = x 3 Inputs

F = x 3 (x 1 + x 2 x 0 ) x 0 = 0 x 0 = 1 F = x 3 x 1 F = x 3 (x 1 + x 2 ) x 1 = 0 x 1 = 1 F = 0 F = x 3 x 1 = 0 x 1 = 1 F = x 3 x 2 F = x 3 x 2 = 0 x 2 = 1 F = 0 F = x 3 MUX Select Lines

x 1 = 0 x 0 = 0 x 0 = 1 F = x 3 x 1 F = x 3 (x 1 + x 2 ) x 1 = 1 F = 0 F = x 3 x 1 = 0 x 1 = 1 F = x 3 x 2 F = x 3 x 2 = 0 x 2 = 1 F = 0 F = x sel x3x1x3x1 x 3 (x 1 + x 2 ) x0x0 F

x 1 = 0 x 0 = 0 x 0 = 1 F = x 3 x 1 F = x 3 (x 1 + x 2 ) x 1 = 1 F = 0 F = x 3 x 1 = 0 x 1 = 1 F = x 3 x 2 F = x 3 x 2 = 0 x 2 = 1 F = 0 F = x 3 x3x1x3x1 1 0 sel x 3 (x 1 + x 2 ) 1 0 sel x0x0 x1x1 0 x3x3 The branch for x 0 = 0 F

x 1 = 0 x 0 = 0 x 0 = 1 F = x 3 x 1 F = x 3 (x 1 + x 2 ) x 1 = 1 F = 0 F = x 3 x 1 = 0 x 1 = 1 F = x 3 x 2 F = x 3 x 2 = 0 x 2 = 1 F = 0 F = x 3 x3x1x3x1 1 0 sel x 3 (x 1 + x 2 ) 1 0 sel x0x0 x1x1 0 x3x3 1 0 x1x1 x3x2x3x2 x3x3 The branch for x 0 = 1 F

x 1 = 0 x 0 = 0 x 0 = 1 F = x 3 x 1 F = x 3 (x 1 + x 2 ) x 1 = 1 F = 0 F = x 3 x 1 = 0 x 1 = 1 F = x 3 x 2 F = x 3 x 2 = 0 x 2 = 1 F = 0 F = x 3 x3x1x3x1 1 0 sel x 3 (x 1 + x 2 ) 1 0 sel x0x0 x1x1 0 x3x3 1 0 x1x1 x3x2x3x2 x3x3 The branch for x 1 = sel x2x2 x3x3 0 F

F = x 3 (x 1 + x 2 x 0 ) Starting with x 0 Shannon’s Decomposition 4 Multiplexers 1 0 sel 1 0 x0x0 x1x1 0 x3x3 1 0 x1x1 x3x3 1 0 x2x2 x3x3 0 F

F = x 3 (x 1 + x 2 x 0 ) Starting with x 1 Shannon’s Decomposition 3 Multiplexers 1 0 sel 1 0 x1x1 x0x x2x2 x3x3 F x3x3 0

16-input tree multiplexer