"Jan" <webpjat@future-design_DELETE.dk> wrote in message
news:48f97a4e$0$90266$...
> Dear all,
>
> I've been trying for hours now to get a MUX written in VHDL to work. But
> now I'm giving up 
>
> Here is my VHDL:
>
> architecture Behavioral of pixel_clusterX3 is
> signal pixels : STD_LOGIC_VECTOR (23 downto 0);;
> signal color_values : STD_LOGIC_VECTOR (7 downto 0);
>
> begin
> -- This process takes one pixel and splits it into colors.
> -- The color value is then forwarded to the color_value signal.
> color_select: WITH color_pointer(1 downto 0) SELECT
> color_values <=
> pixels(7 downto 0) WHEN "00",
> pixels(15 downto
WHEN "01",
> pixels(23 downto 16) WHEN "10",
> (others => '0') WHEN OTHERS;
> end Behavioral;
>
> pixels are MAPPED to a memory.
> color_values are MAPPED to another component.
>
> It compiles fine however, when I examine the RTL Schematic I discovered
> that the compiler converts my VHDL into a MUX. So far so good.
Don't bother looking at schematics, use a simulator to get the function
correct first. You'll be much more productive and won't find yourself
having to ask a newsgroup to debug your stuff.
> The problem is that the SEL input on the mux isn't connected.
>
What is driving the color_pointer signal? If that signal was really not
connected though the whole mux would disappear since the whole thing could
be optimized to just setting color_values always to all zeros. Again, the
simulator is the proper tool for debug to get the function correct, not
newsgroups.
> Can someone see what I'm doing wrong?
You're not using a simulator. Also there really isn't enough info in your
posting for anyone to find the problem for you.
> It should be pretty straight forward, but it isn't.
>
It is pretty straight forward to use a simulator also.
> The function Im trying to make is:
> pixel(24bit) is input to the module.
And yet it is shown above not as an input but an internal signal to the
module.
> color_pointer(2bit) is input to the module.
> color_values(8bit) is output from the module.
>
And yet color_values is shown above not as an output but an internal signal
to the module.
> color_pointer selects which of the 3 bytes in pixel is forwarded to
> color_values.
>
> Any help is greatly appreciated!
>
The exercise of writing up a description as you've done is usually a good
way to flesh out the design errors. In fact, several times people post
something and then want to say 'Doh', because they just figured it out. In
your case, you've described input and output signals (which would then be on
the entity) which your posted code says are internal signals...I'd start
there if I were you...and run the simulator next.
Kevin Jennings