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.

MUX_DEMUX Bidirectional

Status
Not open for further replies.

nge

Junior Member level 1
Joined
Mar 31, 2003
Messages
16
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
95
How can I design MUX/DEMUX on bidirectional port? It doesn't seem right. Any help would be great. Thanks


Code:
entity MUX_DEMUX is
	generic	(n : integer);
	port (
		a : inout std_logic_vector(n-1 downto 0);
		b : inout std_logic_vector(n-1 downto 0);
		o : inout std_logic_vector(n-1 downto 0);
		s : in std_logic_vector(1 downto 0));
end MUX_DEMUX;

architecture simple of MUX_DEMUX is
begin
	process(s,a,b)		  
	begin
		case s is
			when "01" 	=> o <= a;
					   a <= o;
			when "10"	=> o <= b;
					   b <= o;
			when others => o <= (others=>'0');
		end case;
	end process;
end simple;
 

revanth

Junior Member level 1
Joined
Sep 19, 2006
Messages
15
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,281
Activity points
1,374
hi dude,

at first place, i dint get the need for a mux/demux unit, that too on a bi-directional port.
i think that it will simply add complexity, at no rendered advantage.

please let me know the application.

"enjoy your work"
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top