For a project i got a screen with a resolution of 1024*600. For the project i need a squarre of 20px *20px with a red color. Im trying to get my verticale pos en horizontale pos out of the hsync en vsync pulse but this doesn't work. Have anyone a solution?
process(int_hsync, int_vsync)
begin
if Rising_Edge(int_vsync) then
vsync <= 0;
elsif Rising_Edge(in_clk) then
vsync <= vsync+1;
end if;
if Rising_Edge(int_hsync) then
hsync <= 0;
elsif Rising_Edge(in_clk) then
hsync <= hsync+1;
end if;
end process;
process(in_clk)
begin
if Rising_Edge(in_clk) then
if hsync < 20 and vsync <20 then
int_pixel <= X"0000ff";
else
int_pixel <= X"ff0000";
end if;
end if;
end process;