Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Generic Multiplexer

Reply
Thread Tools

Generic Multiplexer

 
 
Vinny P Vinny P is offline
Junior Member
Join Date: Sep 2009
Posts: 3
 
      09-18-2009
Hi,

I am trying to create a N input mux and an N output Demux but the Xilinx Xst does not show a multiplexer in the synthesis report. In the code below the attempt for these hardware units are shown in process MUXes_FOR_PORT_A, DeMUXes_FOR_PORT_A, MUXes_FOR_PORT_B and DeMUXes_FOR_PORT_B. Can anyone guide me in producing N input mux and an N output Demux that is recognized by the XST synthesis tool.

Code:
h++p://pastebin.com/f71b18f73
Thank you in Advance,
Vinny P
 
Reply With Quote
 
 
 
 
Vinny P Vinny P is offline
Junior Member
Join Date: Sep 2009
Posts: 3
 
      09-22-2009
Pop-up!

Still can't figure this out

Thank you,
Vince
 
Reply With Quote
 
 
 
 
StuartHobday StuartHobday is offline
Junior Member
Join Date: Sep 2009
Location: Dorset
Posts: 7
 
      09-22-2009
This syntax will create a N-input mux:

LIBRARY ieee;
USE ieee.std_logic_1164.ALL;

ENTITY NInputMux IS

GENERIC( MuxSize : INTEGER := 4
);
PORT( InputBusSelect : IN std_logic;
InputBusA : IN std_logic_vector((MuxSize-1) DOWNTO 0);
InputBusB : IN std_logic_vector((MuxSize-1) DOWNTO 0);
OutputBus : OUT std_logic_vector((MuxSize-1) DOWNTO 0)
);
END NInputMux;


ARCHITECTURE Behavioural OF NInputMux IS

CONSTANT BusA : std_logic := '1';

BEGIN

OutputBus<= InputBusA WHEN ( InputBusSelect = BusA
)
ELSE InputBusB;

END;

The construct in your design will use combinatorial logic rather than muxes as you are only assigning zero's to the output bus. The above example should help you design the demux.
 
Reply With Quote
 
Vinny P Vinny P is offline
Junior Member
Join Date: Sep 2009
Posts: 3
 
      09-24-2009
StuartHobday,

Thank you for your reply. I may not have been clear on the first post, I am trying to make a N to 1 mux and a 1 to N demux. The code you have posted is a mux structure with a variable length input. I am trying to vary the number of input to a mux and the number of outputs to a demux.

Looking forward to your reply.

Thank you,
Vinny P
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Generic multiplexer VladimirMatvejev@gmail.com VHDL 1 10-02-2007 07:34 PM
Which is faster in ASIC: 2-input AND gate or a 2-input multiplexer Weng Tianxiang VHDL 12 08-11-2005 10:50 AM
Multiplexer Index woko VHDL 2 08-05-2005 06:04 AM
Big multiplexer? bxbxb3 VHDL 5 04-19-2005 05:55 AM
problems with 4 to 1 multiplexer Lily VHDL 6 04-28-2004 11:37 PM



Advertisments