用VHDL设计键盘输入显示方案.doc

用VHDL设计键盘输入显示方案.doc

ID:56924849

大小:17.50 KB

页数:2页

时间:2020-07-24

用VHDL设计键盘输入显示方案.doc_第1页
用VHDL设计键盘输入显示方案.doc_第2页
资源描述:

《用VHDL设计键盘输入显示方案.doc》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、1、显示控制--ModuleName:DispCtrl-Behavioral--Description:GeneratestheimmagefortheVGADemo--------------------------------------------------------------------------------libraryIEEE;useIEEE.STD_LOGIC_1164.ALL;useIEEE.STD_LOGIC_ARITH.ALL;useIEEE.STD_LOGIC_UNSIGNED.ALL;entityDispCtrlisPort(clk25MHz

2、:instd_logic;Hcnt:instd_logic_vector(9downto0);--horizontalcounterVcnt:instd_logic_vector(9downto0);--vericalcounterromdatain:instd_logic_vector(7downto0);--vvvvvvvvvvvvvvvvvvvoutRed:outstd_logic_vector(2downto0);--finalcoloroutGreen:outstd_logic_vector(2downto0);--outputsoutBlue:outstd_lo

3、gic_vector(1downto0);adrVideoMem:outstd_logic_vector(3downto0));--addrintheLogoimmageendDispCtrl;architectureBehavioralofDispCtrlis--constantsforSynchromoduleconstantPAL:integer:=640;--Pixels/ActiveLine(pixels)constantLAF:integer:=480;--Lines/ActiveFrame(lines)--constantsforVGADemoconstant

4、HBorder:integer:=40;--Horizontalborder(pixels)constantVBorder:integer:=40;--Verticalborder(lines)constantHsize:integer:=7;--Horizontallogosize(pixels)标志的水平尺寸64constantVsize:integer:=11;--Verticallogosize(pixels)标志的垂直尺寸64signalHorigin:integer:=60;--Horizontallogoorigin(pixels)标志的水平原点signalV

5、origin:integer:=60;--Verticallogoorigin(pixels)标志的垂直原点signaladrVideoPixel:std_logic_vector(2downto0);signaladrVideoLine:std_logic_vector(3downto0);signalcntDyn:integerrange0to2**28-1;--dynamiceffectcountersignalintHcnt:integerrange0to800-1;--PLD-1-horizontalcounter---水平计数器signalintVcnt:int

6、egerrange0to521-1;--LFD-1-vericalcounter---垂直计数器begin--mappingthestd_logic_vectorportstointernalintegersintHcnt<=conv_integer(Hcnt);intVcnt<=conv_integer(Vcnt);adrVideoPixel<=conv_std_logic_vector(intHcnt-Horigin,4);adrVideoLine<=conv_std_logic_vector(intVcnt-Vorigin,4);adrVideoMem<=adrVid

7、eoLine;--counterforcolorbardynamicsdiynamic:process(clk25MHz)beginifclk25MHz'eventandclk25MHz='1'thencntDyn<=cntDyn+1;endif;endprocess;mixer:process(clk25MHz,intHcnt,intVcnt)beginifintHcnt=HoriginandintHcnt<=Horigin+Hs

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。