基于FPGA的四路抢答器设计.doc
桂林电子科技大学基于FPGA的四路抢答器设计
第1页共21页
摘要
本文介绍了以FPGA为基础的四路抢答器的设计,此次设计是一个有4组抢答输入,并具有抢答计时控制,按键消抖以及积分显示等功能的通用型抢答器。主持人有4个按键控制,可以进行开始抢答,对各抢答小组成绩进行相应加减操作以及所有积分重置。此次设计程序使用verilog语言编写,并且使用modelsim进行相关仿真,最后在FPGA开发板上烧录程序进行实际操作演示实现了相应功能,达到了此次设计的目的。本设计采用FPGA来做增强了时序控制的灵活性,同时由于FPGA的IO端口资源丰富,可以再本设计基础上稍加修改可以重复设计出具有多组输入的抢答器。
关键字:按键消抖;显示;仿真;四路抢答;
桂林电子科技大学基于FPGA的四路抢答器设计
第2页共21页
Abstract
Inthispaper,thedesignoffourchannelresponderbasedonFPGAisproposed.Thedesigncontainsfourchannelinput,andalsoithastimingfunction,button-stop-shakingfunction,scoredisplayfunction.Andtheresultofthedesignisauniversalresponder.Thehosthasfourbuttonstocontrol,inordertostartresponse,addorsubthescoresforeachgroupandclearallgroupscores.Thedesignprogramusesveriloglanguagetowritesoftware.Andmodelsimisusedtosimulatethefunctiononcomputer.AtlasttheactualdesignresultsaredemonstratedontheFPGAdevelopmentboard,andthefunctionsarewellveified.Theresultachievesthepurposeofthedesign.ThedesignusesFPGAtoenhancetheflexibilityoftimingcontrol.AtthesametimebecauseofIOportresouresinFPGAaremuchrich,ifyouwanttodesignmorechannelsresponder,youjustonlyrepeatdesignonthebasicofthedesignwhichisslightlymodified.
Keywords:button-stop-shaking;display;simulate;fourchannelresponder;
桂林电子科技大学基于FPGA的四路抢答器设计
第3页共21页
目录
1引言 4
2FPGA原理及其相关工具软件的介绍 4
2.1FPGA开发过程与应用 4
2.1.1FPGA发展历程及现状 5
2.1.2FPGA工作原理 5
2.1.3FPGA开发流程 5
2.2QuartusII软件 6
2.3Simulink软件 7
2.3.1代码仿真 7
2.3.2门级仿真和时序仿真 8
3实验步骤及仿真调试结果 8
3.1功能描述及设计架构 8
3.2抢答器程序流程图和各模块软件代码分析 9
3.2.1抢答器程序结构及主程序流程图