answersLogoWhite

0

library IEEE;

use IEEE.STD_LOGIC_1164.ALL;

use IEEE.STD_LOGIC_ARITH.ALL;

use IEEE.STD_LOGIC_UNSIGNED.ALL;

entity mux2x1 is

Port ( i : in STD_LOGIC_VECTOR (1 downto 0);

s : in STD_LOGIC;

y : out STD_LOGIC);

end mux2x1;


architecture df of mux2x1 is

begin

with s select

y<= i(0) when '0',

i(1) when '1',

'0' when others;

end df;

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

What is the structural VHDL program for 8 to 1 multiplexer?

A structural VHDL program for an 8-to-1 multiplexer defines the multiplexer using lower-level components, such as 2-to-1 multiplexers. You can instantiate several 2-to-1 multiplexers to create the 8-to-1 functionality. The 8 input signals are combined through three levels of 2-to-1 multiplexers, where the first level reduces the inputs from 8 to 4, the second from 4 to 2, and the final level selects the output from 2 inputs. Below is a simple structural VHDL example: library IEEE; use IEEE.STD_LOGIC_1164.ALL; entity MUX8to1 is Port ( A : in STD_LOGIC_VECTOR(7 downto 0); S : in STD_LOGIC_VECTOR(2 downto 0); Y : out STD_LOGIC); end MUX8to1; architecture Structural of MUX8to1 is signal MUX1_out, MUX2_out, MUX3_out, MUX4_out : STD_LOGIC; begin MUX1: entity work.MUX2to1 port map (A(0), A(1), S(0), MUX1_out); MUX2: entity work.MUX2to1 port map (A(2), A(3), S(0), MUX2_out); MUX3: entity work.MUX2to1 port map (A(4), A(5), S(0), MUX3_out); MUX4: entity work.MUX2to1 port map (A(6), A(7), S(0), MUX4_out); MUX5: entity work.MUX2to1 port map (MUX1_out, MUX2_out, S(1), Y_temp1); MUX6: entity work.MUX2to1 port map (MUX3_out, MUX4_out, S(1), Y_temp2); MUX7: entity work.MUX2to1 port map (Y_temp1, Y_temp2, S(2), Y); end Structural; In this example, MUX2to1 is a previously defined 2-to-1 multiplexer entity. Each level of multiplexing reduces the number of inputs until the final output is selected based on the 3-bit select signal S.


What is the basics of VHDL?

VHDL is a hardware description language. You can describe the hardware in three different ways using VHDL. 1. dataflow model 2. behavioral model 3. structural model


How do you construct half adder using 2 1 multiplexer?

Use the multiplexer to choose the correct output based on the inputs (use the truth table).


What is a vhdl gold model?

Vhdl has got three models - programming styles. 1. data flow model 2. behavioral model 3. structural model.


How Design a 3 input AND gate using 2 by 1 Multiplexer only?

help


How can you implement an 8 to1 multiplexer by using two 4 to1 multplexers?

You don't need two 4-to-1 multiplexers. You only need one 4-to-1 multiplexer, and something that functions as a 2-to-1, like a single 2-input OR gate with one input grounded.


How can you write a VHDL code for full adder using two half adders?

Since a fulladder can be obtained by using 2 halfadders &amp; 1 OR gate.....so we have to call an halfadder program as well as an OR program......this can be implemented easily with the help of structural model rather than dataflow and behavoioural model


What is vhdl code for 2 bit sliced processor?

library ieee;


You want vhdl based mini project for electronics?

1)Home Security based system 2)ROM Based Sine wave


Explain MUx constract a 16-to-1 line multiplexer with two 8-to-1 multiplexer and one 2-to-1 line multiplexeruse block diagram for the three multiplexers?

Jo MUX hai wo circuit ki tarah karya karta hai. adhik jankari ke liye csa ki book search kre. Deepak Shukla. Duble MCA-


How many 2 input multiplexers are required to construct a 1024 input multiplexer?

15 2 bit multiplexers


Construct a 16-to-1-line multiplexer with two 8-to-1-line multiplexers and one 2-t0-1-line multiplexer?

Type your answer here... D0-D7 on 1st 8to1, D8-D15 on 2nd 8to1, S0,S1,S2 to both. The output from 1st 8to1 is D0 on the 2to1, the output from the 2nd 8to1 is D1 on the 2to1 and S3 to the 2to1. The 2to1 provides the final 16to 1 mutiplexed output, OK?