4-to-1 Multiplexer: Module Instantiation Discussion D2.2 Example 5.

Slides:



Advertisements
Similar presentations
Digital Logic with VHDL EE 230 Digital Systems Fall 2006 (10/17/2006)
Advertisements

Quad 2-to-1 and Quad 4-to-1 Multiplexers Discussion D2.4 Example 7.
Arbitrary Waveform Discussion 5.5 Example 34.
Edge-Triggered D Flip-Flops Discussion D4.2 Example 26.
Multiplexer as a Universal Element Discussion D2.6 Example 9.
7-Segment Display: Spartan-3 board
1 VLSI DESIGN USING VHDL Part II A workshop by Dr. Junaid Ahmed Zubairi.
Shifters Discussion D7.1 Example Bit Shifter.
Ring Counter Discussion D5.3 Example 32. Ring Counter if rising_edge(CLK) then for i in 0 to 2 loop s(i)
Adder Discussion D6.2 Example 17. s i = c i ^ (a i ^ b i ) c i+1 = a i * b i + c i * (a i ^ b i ) Full Adder (Appendix I)
Top-level VHDL Designs
Generic Multiplexers: Parameters Discussion D2.5 Example 8.
2-to-1 Multiplexer: if Statement Discussion D2.1 Example 4.
Decoders and Encoders Lecture L4.2. Decoders and Encoders Binary Decoders Binary Encoders Priority Encoders.
Introduction to VHDL VHDL Tutorial R. E. Haskell and D. M. Hanna T1: Combinational Logic Circuits.
Registers VHDL Tutorial R. E. Haskell and D. M. Hanna T2: Sequential Logic Circuits.
Digilent Spartan 3 Board Lecture L2.2
Structural VHDL VHDL Tutorial R. E. Haskell and D. M. Hanna T3: ALU Design.
Counters Discussion D5.3 Example 33. Counters 3-Bit, Divide-by-8 Counter 3-Bit Behavioral Counter in Verilog Modulo-5 Counter An N-Bit Counter.
7-Segment Display DIO1 Board. Digilab2 – DIO1 Boards Four 7-segment displays A0A1A2A3.
Introduction to VHDL Multiplexers. Introduction to VHDL VHDL is an acronym for VHSIC (Very High Speed Integrated Circuit) Hardware Description Language.
Lab 2 4-Bit Adder Digilent Spartan 3 Board Lecture L2.3.
4-to-1 Multiplexer: case Statement Discussion D2.3 Example 6.
2-to-1 Multiplexer: if Statement Discussion D7.1 Example 4.
4-to-1 Multiplexer: Module Instantiation Discussion D7.2 Example 5.
7-Segment Displays Digilent Spartan 3 Board Discussion DS-4.2.
Introduction to VHDL Multiplexers Discussion D1.1.
4-Bit Binary-to-BCD Converter: case Statement
Shift Registers Discussion D5.2 Example Bit Shift Register qs(3) qs(2) qs(1) qs(0) if rising_edge(CLK) then for i in 0 to 2 loop s(i) := s(i+1);
Quad 2-to-1 Multiplexer Discussion D7.4 Example 7.
4-bit Shift Register. 2-bit Register Serial-in-serial-out Shift Register.
Designing with FPGAs ELEC 418 Advanced Digital Systems Dr. Ron Hayne Images Courtesy of Thomson Engineering.
A.7 Concurrent Assignment Statements Used to assign a value to a signal in an architecture body. Four types of concurrent assignment statements –Simple.
DSD,USIT,GGSIPU1 Entity declaration –describes the input/output ports of a module entity reg4 is port ( d0, d1, d2, d3, en, clk : in std_logic; q0, q1,
1 Part I: SYSTEM DESIGN. 2 Packages and Components Functions and Procedures Problem (Design & Implementation) Additional System Designs.
ENG2410 Digital Design LAB #8 LAB #8 Data Path Design.
L26 – Datapath ALU implementation
VHDL for Combinational Circuits. VHDL We Know Simple assignment statements –f
ENG2410 Digital Design LAB #5 Modular Design and Hierarchy using VHDL.
ECE 331 – Digital System Design Multiplexers and Demultiplexers (Lecture #13)
2’s Complement 4-Bit Saturator Discussion D2.8 Lab 2.
2/10/07DSD,USIT,GGSIPU1 BCD adder KB3B2B1B0CD3D2D1D
CS/EE 3700 : Fundamentals of Digital System Design
Apr. 3, 2000Systems Architecture I1 Introduction to VHDL (CS 570) Jeremy R. Johnson Wed. Nov. 8, 2000.
VHDL ELEC 311 Digital Logic and Circuits Dr. Ron Hayne Images Courtesy of Cengage Learning.
May 9, 2001Systems Architecture I1 Systems Architecture I (CS ) Lab 5: Introduction to VHDL Jeremy R. Johnson May 9, 2001.
INF H131 Clock and Reset Unit (CRU) module library ieee; use ieee.std_logic_1164.all; entity cru is port ( arst : in std_logic; -- Asynch. reset.
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 יהודה אפק, נתן אינטרטור אוניברסיטת תל אביב.
Combinational logic circuit
Describing Combinational Logic Using Processes
Part II A workshop by Dr. Junaid Ahmed Zubairi
Hardware Description Languages
ENG6530 Reconfigurable Computing Systems
Combinational Circuits Using VHDL
LIBRARY IEEE; Include Libraries for standard logic data types USE IEEE.STD_LOGIC_1164.ALL; -- Entity name normally the same as file name.
UNIT 2: Data Flow description
LIBRARY IEEE; Include Libraries for standard logic data types USE IEEE.STD_LOGIC_1164.ALL; -- Entity name normally the same as file name.
Getting Started with Vivado
A Data Stack CoreGen Discussion 12.1.
Binary-to-BCD Converter
VHDL Structural Architecture
Concurrent vs Sequential
ECE 331 – Digital System Design
Modeling of Circuits with a Regular Structure
Modeling of Circuits with a Regular Structure
Modeling of Circuits with Regular Structure
4-Input Gates VHDL for Loops
Digital Logic with VHDL
(Sequential-Circuit Building Blocks)
Presentation transcript:

4-to-1 Multiplexer: Module Instantiation Discussion D2.2 Example 5

4-to-1 Multiplexer Module Instantiation Logic Equation for a 4-to-1 MUX

2 x 1 MUX y = a*~s + b*s

4-to-1 Multiplexer z 4 x 1 MUX s0s1 c0 c1 c2 c3 z s1s0 0 0 c0 0 1 c1 1 0 c2 1 1 c3

Multiplexers z 4 x 1 MUX s0s1 c0 c1 c2 c3 z s1s0 0 0 c0 0 1 c1 1 0 c2 1 1 c3 0 A multiplexer is a digital switch

Multiplexers z 4 x 1 MUX s0s1 c0 c1 c2 c3 z s1s0 0 0 c0 0 1 c1 1 0 c2 1 1 c3 0 1

Multiplexers z 4 x 1 MUX s0s1 c0 c1 c2 c3 z s1s0 0 0 c0 0 1 c1 1 0 c2 1 1 c3 1 0

Multiplexers z 4 x 1 MUX s0s1 c0 c1 c2 c3 z s1s0 0 0 c0 0 1 c1 1 0 c2 1 1 c3 1

Creating a 4 x 1 MUX from 2 x 1 MUXs

-- Example 5a: 4-to-1 MUX using module instantiation library IEEE; use IEEE.STD_LOGIC_1164.all; entity mux41 is port( c : in STD_LOGIC_VECTOR(3 downto 0); s : in STD_LOGIC_VECTOR(1 downto 0); z : out STD_LOGIC ); end mux41; architecture mux41 of mux41 is component mux21a port( a : in std_logic; b : in std_logic; s : in std_logic; y : out std_logic); end component; signal v, w: STD_LOGIC; begin

M1 : mux21a port map( a => c(0), b => c(1), s => s(0), y => v ); M2 : mux21a port map( a => c(2), b => c(3), s => s(0), y => w ); M3 : mux21a port map( a => v, b => w, s => s(1), y => z ); end mux41;

--Example 4a: --2-to-1 MUX using logic equations library IEEE; use IEEE.STD_LOGIC_1164.all; entity mux21a is port( a : in STD_LOGIC; b : in STD_LOGIC; s : in STD_LOGIC; y : out STD_LOGIC ); end mux21a; architecture mux21a of mux21a is begin y <= (not s and a) or (s and b); end mux21a; M1 : mux21a port map( a => c(0), b => c(1), s => s(0), y => v );

--Example 4a: --2-to-1 MUX using logic equations library IEEE; use IEEE.STD_LOGIC_1164.all; entity mux21a is port( a : in STD_LOGIC; b : in STD_LOGIC; s : in STD_LOGIC; y : out STD_LOGIC ); end mux21a; architecture mux21a of mux21a is begin y <= (not s and a) or (s and b); end mux21a; M2 : mux21a port map( a => c(2), b => c(3), s => s(0), y => w );

--Example 4a: --2-to-1 MUX using logic equations library IEEE; use IEEE.STD_LOGIC_1164.all; entity mux21a is port( a : in STD_LOGIC; b : in STD_LOGIC; s : in STD_LOGIC; y : out STD_LOGIC ); end mux21a; architecture mux21a of mux21a is begin y <= (not s and a) or (s and b); end mux21a; M3 : mux21a port map( a => v, b => w, s => s(1), y => z );

Label1 : mux21a port map( a => a, b => b, s => s, y => y );

Aldec Active-HDL Simulation

4-to-1 Multiplexer Module Instantiation Logic Equation for a 4-to-1 MUX

2 x 1 MUX y = a*~s + b*s

v = ~s0*c0 + s0*c1 w = ~s0*c2 + s0*c3 z = ~s1*v + s1*w z = ~s1*(~s0*c0 + s0*c1) + s1*(~s0*c2 + s0*c3) z = ~s1*~s0*c0 + ~s1*s0*c1 + s1*~s0*c2 + s1*s0*c3

4-to-1 Multiplexer z 4 x 1 MUX s0s1 c0 c1 c2 c3 z s1s0 0 0 c0 0 1 c1 1 0 c2 1 1 c3 z = ~s1*~s0*c0 + ~s1*s0*c1 + s1*~s0*c2 + s1*s0*c3

-- Example 5b: 4-to-1 MUX using logic equation library IEEE; use IEEE.STD_LOGIC_1164.all; entity mux41b is port( c : in STD_LOGIC_VECTOR(3 downto 0); s : in STD_LOGIC_VECTOR(1 downto 0); z : out STD_LOGIC ); end mux41b; architecture mux41b of mux41b is begin z <= (not s(1) and not s(0) and c(0)) or (not s(1) and s(0) and c(1)) or (s(1) and not s(0) and c(2)) or (s(1) and s(0) and c(3)); end mux41b;

Aldec Active-HDL Simulation