为了正常的体验网站,请在浏览器设置里面开启Javascript功能!

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

2011-03-07 2页 doc 33KB 37阅读

用户头像

is_429581

暂无简介

举报
用VHDL设计键盘输入显示方案1、显示控制 1、显示控制 -- Module Name: DispCtrl - Behavioral -- Description: Generates the immage for the VGA Demo -------------------------------------------------------------------------------- library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IE...
用VHDL设计键盘输入显示方案
1、显示控制 1、显示控制 -- Module Name: DispCtrl - Behavioral -- Description: Generates the immage for the VGA Demo -------------------------------------------------------------------------------- library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity DispCtrl is Port (clk25MHz : in std_logic; Hcnt: in std_logic_vector(9 downto 0); -- horizontal counter Vcnt: in std_logic_vector(9 downto 0); -- verical counter romdatain : in std_logic_vector(7 downto 0); -- vvvvvvvvvvvvvvvvvvv outRed : out std_logic_vector(2 downto 0); -- final color outGreen: out std_logic_vector(2 downto 0); -- outputs outBlue : out std_logic_vector(1 downto 0); adrVideoMem : out std_logic_vector(3 downto 0)); -- addr in the Logo immage end DispCtrl; architecture Behavioral of DispCtrl is -- constants for Synchro module constant PAL:integer:=640; --Pixels/Active Line (pixels) constant LAF:integer:=480; --Lines/Active Frame (lines) -- constants for VGA Demo constant HBorder:integer:=40; -- Horizontal border (pixels) constant VBorder:integer:=40; -- Vertical border (lines) constant Hsize:integer:=7; -- Horizontal logo size (pixels) 标志的水平尺寸 64 constant Vsize:integer:=11; -- Vertical logo size (pixels) 标志的垂直尺寸 64 signal Horigin:integer:=60; -- Horizontal logo origin (pixels) 标志的水平原点 signal Vorigin:integer:=60; -- Vertical logo origin (pixels) 标志的垂直原点 signal adrVideoPixel: std_logic_vector(2 downto 0); signal adrVideoLine: std_logic_vector(3 downto 0); signal cntDyn: integer range 0 to 2**28-1; -- dynamic effect counter signal intHcnt: integer range 0 to 800-1; --PLD-1 - horizontal counter--- 水平计数器 signal intVcnt: integer range 0 to 521-1; -- LFD-1 - verical counter --- 垂直计数器 begin -- mapping the std_logic_vector ports to internal integers intHcnt <= conv_integer(Hcnt); intVcnt <= conv_integer(Vcnt); adrVideoPixel <= conv_std_logic_vector(intHcnt - Horigin,4); adrVideoLine <= conv_std_logic_vector(intVcnt - Vorigin,4); adrVideoMem <= adrVideoLine; -- counter for color bar dynamics diynamic:process (clk25MHz) begin if clk25MHz'event and clk25MHz = '1' then cntDyn <= cntDyn+1; end if; end process; mixer: process(clk25MHz,intHcnt, intVcnt) begin if intHcnt < PAL and intVcnt < LAF then -- 在激活的显示区域 if intHcnt >= Horigin and intHcnt <= Horigin + Hsize and intVcnt >= Vorigin and intVcnt <= Vorigin + Vsize then -- image --rom中的数据输出作为色差的信息; if romdatain(adrVideoPixel)='0' then outRed<="100"; outGreen<="100"; outBlue(1 downto 0) <="01"; else -- the moving lines area -- red outRed(2 downto 0) <="000"; -- green outGreen(2 downto 0) <="000"; -- blue outBlue(1 downto 0) <="00"; end if; else outRed <= (others => '0'); outGreen <= (others => '0'); outBlue <= (others => '0'); end if; end if; end process; -- place the logo at the mouse pos, if left button pressed end Behavioral; 2 、PS接口定义 见附件中Keyctrl.vhd和Ps2keyboard.vhd 3、状态灯指示字母输入 见附件中SnakeledDemo.vhd
/
本文档为【用VHDL设计键盘输入显示方案】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。 本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。 网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。

历史搜索

    清空历史搜索