LIBRARY IEEE; -- VGA显示器 彩条 发生器
USE IEEE.STD_LOGIC_1164.ALL;
USE IEEE.STD_LOGIC_UNSIGNED.ALL;
ENTITY COLOR IS
PORT ( CLK, MD : IN STD_LOGIC;
HS, VS, R, G, B : OUT STD_LOGIC ); -- 行场同步/红,绿,兰
END COLOR;
ARCHITECTURE behav OF COLOR IS
SIGNAL HS1,VS1,FCLK,CCLK : STD_LOGIC;
SIGNAL MMD : STD_LOGIC_VECTOR(1 DOWNTO 0);-- 方式选择
SIGNAL FS : STD_LOGIC_VECTOR (3 DOWNTO 0);
SIGNAL CC : STD_LOGIC_VECTOR(4 DOWNTO 0); --行同步/横彩条生成
SIGNAL LL : STD_LOGIC_VECTOR(8 DOWNTO 0); --场同步/竖彩条生成