Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

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; o:eek:ut std_logic);
end mux2;


architecture struct of mux2 is

component ha_en
port(a,s_bar:in std_logic;
c1:eek:ut std_logic);
end component;

component pa_en
port(b,s:in std_logic;
c2:eek:ut std_logic);

end component;

signal s2,o1,o2: std_logic;

begin

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



end struct;
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top