-------------------------------------------------------------------------------- -- Company: -- Engineer: -- -- Create Date: 16:10:25 10/07/05 -- Design Name: -- Module Name: VGA_boxVHDL - Behavioral -- Project Name: -- Target Device: -- Tool versions: -- Description: -- -- Dependencies: -- -- Revision: -- Revision 0.01 - File Created -- Additional Comments: -- -------------------------------------------------------------------------------- library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; ---- Uncomment the following library declaration if instantiating ---- any Xilinx primitives in this code. --library UNISIM; --use UNISIM.VComponents.all; entity VGA_boxVHDL is Port ( clk : in std_logic; Row : in std_logic_vector(8 downto 0); Column : in std_logic_vector(9 downto 0); TopRow : in std_logic_vector(8 downto 0); LeftColumn : in std_logic_vector(9 downto 0); Height : in std_logic_vector(8 downto 0); Width : in std_logic_vector(9 downto 0); Fill : in std_logic; Video : out std_logic); end VGA_boxVHDL; architecture Behavioral of VGA_boxVHDL is signal leftbar : std_logic; signal rightbar : std_logic; signal topbar : std_logic; signal bottombar : std_logic; signal filler : std_logic; begin video <= LeftBar or RightBar or TopBar or BottomBar or filler; process(clk) begin if(clk = '0' and clk'event) then if(Column = LeftColumn and row > TopRow and row < (TopRow + height)) then LeftBar <= '1'; else leftbar <= '0'; end if; end if; end process; process(clk) begin if(clk = '0' and clk'event) then if(Column = (LeftColumn + width) and row > TopRow and row < (TopRow + height)) then rightBar <= '1'; else rightbar <= '0'; end if; end if; end process; process(clk) begin if(clk = '0' and clk'event) then if(row = toprow and column > leftcolumn and column < (leftcolumn + width)) then topBar <= '1'; else topbar <= '0'; end if; end if; end process; process(clk) begin if(clk = '0' and clk'event) then if(row = (toprow + height) and column > leftcolumn and column < (leftcolumn + width)) then bottomBar <= '1'; else bottombar <= '0'; end if; end if; end process; process(clk) begin if(clk = '0' and clk'event and fill ='1') then if(Column > LeftColumn and Column < (LeftColumn + width) and row > TopRow and row < (TopRow + height)) then filler <= '1'; else filler <= '0'; end if; end if; end process; end Behavioral;