ImageVerifierCode 换一换
格式:DOCX , 页数:13 ,大小:1.05MB ,
资源ID:7406382      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/7406382.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(基于VHDL语言的VGA显示与控制.docx)为本站会员(b****5)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

基于VHDL语言的VGA显示与控制.docx

1、基于VHDL语言的VGA显示与控制 EDA大作业实验报告基于VHDL语言的VGA显示与控制1111000079 田宇1111000081 王坤1 VGA显示原理1.1 VGA逐行扫描显示逐行扫描是扫描从屏幕左上角一点开始,从左像右逐点扫描,每扫描完一行,电子束回到屏幕的左边下一行的起始位置,在这期间,CRT对电子束进行消隐,每行结束时,用行同步信号进行同步;当扫描完所有的行,形成一帧,用场同步信号进行场同步,并使扫描回到屏幕左上方,同时进行场消隐,开始下一帧。1.2 VGA时序分析(图-1)2 时序部分的代码实现2.1 时序部分主要代码 if ckevent and ck=1 then H15

2、 and H110 then Hs=110 then Hs=160 and H800 then Hen=1; elsif H=800 then Hen=0; H=0; end if; end if; end if; if Hsevent and Hs=1 then V11 and V14 then Vs=14 then Vs=45 and V525 then Ven=1; elsif V=525 then Ven=0; V=0; end if; end if; end if; 此部分代码为时序部分主要代码。2.2 时序部分的实现2.2.1 行时序 H: 行HS: 行消隐信号Hen: 允许显示由

3、时序图(图-1)可以看出,行时序中需要有行消隐、行同步、显示前后沿等。其中有效显示信号为640个周期。2.2.2 场时序与行时序相类似。 3 控制部分的代码实现3.1 控制部分主要代码process(clk_d,sw) begin if clk_devent and clk_d=1 then if sw=11 then sw_t=sw_t+1; end if; if sw=01 then sw_t=sw_t-1; end if; end if; end process; process(sw_t) begin if sw_t=0000 then R=Rd(s);G=Gd(s);B=Bd(s);

4、 elsif sw_t=0001 then R=Rd(s+1);G=Gd(s+1);B=Bd(s+1); elsif sw_t=0010 then R=Rd(s+2);G=Gd(s+2);B=Bd(s+2); elsif sw_t=0011 then R=Rd(s+3);G=Gd(s+3);B=Bd(s+3); if s=5 and t=4 and (n=0 or m=0 or n=79 or m=59 or n=1 or m=1 or n=78 or m=58) then R=Rd(3);G=Gd(3);B=Bd(3); end if; elsif sw_t=0100 then R=Rd(s

5、+4);G=Gd(s+4);B=Bd(s+4); if s=3 and t=4 and (n=0 or m=0 or n=79 or m=59 or n=1 or m=1 or n=78 or m=58) then R=Rd(0);G=Gd(1);B=Bd(3); end if; elsif sw_t=0101 then R=Rd(s+5);G=Gd(s+5);B=Bd(s+5); if s=2 and t=4 and (n=0 or m=0 or n=79 or m=59 or n=1 or m=1 or n=78 or m=58) then R=Rd(3);G=Gd(2);B=Bd(0);

6、 end if; elsif sw_t=0110 then R=Rd(s+6);G=Gd(s+6);B=Bd(s+6); if s=1 and t=4 and (n=0 or m=0 or n=79 or m=59 or n=1 or m=1 or n=78 or m=58) then R=Rd(0);G=Gd(0);B=Bd(3); end if; elsif sw_t=0111 then R=Rd(s+7);G=Gd(s+7);B=Bd(s+7); if s=3 and t=5 and (n=0 or m=0 or n=79 or m=59 or n=1 or m=1 or n=78 or

7、 m=58) then R=Rd(0);G=Gd(0);B=Bd(0); end if; elsif sw_t=1000 then R=Rd(s+t)rem 8);G=Gd(s+t)rem 8);B=Bd(s+t)rem 8); elsif sw_t=1001 then R=Rd(s+t)rem 7);G=Gd(s+t)rem 7);B=Bd(s+t)rem 7); elsif sw_t=1010 then R=Rd(s+t)rem 6);G=Gd(s+t)rem 6);B=Bd(s+t)rem 6); elsif sw_t=1011 then R=Rd(s+t)rem 5);G=Gd(s+t

8、)rem 5);B=Bd(s+t)rem 5); elsif sw_t=1100 then R=Rd(s+t)rem 4);G=Gd(s+t)rem 4);B=Bd(s+t)rem 4); elsif sw_t=1101 then R=Rd(s+t)rem 3);G=Gd(s+t)rem 3);B=Bd(s+t)rem 3); elsif sw_t=1110 then R=Rd(s+t)rem 2);G=Gd(s+t)rem 2);B=Bd(s+t)rem 2); elsif sw_t=1111 then R=Rd(s+t)rem 1);G=Gd(s+t)rem 1);B=Bd(s+t)rem

