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

Slides:



Advertisements
Similar presentations
©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.
Advertisements

Verilog in transistor level using Microwind
//HDL Example 4-10 // //Gate-level description of circuit of Fig. 4-2 module analysis (A,B,C,F1,F2); input.
Verilog.
The Verilog Hardware Description Language
Supplement on Verilog adder examples
EE 361 Fall 2003University of Hawaii1 Hardware Design Tips EE 361 University of Hawaii.
Verilog Modules for Common Digital Functions
CPEN Digital System Design
Review for Exam 2 Using MUXs to implement logic
Table 7.1 Verilog Operators.
16/04/20151 Hardware Descriptive Languages these notes are taken from Mano’s book It can represent: Truth Table Boolean Expression Diagrams of gates and.
Multiplexer as a Universal Function Generator Lecture L6.7 Section 6.2.
Decoders/DeMUXs CS370 – Spring Decoder: single data input, n control inputs, 2 outputs control inputs (called select S) represent Binary index of.
1 Workshop Topics - Outline Workshop 1 - Introduction Workshop 2 - module instantiation Workshop 3 - Lexical conventions Workshop 4 - Value Logic System.
Quad 2-to-1 and Quad 4-to-1 Multiplexers Discussion D2.4 Example 7.
Multiplexer as a Universal Element Discussion D2.6 Example 9.
Edge-Triggered D Flip-Flops
Top-level VHDL Designs
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.
Multiplexers Lecture L6.4 Section 6.4.
Ring Counter Discussion 11.3 Example 32.
Multiplexers Module M6.1 Section 6.4. Multiplexers A 4-to-1 MUX TTL Multiplexer A 2-to-1 MUX.
4-to-1 Multiplexer: case Statement Discussion D2.3 Example 6.
Arbitrary Waveform Discussion 12.2 Example 34. Recall Divide-by-8 Counter Use q2, q1, q0 as inputs to a combinational circuit to produce an arbitrary.
2-to-1 Multiplexer: if Statement Discussion D7.1 Example 4.
Multiplexer as a Universal Function Generator
A/D Converter Datapaths Discussion D8.4. Analog-to-Digital Converters Converts analog signals to digital signals –8-bit: 0 – 255 –10-bit: 0 – 1023 –12-bit:
ECE 301 – Digital Electronics Multiplexers and Demultiplexers (Lecture #12)
Generic Multiplexers: Parameters Discussion D7.5 Example 8.
Multiplexers Lecture L6.6v Section 6.2. Multiplexers A Digital Switch A 2-to-1 MUX A 4-to-1 MUX A Quad 2-to-1 MUX The Verilog if…else Statement TTL Multiplexer.
Introduction to Verilog Multiplexers. Introduction to Verilog Verilog Hardware Description Language (Verilog HDL) released by Gateway Design Automation.
Top-level Verilog Designs Discussion D9.1 Example 12.
D Flip-Flops in Verilog Discussion 10.3 Example 27.
Quad 2-to-1 Multiplexer Discussion D7.4 Example 7.
Introduction to Basys 2. Switches Slide switchesPush button switches.
Engineering 100 Section 250 Combinational Logic -- Examples 9/13/2010.
Learning Outcome By the end of this chapter, students are expected to understand a few elementary components in digital system Decoder Multiplexer Demultiplexer.
 Delay values control the time between the change in a right-hand-side operand and when the new value is assigned to the left- hand side.  Three ways.
ECE 3130 – Digital Electronics and Design
Introduction Verilog is a HARDWARE DESCRIPTION LANGUAGE (HDL) A hardware description language is a language or means used to describe or model a digital.
1 CS151: Digital Design Chapters 4, 5 Review. CS Question 1 Design a combinational circuit for a Roller-Coaster ride in an amusement park. The design.
ECE 331 – Digital System Design Multiplexers and Demultiplexers (Lecture #13)
4-to-1 Multiplexer: Module Instantiation Discussion D2.2 Example 5.
Chapter 2: Structural Modeling Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 2-1 Chapter 2a: Structural Modeling.
Multiplexers Section Topics Multiplexers – Definition – Examples – Verilog Modeling.
Prepared by: Careene McCallum-Rodney Multiplexor.
Multiplexer (MUX) A multiplexer can use addressing bits to select one of several input bits to be the output. A selector chooses a single data input and.
AND Gate Inputs Output Input A (Switch) Input B (Switch) Output Y (Lamp) 0 (Open) 0 (OFF) A B Lamp.
Multiplexer.
ECE 3130 Digital Electronics and Design
Reg and Wire:.
Multiplexer.
EKT 124 MUX AND DEMUX.
INTRODUCTION TO PLC.
Lecture 2 Supplement Verilog-01
What is a Multiplexer (MUX)?
The Multiplexer Multi what?
Hasib Hasan Ankit Baingane Edward Hanson
How Boolean logic is implemented
UNIT 2: Data Flow description
Pulse-Width Modulation (PWM)
Multiplexers Anindya IE CSE.
Supplement on Verilog adder examples
Supplement on Verilog combinational circuit examples
ECE2030 HW-6.
Introduction to Digital IC Design
Arithmatic Logic Unit (ALU). ALU Input Data :  A0-A3  B0-B3 Output Data :  F0 – F3.
Presentation transcript:

4-to-1 Multiplexer: Module Instantiation Discussion D7.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 module mux41 ( input wire [3:0] c, input wire [1:0] s, output wire z ); // Internal signals wire v;// output of mux M1 wire w;// output of mux M2 // Module instantiations mux21a M1 (.a(c[0]),.b(c[1]),.s(s[0]),.y(v) ); mux21a M2 (.a(c[2]),.b(c[3]),.s(s[0]),.y(w) ); mux21a M3 (.a(v),.b(w),.s(s[1]),.y(z) ); endmodule

// Example 4a: 2-to-1 MUX using logic equations module mux21a ( input wire a, input wire b, input wire s, output wire y ); assign y = ~s & a | s & b; endmodule mux21a M1 (.a(c[0]),.b(c[1]),.s(s[0]),.y(v) );

// Example 4a: 2-to-1 MUX using logic equations module mux21a ( input wire a, input wire b, input wire s, output wire y ); assign y = ~s & a | s & b; endmodule mux21a M2 (.a(c[2]),.b(c[3]),.s(s[0]),.y(w) );

// Example 4a: 2-to-1 MUX using logic equations module mux21a ( input wire a, input wire b, input wire s, output wire y ); assign y = ~s & a | s & b; endmodule mux21a M3 (.a(v),.b(w),.s(s[1]),.y(z) );

mux21a Label1 (.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