structural style of 2-to-1 mux

Status
Not open for further replies.

james09

Newbie level 4
Joined
Dec 31, 2009
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
finland
Activity points
1,392
Hi,all!
After testing,the following design failed.what is the right codes for structural style of 2-to-1 mux with selector input?


library ieee ;
use ieee.std_logic_1164.all;


entity mux2 is
port(a,b,s:in std_logic; out std_logic);
end mux2;


architecture struct of mux2 is

component ha_en
port(a,s_bar:in std_logic;
c1ut std_logic);
end component;

component pa_en
port(b,s:in std_logic;
c2ut std_logic);

end component;

signal s2,o1,o2: std_logic;

begin

HA1:ha_en port map( s_bar => s2, a => a, c1 => o1);
HA2a_en port map(b => b,s => s,c2 => o2);
s2 <= not s;
o <= o1 or o2;



end struct;
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…