4:1 multiplexer

Joined
Nov 5, 2007
Messages
5
Reaction score
0
Code:
ENTITY mux4_1 IS
-- Declarations
	port(a,b,c,d :in std_logic;
		 s: in std_logic_vector;
		 y: out std_logic);

END mux4_1 ;

-- with/select statement
ARCHITECTURE second OF mux4_1 IS
BEGIN
	with s select
		y<=   a when s= "00" , -- it tells me there is an error in this line ?!
			b when s= "01" ,
			c when s= "10" ,
			d when s= "11" ,
			'-' when others ;
END second;

i need help
 
Joined
Nov 21, 2006
Messages
31
Reaction score
0
4:1 Mux

you have some syntax issues. You can try the follwing:

y <= a when ss = "00" else b when ss = "01" else
c when ss = "10" else
d when ss = "11" else
'-' ; -- when others ;

regards,

:bored:
 
Joined
Nov 5, 2007
Messages
5
Reaction score
0
ok , i am using FPGA advantage pro 5.5 .

how do i simulate ?!

if there is a better software plz suggest me coz i am newbie in this stuff

Thanks in advance
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top