FPGA驱动VGA显示VHDL程序(彩条,可用)
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
---------------------------------------------------------------------------------------------------
--***************************************************************************** ********************
-- CreateDate : 2009-03-28
-- ModifData : 2009-03-28
-- Description : VGA Interface
-- Author : Explorer01
-- Version : V1.1
--***************************************************************************** ********************
---------------------------------------------------------------------------------------------------
-- VHDL library Declarations
LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
USE IEEE.STD_LOGIC_UNSIGNED.ALL;
USE IEEE.STD_LOGIC_ARITH.ALL;
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-- The Entity Declarations
ENTITY VGA IS
PORT
(
RESET : IN STD_LOGIC;
GCLKP1 : IN STD_LOGIC;
GCLKP2 : IN STD_LOGIC;
-------------------------------------
-- VGA
R : OUT STD_LOGIC_VECTOR(3 DOWNTO 0);
G : OUT STD_LOGIC_VECTOR(3 DOWNTO 0);
B : OUT STD_LOGIC_VECTOR(3 DOWNTO 0);
VS : OUT STD_LOGIC;
HS : OUT STD_LOGIC
);
END VGA;
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-- The Architecture of Entity Declarations
ARCHITECTURE Behavioral OF VGA IS
-- SuperVGA timing from NEC monitor manual
-- Horizontal :
-- ______________ _____________
-- | | |
-- _______________| VIDEO |_______________| VIDEO (next line) --
-- ___________ _____________________ ______________________
-- |_| |_|
-- B C <------D-----><-E->
-- <----------A---------->
--
--
-- Vertical :
-- ______________ _____________
-- | | |
-- _______________| VIDEO |_______________| VIDEO (next frame) --
-- ___________ _____________________ ______________________
-- |_| |_|
-- P Q <------R-----><-S->
-- <----------O---------->
--
-- For VESA 800*600 @ 60Hz:
-- Fh (kHz) :37.88
-- A (us) :26.4
-- B (us) :3.2
-- C (us) :2.2
-- D (us) :20.0
-- E (us) :1.0
--
-- Fv (Hz) :60.32
-- O (ms) :16.579
-- P (ms) :0.106
-- Q (ms) :0.607
-- R (ms) :15.84
-- S (ms) :0.026
--
--
-- Horizonal timing information:
--
-- Mode name Pixel sync back active front whole line -- clock pulse porch time porch period -- (MHz) (us) (pix) (pix) (pix) (pix) (pix)
--
-- VGA 800x600 60Hz 40 3.2 128 85 806 37 1056