VHDL语言VGA显示控制

上传人:痛*** 文档编号:68570367 上传时间:2022-04-03 格式:DOC 页数:22 大小:630KB
收藏 版权申诉 举报 下载
VHDL语言VGA显示控制_第1页
第1页 / 共22页
VHDL语言VGA显示控制_第2页
第2页 / 共22页
VHDL语言VGA显示控制_第3页
第3页 / 共22页
资源描述:

《VHDL语言VGA显示控制》由会员分享,可在线阅读,更多相关《VHDL语言VGA显示控制(22页珍藏版)》请在装配图网上搜索。

1、EDA大作业实验报告基于VHDL语言的VGA显示与控制1111000079 田宇1111000081 王坤目录1. VGA显示原理31. 1 VGA逐行扫描显示306d 挀 2 VGA时序分析306d 挀 时序部分的代码实现32. 1时序部分主要代码32.2 时序部分的实现42.2. 1行时序42.2场时序5控制部分的代码实现53.1控制部分主要代码5控制部分的实现123. 2. 1彩条与彩格123.2.2字体显示 12124. 硬件平台实验1- VGA显示原理1 VGA逐行扫描显示电子束时,用并使扫逐行扫描是扫描从屏幕左上角一点开始,从左像右逐点扫描,每扫描完一行, 回到屏幕的左边下一行的起

2、始位置,在这期间,CRT对电子束进行消隐,每行结束 行同步信号进行同步:当扫描完所有的行,形成一帧,用场同步信号进行场同步, 描回到屏幕左上方,同时进行场消隐,开始下一帧。1. 2 VGA时序分析9水-麻f荷同步rIVGA的行时序同歩1同步牀冲8睐冲.1场消(ft何隔VGA的场时序0-1)时序部分的代码实现2. 1时序部分主要代码ifeve nt and ck_,T then H15 and H110 then Hs=110 then Hs=160 and H800 then Hen- Toelsif H=800 then Hen=, O。H=0oend ifoend ifoend ifoif

3、 Hs, event and Hs=,T then V11 and V14 then Vs=14 then VsC 0,。if V=45 and V525 then Ven= V 。elsif V=525 then Ven=, 0,。V=0oend ifoend ifoend ifo此部分代码为时序部分主要代码。2. 2时序部分的实现 2. 2. 1行时序H:行HS:行消隐信号Hen:允许显示由时序图(图-1)可以看出,行时序屮需要有行消隐、行同步、显示前后沿等。英屮有效 显示信号为640个周期。2. 22场时序与行时序相类似。3控制部分的代码实现1控制部分主要代码process (clk_d

4、, sw)beginif clk_d eve nt and clk_d=,1/ t hen if sw二 11 thensw_t 二sw_t+l。end ifoif sw二01 thensw_t二sw_ tT oend ifoend ifo end processo process (sw_t)beginif sw_t 二0000 then R=Rd(s) o G=Gd(s) B=Bd(s)oelsi. f sw_t 二0001 then R=Rd (s+1) o G=Gd (s+1) oB=Bd(s+l)oelsi.f sw_t=*0010* then R=Rd (s+2) o G=Gd (

5、s+2) o B=Bd (s+2)oelsif sw_t二*0011* then R=Rd (s+3) o G=Gd (s+3) 。 B=Bd (s+3)oif s=5 and t=4 and (n=0 or m=0 or n=79 or m=59 or n=l or m=l or n=78 or m=58) then R=Rd(3)o G=Gd(3)o B二Bd 。end ifoelsif sw_t二*0100* then R二Rd(s+4) G=Gd (s+4) e B=Bd(s+4)oif s=3 and t=4 and (n=0 or m=0 or n=79 or m=59 or n=

6、l or m=l or n=78 or m=58) then R=Rd(0)o G=Gd(l)o B=Bd(3)oend ifoels 辻 sw_t二0101* then R=Rd (s+5) o G=Gd (s+5) o B=Bd(s+5)oif s=2 and t=4 and (n=0 or m=0 or n=79 or m=59 or n=l orm=l or n=78 or m=58) then R=Rd (3) G=Gd (2) 。 B=Bd (0) end ifoels 辻 sw_t=,0110/,then R=Rd (s+6) o G=Gd (s+6) 0 B=Bd (s+6)o

7、if s=l and t=4 and (n=0 or m=0 or n=79 or m=59 or n=l orm=l or n=78 or m=58) then R=Rd(0)o G=Gd(0)o B=Bd(3)oend ifoelsi.f sw_t二*0111* then R=Rd (s+7) G=Gd (s+7) 。 B=Bd(s+7) oif s=3 and t=5 and (n=0 or m=0 or n=79 or m=59 or n=l orm=l or n=78 or m=58) then R=Rd (0) o G=Gd (0) o B=Bd (0) oend ifoelsif

8、 sw_t 二 T000 then R=Rd(s+t)rem 8) o G=Gd (s+t)rem8) o B=Bd( (s+t)rem 8) oelsif sw_t 二 1001 then R=Rd(s+t)rem 7)。G=Gd(s+t)rem7) o B=Bd(s+t) rem 7)oelsif sw_t=T010zz then R二Rd(s+t)rem 6) o G=Gd(s+t)rem 6)o B=Bd(s+t)rem 6)oelsif sw_t 二 1011 then R二Rd(s+t)rem 5) o G=Gd(s+t)rem5) o B=Bd(s+t) rem 5)oelsif

