-- Interactive Audio Manipulation Processor -- -- file: video.vhd -- status: simulated; works in hardware, but sometimes cursor "teleports" -- -- author: Stephen Tang, modified from code by by reference [7] -- -- This file contains the top level entity for the video interface. It is -- modified from the file line.vhd in the example code provided by the -- application notes from reference [7] (the EE552 Dicerace group), at this URL: -- http://www.ee.ualberta.ca~elliott/ee552/studentAppnotes/1998_w/dicerace_video_display/ LIBRARY IEEE; USE IEEE.STD_LOGIC_1164.all; USE IEEE.STD_LOGIC_ARITH.all; USE IEEE.STD_LOGIC_UNSIGNED.all; library work; use work.Constants_Pkg.all; ENTITY video IS PORT( clock, reset: in STD_LOGIC; cursorX: in std_logic_vector(DISPLAY_X-1 downto 0); cursorY: in std_logic_vector(DISPLAY_Y-1 downto 0); -- current joystick cursor position vga_red, vga_green, vga_blue: out BOOLEAN; vga_h_sync,vga_v_sync : out BOOLEAN ); END video; ARCHITECTURE TopLevel of video IS ------------------------------------------------------------------------------- SIGNAL HSync, VSync: BOOLEAN; SIGNAL countX, countY: STD_LOGIC_VECTOR(9 downto 0); SIGNAL vclock: STD_LOGIC; COMPONENT SYNCGEN PORT( Clock: IN std_logic; vclock: OUT STD_LOGIC; HSync, VSync: OUT BOOLEAN; vga_h_sync, vga_v_sync: OUT BOOLEAN ); END COMPONENT; COMPONENT count_xy PORT( clock: in STD_LOGIC; countX,countY: out STD_LOGIC_VECTOR(9 downto 0); HSync,VSync: in BOOLEAN ); END COMPONENT; component ColourChooser port( clock, reset: in std_logic; countX, countY: std_logic_vector(DISPLAY_X-1 downto 0); cursorX: in std_logic_vector(DISPLAY_X-1 downto 0); cursorY: in std_logic_vector(DISPLAY_Y-1 downto 0); vga_red, vga_green, vga_blue: out boolean ); end component; begin HappyRainbows: ColourChooser port map( clock => clock, reset => reset, countX => countX, countY => countY, cursorX => cursorX, cursorY => cursorY, vga_red => vga_red, vga_green => vga_green, vga_blue => vga_blue ); use_syncgen: SYNCGEN port map( Clock => clock, vclock => vclock, HSync => HSync, VSync => VSync, vga_h_sync => vga_h_sync, vga_v_sync => vga_v_sync ); use_counter: count_xy PORT MAP( clock => clock, HSync => HSync, VSync => VSync, countX => countX, countY => countY ); end TopLevel;