Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Code VHDL - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity Video_Gererater is Generic ( constant HORIZONTAL_WIDTH : integer ; --constant VERTICAL_WIDTH : integer ; --constant HORIZONTAL_LENGTH : integer ; constant VERTICAL_LENGTH : integer ); port( HREF: in std_logic; VSYNC: in std_logic; PCLK: in std_logic; RESET: in std_logic; DATA_IN: in std_logic_vector (7 downto 0); DATA_OUT: out std_logic_vector (7 downto 0); HORIZONTAL: out std_logic_vector(11 downto 0); VERTICAL: out std_logic_vector(10 downto 0); FRAME : out std_logic); end Video_Gererater; architecture Behavioral of Video_Gererater is signal H_ROW : std_logic_vector (11 downto 0); signal V_LINE : std_logic_vector (10 downto 0); begin process(PCLK,RESET) begin if RESET='1' then H_ROW <= "000000000000"; V_LINE <= "00000000000"; elsif(rising_edge(PCLK)) then if (HREF = '0' and VSYNC = '0')then if (HORIZONTAL_WIDTH := 1280 and VERTICAL_LENGTH := 720)then if V_LINE = "0101101000" then FRAME = '1'; H_ROW <= "000000000000"; V_LINE <= "00000000000"; elsif H_ROW = "010100000000" then H_ROW <= "000000000000"; V_LINE <= V_LINE + 1; else H_ROW <= H_ROW + 1; end if; end if; if (HORIZONTAL_WIDTH := 1920 and VERTICAL_LENGTH := 1080)then if V_LINE = "10000111000" then FRAME = '1'; H_ROW <= "000000000000"; V_LINE <= "00000000000"; elsif H_ROW = "011110000000" then H_ROW <= "000000000000"; V_LINE <= V_LINE + 1; else H_ROW <= H_ROW + 1; end if; end if; if (HORIZONTAL_WIDTH := 1944 and VERTICAL_LENGTH := 1224)then if V_LINE = "10011001000" then FRAME = '1'; H_ROW <= "000000000000"; V_LINE <= "00000000000"; elsif H_ROW = "011110011000" then H_ROW <= "000000000000"; V_LINE <= V_LINE + 1; else H_ROW <= H_ROW + 1; end if; end if; if (HORIZONTAL_WIDTH := 2688 and VERTICAL_LENGTH := 1520)then if V_LINE = "10111110000" then FRAME = '1'; H_ROW <= "000000000000"; V_LINE <= "00000000000"; elsif H_ROW = "101010000000" then H_ROW <= "000000000000"; V_LINE <= V_LINE + 1; else H_ROW <= H_ROW + 1; end if; end if; end if; end if; end process;
if (HORIZONTAL_WIDTH := 1280 and VERTICAL_LENGTH := 720)then