9、 sw t=T100/z thenR二Rd(s+t)rem 4)。G=Gd(s+t)rem4) o B=Bd( (s+t)rem 4)。elsif sw_t=T101zz thenR=Rd(s+t)rem 3)。 G=Gd(s+t)rem 3) o B=Bd( (s+t) rem 3)oelsif sw_t=T110zz thenR=Rd (s+t)rem 2)o G=Gd(s+t)rem 2) o B=Bd(s+t) rem 2) oelsi.f sw_t二Till then R=Rd(s+t)rem 1) o 1) G=Gd(s+t)rem o B=Bd(s+t)rem 1)。一if s=

10、5 and t=4 and (n=0 or m=0 or n=79 orm=l or n=78 or m=58) then R=Rd(3)o G二Gd(3)。 or 111=59 or n=1 B=Bd (3)oend ifo一if s=4 and t=4 and (n=0 or m=0 or n=79 or m=59 or n=l or m=lor n=78 or m=58) then R=Rd(3)o G=Gd(3)o B=Bd(3)o一end ifo一if s=3 and t=4 and (n=0 or m=0 or n=79 or m=59 or n=l or m=lor n=78 o

11、r m=58) then R=Rd(3)o G=Gd(3)o B=Bd(3)o一end ifo一if s=2 and t=4 and (n=0 or m=0 or n=79 or m=59 or n=l or m=lor n=78 or m=58) then R=Rd(3) G=Gd(3)o B=Bd(3)o一end ifoif s=l and t=4 and(n=0 or m=0 or n=79 or m=59 or n=lor m=lor n=78 or m=58) then R=Rd(3)o G=Gd(3)o B=Bd(3)o一end ifoif s=3 and t=5 and(n=0

12、or m=0 or n=79 or m=59 or n=lor m=lor n=78 or m=58) then R=Rd (3)。G=Gd (3) o B=Bd (3) o一end ifoif s=l and t=6 then R=Rd(3)o G=Gd(3)o B=Bd(3)oend ifoend ifoif s=3 and t=6 then R=Rd(3)o G二Gd(3)。B=Bd(3)oend ifoif s=4 andt=6 then R=Rd (3)。GOGd (3)。B=Bd (3)。end ifif s=5 andend ifoif s=3 andend ifoif s=3

13、andend ifo辻 s=3 andend ifoif s=3 andend ifo辻 s=3 andend ifoif s=3 andend ifoif s=l andend ifo辻 s=2 andend ifoif s=3 andend ifot=6 then R=Rd(3) o G=Gd (3)t=6 then R=Rd (3)o G=Gd (3)t=5 then R=Rd(3) o G=Gd(3)t=4 then R=Rd(3) o G=Gd (3)t=3then R=Rd (3)。G=Gd (3)t=2 then R=Rd(3)o G=Gd(3)othen R=Rd(3)o G=

14、Gd(3)ot=3 then R=Rd(3) o G=Gd(3)t=3 then R=Rd(3) o G=Gd (3)o B=Bd(3) oB=Bd(3) B=Bd(3)oB=Bd(3) oo B=Bd(3)B=Bd(3)oB=Bd(3)oB=Bd(3)oB=Bd(3)ot=3then R=Rd (3) o G=Gd BOBd 。辻 s=4 and t=3 then R=Rd (3)。GOGd (3)。B=Bd (3)。end ifif s=5 and t=3 then R=Rd(3) o G=Gd (3)o B=Bd(3) oend ifoif s=6 and t=3then R=Rd (3

15、)o G=Gd (3)o B=Bd(3) end ifoif s=l and t=lthen R=Rd(3)。 G=Gd(3)。 B=Bd(3)。end ifoif s=2 and t=lthen R=Rd(3) o G=Gd (3)o B=Bd(3) oend ifoif s=3 and t二1end ifothen R=Rd (3)。G=Gd (3) o B=Bd(3)if s=4 and t=lthen R=Rd(3)o G=Gd(3)o B=Bd(3)oend ifoif s=5 andend ifothen R=Rd(3)。G=Gd (3)o B=Bd(3)oif s=6 and t

16、二1then R=Rd(3) G=Gd(3)。 B=Bd(3)。end ifoif s=l and t=l then R=Rd(3) o G=Gd (3)o B=Bd(3)o end ifon | 门then R=Rd (3) o G=Gd (3) oif s=l and t=2/ 、BOBd 。end ifoif s=l and t=3then R=Rd (3) o GOGd (3) 。 B=Bdend ifoif s=l and t=4 then R=Rd(3) o G=Gd (3)。B=Bd(3) oend ifoif s=l and t=5then R=Rd (3)。G=Gd (3)o

17、 B=Bd(3) end ifoif s=l and t二6then R=Rd 。G=Gd 。B=Bd 。end ifoif s=6 and t=lthen R=Rd(3) o G=Gd (3)o B=Bd(3) oend ifoif s=6 and t=2then R=Rd (3)o G=Gd (3) o B=Bd(3) end ifoif s=6 and t=3then R=Rd(3)o G=Gd(3)o B=Bd(3)oend ifoif s=6 and t二4then R=Rd(3) 。 G=Gd (3)o B=Bd(3)oend ifoif s=6 and t=5then R=Rd(3)。 G=Gd(3)。 B=Bd(3)。end ifoif s=6 and t=6then R=Rd(3) o G=Gd (3)o B=Bd(3)oend ifoif m=7 and n=5and (m=15 or n=10) then R=Rd (3)。 G=Gd (3) oB=Bd(3) oend ifoend ifend processo3. 2控制部分的实现 3. 2. 1彩条与彩格通过对行信号、场信号计数,打印岀彩条。通过拨码开关,控制彩条向左走或向右走。通过 REM对信号求余,打印岀彩格。3. 2. 2字体显2K与彩格控制类似。4 硬件平台实验1Bl

展开阅读全文
温馨提示:
1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
2: 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
3.本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们

copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!