9、 1); - if s=5 and t=4 and (n=0 or m=0 or n=79 or m=59 or n=1 or m=1 or n=78 or m=58) then R=Rd(3);G=Gd(3);B=Bd(3); - end if; - if s=4 and t=4 and (n=0 or m=0 or n=79 or m=59 or n=1 or m=1 or n=78 or m=58) then R=Rd(3);G=Gd(3);B=Bd(3); - end if; - if s=3 and t=4 and (n=0 or m=0 or n=79 or m=59 or n=1

10、 or m=1 or n=78 or m=58) then R=Rd(3);G=Gd(3);B=Bd(3); - end if; - if s=2 and t=4 and (n=0 or m=0 or n=79 or m=59 or n=1 or m=1 or n=78 or m=58) then R=Rd(3);G=Gd(3);B=Bd(3); - end if; - if s=1 and t=4 and (n=0 or m=0 or n=79 or m=59 or n=1 or m=1 or n=78 or m=58) then R=Rd(3);G=Gd(3);B=Bd(3); - end

11、 if; - if s=3 and t=5 and (n=0 or m=0 or n=79 or m=59 or n=1 or m=1 or n=78 or m=58) then R=Rd(3);G=Gd(3);B=Bd(3); - end if; if s=1 and t=6 then R=Rd(3);G=Gd(3);B=Bd(3); end if; if s=2 and t=6 then R=Rd(3);G=Gd(3);B=Bd(3); end if; if s=3 and t=6 then R=Rd(3);G=Gd(3);B=Bd(3); end if; if s=4 and t=6 t

12、hen R=Rd(3);G=Gd(3);B=Bd(3); end if; if s=5 and t=6 then R=Rd(3);G=Gd(3);B=Bd(3); end if; if s=3 and t=6 then R=Rd(3);G=Gd(3);B=Bd(3); end if; if s=3 and t=5 then R=Rd(3);G=Gd(3);B=Bd(3); end if; if s=3 and t=4 then R=Rd(3);G=Gd(3);B=Bd(3); end if; if s=3 and t=3 then R=Rd(3);G=Gd(3);B=Bd(3); end if

13、; if s=3 and t=2 then R=Rd(3);G=Gd(3);B=Bd(3); end if; if s=3 and t=1 then R=Rd(3);G=Gd(3);B=Bd(3); end if; if s=1 and t=3 then R=Rd(3);G=Gd(3);B=Bd(3); end if; if s=2 and t=3 then R=Rd(3);G=Gd(3);B=Bd(3); end if; if s=3 and t=3 then R=Rd(3);G=Gd(3);B=Bd(3); end if; if s=4 and t=3 then R=Rd(3);G=Gd(

14、3);B=Bd(3); end if; if s=5 and t=3 then R=Rd(3);G=Gd(3);B=Bd(3); end if; if s=6 and t=3 then R=Rd(3);G=Gd(3);B=Bd(3); end if; if s=1 and t=1 then R=Rd(3);G=Gd(3);B=Bd(3); end if; if s=2 and t=1 then R=Rd(3);G=Gd(3);B=Bd(3); end if; if s=3 and t=1 then R=Rd(3);G=Gd(3);B=Bd(3); end if; if s=4 and t=1

15、then R=Rd(3);G=Gd(3);B=Bd(3); end if; if s=5 and t=1 then R=Rd(3);G=Gd(3);B=Bd(3); end if; if s=6 and t=1 then R=Rd(3);G=Gd(3);B=Bd(3); end if; if s=1 and t=1 then R=Rd(3);G=Gd(3);B=Bd(3); end if; if s=1 and t=2 then R=Rd(3);G=Gd(3);B=Bd(3); end if; if s=1 and t=3 then R=Rd(3);G=Gd(3);B=Bd(3); end i

16、f; if s=1 and t=4 then R=Rd(3);G=Gd(3);B=Bd(3); end if; if s=1 and t=5 then R=Rd(3);G=Gd(3);B=Bd(3); end if; if s=1 and t=6 then R=Rd(3);G=Gd(3);B=Bd(3); end if; if s=6 and t=1 then R=Rd(3);G=Gd(3);B=Bd(3); end if; if s=6 and t=2 then R=Rd(3);G=Gd(3);B=Bd(3); end if; if s=6 and t=3 then R=Rd(3);G=Gd

17、(3);B=Bd(3); end if; if s=6 and t=4 then R=Rd(3);G=Gd(3);B=Bd(3); end if; if s=6 and t=5 then R=Rd(3);G=Gd(3);B=Bd(3); end if; if s=6 and t=6 then R=Rd(3);G=Gd(3);B=Bd(3); end if; if m=7 and n=5 and(m=15 or n=10) then R=Rd(3);G=Gd(3);B=Bd(3); end if; end if; end process; 3.2 控制部分的实现3.2.1 彩条与彩格通过对行信号、场信号计数,打印出彩条。通过拨码开关,控制彩条向左走或向右走。通过REM对信号求余,打印出彩格。3.2.2 字体显示与彩格控制类似。4. 硬件平台实验

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1