摘 要
自新中国成立以来,人们对乒乓球的热爱与日俱增,乒乓球更是成为了中国的国球。在中国,乒乓球运动的爱好者远高于其他运动,可见人们对乒乓球的喜爱和重视。随着现代化科技的不断发展,乒乓球的玩法不仅仅只局限于户外,越来越多的关于乒乓球的游戏被设计者们设计出来,极大地满足了因为各种各样的局限而不能进行在户外打乒乓球的人们。
本文具体介绍了基于VHDL语言的乒乓游戏机研究的现状以及遇到的问题,这个设计是运用VHDL硬件描述语言进行程序编写,使用了QuartusⅡ对程序进行修改以及仿真。本次设计的乒乓游戏机是由四个模块组成,分别是状态机模块、计分器模块、数码管的译码模块以及按键防抖模块组成,他们的功能分别是控制整个游戏机的运行、对游戏进行计分、积分译码,使游戏结果能够在数码管上显示、防止按键时信号出现毛刺,比赛结果受到影响。
本次设计最终要实现的功能和真正的乒乓球比赛一致。由两个人进行比赛,在对方不能击到球或者提前击球时,另一方得一分。谁先得到21分,谁就赢得本局胜利。这个设计的创新点在于增加了乒乓游戏机的复杂度,使得这个游戏更加具有趣味性和不同点。并且它采用自动计分与裁判,减少判别的麻烦。用VHDL硬件描述语言进行设计更是缩短了游戏制作的时间,减少了游戏开发的成本,且功耗少。
关 键 词:VHDL语言;QuartusⅡ;乒乓游戏机
Abstract
Since the founding of new China, people have become increasingly fond of table tennis, which has become the national ball of China. In China, table tennis fans are much higher than other sports, which show that people love and attach importance to table tennis. With the continuous development of modern science and technology, the table tennis game not just confined to outside, more and more about table tennis game is designed, the designers greatly satisfied because of the limitations of various people cannot take place outdoors to play table tennis.
This article detailed introduces the ping-pong game based on VHDL language research present situation and problems of this design is to use VHDL hardware description language for programming, using the Quartus Ⅱ to modify and the simulation program. The table tennis game of this design is composed of four modules, respectively is a state of desktop module, 14-year-old module, decoding module and button image stabilization module composition of digital tube, their function is to control the operation of the entire game respectively, scoring was carried out on the game, integral decoding, make the game results can be displayed on the digital tube, to prevent the occurrence of burr, button signal result affected.
The final function of this design is consistent with the real table tennis competition. There are two players in the game, and when the other team cannot hit the ball or hit the ball early, the other team gets one point. Whoever gets 21 points first will win the game. The innovation of this design is to increase the complexity of the ping-pong game, making the game more interesting and different. And it USES automatic scoring and judging to reduce the difficulty of judging. The design with VHDL hardware description language shortens the time of game production, reduces the cost of game development, and reduces the power consumption.
Key words:VHDL Language; QuartusⅡ; Pingpong game