Gast
#1309305
Hab hier ein Problem, will hier die Vektoren hochzählen. Jedoch kommt
dann bei der Simulation das angehängte Bild. Ich danke schon mal im
Voraus. :)
library ieee;
use ieee.std_logic_1164.ALL;
use ieee.numeric_std.ALL;
entity pixel_generator is
port( p_col: in integer;
p_row: in integer;
takt: in bit;
p_gruen: out std_logic_vector(3 downto 0);
p_blau: out std_logic_vector(3 downto 0);
p_rot: out std_logic_vector(3 downto 0)
);
end pixel_generator;
architecture behaviour of pixel_generator is
signal gruen, rot, blau: unsigned(3 downto 0):="0000";
begin
process(p_col,p_row, takt)
begin
if(takt'event and takt='1') then
if(p_col<=640 and p_col>=1) then
if(p_row<=479) then
gruen<=gruen+"0001";
rot<=rot+"0010";
blau<=blau+"0011";
end if;
else
p_gruen<="0000";
p_rot<="0000";
p_blau<="0000";
end if;
end if;
end process;
p_gruen<=std_logic_vector(gruen);
p_rot<=std_logic_vector(rot);
p_blau<=std_logic_vector(blau);
end behaviour;

