--code for 8 :1 mux:
library ieee;
entity mux8 is
port(d:in bit_vector(7 downto 0);
e:in bit;
s:in bit_vector(2 downto 0);
y:out bit);
end mux8;
architecture struct of mux8 is
signal m:bit;
begin
with e select
y<='0' when '0',
m when '1';
with s select
m<=d(0) when "000",
d(1) when "001",
d(2) when "010",
d(3) when "011",
d(4) when "100",
d(5) when "101",
d(6) when "110",
d(7) when "111";
end struct;
The above code has been executed and has been found to have no errors..!
plz do comment..!
thank u..!! :) :)
The above code has been executed and has been found to have no errors..!
plz do comment..!
thank u..!! :) :)
1 comments:
Can you post the same code in structural type code
Post a Comment