J
Jan
Guest
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 8) 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. The
problem is that the SEL input on the mux isn't connected.
Can someone see what I'm doing wrong? It should be pretty straight
forward, but it isn't.
The function Im trying to make is:
pixel(24bit) is input to the module.
color_pointer(2bit) is input to the module.
color_values(8bit) is output from the module.
color_pointer selects which of the 3 bytes in pixel is forwarded to
color_values.
Any help is greatly appreciated!
regards
Jan
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 8) 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. The
problem is that the SEL input on the mux isn't connected.
Can someone see what I'm doing wrong? It should be pretty straight
forward, but it isn't.
The function Im trying to make is:
pixel(24bit) is input to the module.
color_pointer(2bit) is input to the module.
color_values(8bit) is output from the module.
color_pointer selects which of the 3 bytes in pixel is forwarded to
color_values.
Any help is greatly appreciated!
regards
Jan