answersLogoWhite

0

What is VHDL program for 8 to 1 multiplexer?

Updated: 10/4/2023
User Avatar

Ramarav

Lvl 1
11y ago

Best Answer

library IEEE;

use IEEE.STD_LOGIC_1164.ALL;

use IEEE.STD_LOGIC_ARITH.ALL;

use IEEE.STD_LOGIC_UNSIGNED.ALL;

entity mux8X1 is

Port ( en8 : in STD_LOGIC;

s3 : in STD_LOGIC_VECTOR (2 downto 0);

i : in STD_LOGIC_VECTOR (7 downto 0);

y8 : out STD_LOGIC;

y8l : out STD_LOGIC);

end mux8X1;

architecture Behavioral of mux8X1 is

begin

process(en8,s3,i)

begin

if(en8='0') then y8<='0';y8l<='1';

else

case s3 is


when "000" =>y8<=i(0);y8l<=not i(0);

when "001" =>y8<=i(1);y8l<=not i(1);

when "010" =>y8<=i(2);y8l<=not i(2);

when "011" =>y8<=i(3);y8l<=not i(3);

when "100" =>y8<=i(4);y8l<=not i(4);

when "101" =>y8<=i(5);y8l<=not i(5);

when "110" =>y8<=i(6);y8l<=not i(6);

when "111" =>y8<='i(7);y8l<=not i(7);

when others=>' null';

end case;

end if;

end process;

end Behavioral;

User Avatar

Wiki User

11y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

11y ago
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

entity mux16x1 is
Port ( d : in STD_LOGIC_VECTOR (15 downto 0);
en : in STD_LOGIC;
s : in STD_LOGIC_VECTOR (3 downto 0);
y : out STD_LOGIC;
yn : out STD_LOGIC);
end mux16x1;

architecture structural of mux16x1 is

signal c:std_logic_vector(3 downto 0);
signal ybar:STD_LOGIC_VECTOR (3 downto 0);


component mux4X1
Port ( en4 : in STD_LOGIC;
i3 : in STD_LOGIC;
i2 : in STD_LOGIC;
i1 : in STD_LOGIC;
i0 : in STD_LOGIC;
s2 : in STD_LOGIC_VECTOR (1 downto 0);
y4 : out STD_LOGIC;
y4l : out STD_LOGIC);
end component;

begin

u0:mux4x1 port map (en,d(15),d(14),d(13),d(12),s(1 downto 0),c(3),ybar(3));
u1:mux4x1 port map (en,d(11),d(10),d(9),d(8),s(1 downto 0),c(2),ybar(2));
u2:mux4x1 port map (en,d(7),d(6),d(5),d(4),s(1 downto 0),c(1),ybar(1));
u3:mux4x1 port map (en,d(3),d(2),d(1),d(0),s(1 downto 0),c(0),ybar(0));
u4:mux4x1 port map (en,c(3),c(2),c(1),c(0),s(3 downto 2),y,yn);

end structural;
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is VHDL program for 8 to 1 multiplexer?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

A 4 variable logic expreSSion can be realized using which multiplexer?

using 8:1 mux....


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 do you design 32 to 1 multiplexer b using a 4 to 1 multiplexer?

To build a 64 to 1 multiplexer using cascaded 8 to 1 multiplexer, use nine 8 to 1's. Connect the first 8 to each of the 64 inputs, then connect the ninth to the outputs of the first eight. Connect the three address lines of the eight together to form 3 of the address lines. Connect the three address lines of the ninth to form the other three, for a total of 6 address lines selecting 1 of 64 inputs.This is a lot of logic. Fan-in and fan-out may be considerations. If you are trying to scan 64 switches, there may be a better way using an 8-bit output connected to a switch matrix (with diodes if you need more than one at a time close-able) and then connected to an 8-bit input. Even better, consider the 8279 keyboard/display controller.


Vhdl code for 8 to 3 priority encoder?

karthika only know answer to this question


We connect 8 computers to a statistical multiplexer at 56000 bits.second what is the maximum rate any one of the 8 computers can transmit?

pcworld


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-


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?


How do you add 8 bit number with diagram of various IC pin?

for addition of 8 numbers by IC , first we have to connect all bit numbers on different pins of IC &amp; then take the output on remaining pins , For these first we have to make a program for vhdl in FPGA (field programmable gate array) &amp; proceed accordingly .


What are the release dates for The Jack Paar Program - 1962 1-8?

The Jack Paar Program - 1962 1-8 was released on: USA: 9 November 1962


What are the release dates for From the Earth to the Moon - 1998 We Interrupt This Program 1-8?

From the Earth to the Moon - 1998 We Interrupt This Program 1-8 was released on: USA: 26 April 1998


What is the VHDL program for mux?

A simple program for 8 x 1 multiplexer is given below. Library ieee; use ieee.std_logic_1164.all; entity mux is port (a, b, c, d, e, f, g, h : in std_logic; s: in std_logic_vector ( 2 downto 0); y, yn : out std_logic ; St : in std_logic) ; end mux ; architecture mux of mux is signal yt : std_logic; begin process (a, b, c, d, e, f, g, h, s, yt) begin case s is when "000" =&gt; yt &lt;= a; when "001" =&gt; yt &lt;= b; when "010" =&gt; yt &lt;= c; when "011" =&gt; yt &lt;= d; when "100" =&gt; yt &lt;= e; when "101" =&gt; yt &lt;= f; when "110" =&gt; yt &lt;= g; when "111" =&gt; yt &lt;= h; when others =&gt; yt &lt;= (others =&gt; '0'); end case; if St='1' then y &lt;= yt; yn &lt;= not yt; else y&lt;= '0'; yn &lt;= '1'; end if; end mux;


What are the release dates for The Jack Benny Program - 1950 First Show of the Season 8-1?

The Jack Benny Program - 1950 First Show of the Season 8-1 was released on: USA: 22 September 1957