基于FPGA进行VGA控制器设置实现显示器条纹显示Word文档下载推荐.docx
- 文档编号:17686385
- 上传时间:2022-12-08
- 格式:DOCX
- 页数:21
- 大小:1.13MB
基于FPGA进行VGA控制器设置实现显示器条纹显示Word文档下载推荐.docx
《基于FPGA进行VGA控制器设置实现显示器条纹显示Word文档下载推荐.docx》由会员分享,可在线阅读,更多相关《基于FPGA进行VGA控制器设置实现显示器条纹显示Word文档下载推荐.docx(21页珍藏版)》请在冰豆网上搜索。
1.像素时钟配置为25Mhz。
2.编写代码时,需要用到的常数参考表一。
3.输出到显示器上的条纹为从上到下依次为RGBRGB(640*80)。
4.本实验使用FPGA板:
Sparant3EXC3S500E(建project时,需要选择板的型号)。
实验方法、步骤:
1、基本设计思想如下图所示:
分为这四个模块,产生Hsync(行同步),Vsync(帧同步)以与RGB色彩的输出。
2、具体设计VHDL代码
libraryIEEE;
useIEEE.STD_LOGIC_1164.ALL;
useIEEE.STD_LOGIC_ARITH.ALL;
useIEEE.STD_LOGIC_UNSIGNED.ALL;
entitymainis
port(clk,rst:
instd_logic;
Vsync,Hsync:
outstd_logic;
data:
outstd_logic_vector(7downto0)
);
endmain;
architectureBehavioralofmainis
componentdcnis---------DCM分频模块,输出25M时钟
port(CLKIN_IN:
instd_logic;
RST_IN:
CLKFX_OUT:
outstd_logic;
----输出时钟
CLKIN_IBUFG_OUT:
LOCKED_OUT:
outstd_logic);
endcomponent;
signaldiv_25m,Nrst:
std_logic;
signalVsys_20b:
std_logic_vector(19downto0);
signalHsys_10b:
std_logic_vector(9downto0);
signaldata_Vsend,data_Hsend:
std_logic;
signalScan_16b:
std_logic_vector(15downto0);
signalScan_clc:
signaldata_sel:
std_logic_vector(1downto0);
begin
div:
dcnportmap(clk,Nrst,div_25m,open,open);
---分频模块
Nrst<
=notrst;
process(div_25m,rst)
begin
ifrst='
0'
then
Vsys_20b<
="
00000000000000000000"
;
elsifdiv_25m'
eventanddiv_25m='
1'
=Vsys_20b+1;
ifVsys_20b=416799then
Vsys_20b<
endif;
endif;
endprocess;
process(div_25m,rst,Vsys_20b)
Vsync<
='
data_Vsend<
ifVsys_20b<
8000then
Vsync<
elsifVsys_20b>
=8000andVsys_20b<
9600then
elsifVsys_20b>
=9600andVsys_20b<
32800then--128*255+160=32800
=32800andVsys_20b<
416800then
Hsys_10b<
0000000000"
=Hsys_10b+1;
ifHsys_10b=799then
Hsys_10b<
endif;
process(div_25m,rst,Hsys_10b)
Hsync<
data_Hsend<
ifHsys_10b<
16then
Hsync<
elsifHsys_10b>
=16andHsys_10b<
112then
elsifHsys_10b>
=112andHsys_10b<
160then
=160andHsys_10b<
800then
process(div_25m,rst,data_Vsend)
then--
Scan_16b<
0000000000000000"
Scan_clc<
then---
Scan_clc<
ifdata_Vsend='
then
=Scan_16b+1;
ifScan_16b=63999then
Scan_clc<
process(rst,div_25m,Scan_clc,data_sel,data_Vsend)
data_sel<
00"
ifScan_clc='
=data_sel+1;
endif;
ifdata_sel="
11"
data_sel<
process(rst,div_25m,data_Vsend,data_Hsend)
data<
00000000"
ifdata_Vsend='
anddata_Hsend='
casedata_selis
when"
=>
11000000"
when"
01"
00111000"
10"
00000111"
whenothers=>
endcase;
else
data<
endBehavioral;
UCF管脚定义:
NET"
clk"
LOC="
P183"
NETclkIOSTANDARD=LVCMOS33;
rst"
P142"
#
PULLUP;
IOSTANDARD=LVCMOS33;
data(0)"
P74"
#
data
(1)"
P75"
data
(2)"
P76"
data(3)"
P77"
data(4)"
P78"
data(5)"
P82"
data(6)"
P83"
data(7)"
P89"
Vsync"
P68"
Hsync"
P69"
DCM设置:
综合结果:
综合分析:
仿真波形
实际测试:
实验结论:
本实验设计达到了实验要求,产生了预期效果,通过本实验,进一步了解了如何设计FPGA外部设备的驱动时钟,对计数器的设计有了更深一步的认识。
进一步熟悉了FPGA涉与的过程以与方法
指导教师批阅意见:
成绩评定:
指导教师签字:
年月日
备注:
注:
1、报告内的项目或内容设置,可根据实际情况加以调整和补充。
2、教师批改学生实验报告时间应在学生提交实验报告时间后10日内。
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 基于 FPGA 进行 VGA 控制器 设置 实现 显示器 条纹 显示