1、HDL 项目设计 1 课程设计报告课程设计报告 题题 目目 HDL项目设计项目设计 HDL 项目设计 2 摘要摘要: : 键盘是最常用人机接口设备之一, 在嵌入式系统中有着相当广泛的应用。 一般自行设计 的简易矩阵键盘仅仅是按行、列排列起来的矩阵开关。当需要较多的按键时,则会占用较多 的 I/O 端口,在软件上则要进行上电复位按键扫描及通信处理,而且还要加上按键的去抖 动处理,增大了软硬件开销。而 PS/2 键盘,内嵌自动去除按键抖动设计,自动地识别键的 按下与释放,软硬件开发简便,价格便宜,稳定可靠,将 PS/2 键盘作为嵌入式系统的输入 设备已经成为可行的方案。 本设计是以现场可编程逻辑器
2、件(FPGA)为核心的 PS/2 接口键盘的输入识别电路。利 用 Quartus软件编写 verilog HDL 硬件描述语言程序以实现键盘部分简单键值的识别与输 出。本设计主要以程序为核心,硬件电路的搭建使用 FPGA 实验箱,将程序顶层文件里定义 的输入输出端口与实验箱管脚进行相应的配置, 除实验箱上的 reset 键以外, 外设是一个与 实验箱通过 PS/2 接口相连的键盘。当系统上电后,实验箱上的数码管可以依次显示从键盘 上输入的键值,并具有数码管清零功能。 关键词关键词: P Ps/2s/2 接口键盘、输入识别、接口键盘、输入识别、FPGA FPGA 、QuartusQuartus
3、、Verilog HDLVerilog HDL HDL 项目设计 3 Abstract The keyboard, as one of the most commonly used man-machine interface equipment, has a wide application in embedded systems. General to design simple matrix keyboard is only per row, column arrangement up matrix switch. When need more button, will occupy mo
4、re I/O port, in software, must carry on the power on the reset button scanning and communication processing, but also add buttons to jitter processing, increases the software and hardware cost. And PS / 2 keyboard, inline automatic remove key jitter design, automatically identify key press and relea
5、se, software and hardware development is simple, cheap, stable and reliable, the PS / 2 keyboard as embedded system input device has become feasible scheme. This design based on field programmable logic devices (FPGA) is the core of the PS / 2 interface keyboard input identification circuit. Use ver
6、ilog HDL Quartus writing software hardware description language program to realize the keyboard part simple key value of the recognition and output. This design mainly program as the core, the construction of the hardware circuit using FPGA experimental box, will be the top procedure defined in the file input/output port and experimental XiangGuan foot carries on the corresponding configuration, in addition to the experiment box on the reset button beyond, peripheral is a and experim