-------------------------------------------------- -- CREACIO DE BARRES VERTICALS -- -- Creat per: Lluís Magí 1998 -- -------------------------------------------------- LIBRARY IEEE; USE IEEE.STD_LOGIC_1164.ALL; USE IEEE.STD_LOGIC_ARITH.ALL; ENTITY bar IS PORT( clk_pixel : IN STD_LOGIC; sync_v : IN STD_LOGIC; sync_h : IN STD_LOGIC; x : in unsigned(10 downto 0); video_out : out std_logic_vector(23 downto 0) ); END bar; ARCHITECTURE behaviour OF bar IS BEGIN PROCESS(clk_pixel) BEGIN if rising_edge(clk_pixel) then if sync_v='1' and sync_h='0' then if x<70 then video_out<="111111111111111111111111"; elsif x<140 then video_out<="111111111111111100000000"; elsif x<210 then video_out<="000000001111111111111111"; elsif x<280 then video_out<="000000001111111100000000"; elsif x<350 then video_out<="111111110000000011111111"; elsif x<420 then video_out<="111111110000000000000000"; elsif x<490 then video_out<="000000000000000011111111"; else video_out<="000000000000000000000000"; end if; end if; end if; end process; end behaviour;