I目录摘要...............................................................................................................................................................IAbstract......................................................................................................................................................II第一章引言...........................................................................................................................................11.1课题研究的目的与意义...........................................................................................................11.2国内外发展现状........................................................................................................................11.3课题的主要技术路线...............................................................................................................2第二章FPGA技术及硬件描述语言.........................................................................................32.1FPGA技术的发展现状及与CPLD的比较...........................................................................32.2FPGA设计方法...........................................................................................................................52.3利用硬件描述语言(HDL)的硬件电路设计方法..........................................................62.4VHDL语言的特点......................................................................................................................72.5QuartusⅡ概述及其设计流程..............................................................................................7第三章系统总体设计....................................................................................................................103.1计算器的计算部分..................................................................................................................103.2计算器的存储部分..................................................................................................................103.3计算器的显示部分..................................................................................................................113.4计算器的输入部分..................................................................................................................12第四章计算器的VHDL设计.....................................................................................................144.1加法器的设计与仿真.............................................................................................................144.2减法器的设计与仿真.............................................................................................................154.3乘法器的设计与仿真.............................................................................................................164.4除法器的设计与仿真.............................................................................................................18第五章结束语....................................................................................................................................20致谢...............................................................................................................................错误!未定义书签。参考文献.................................................................................................................................................21附录............................................................................................................................................................22I基于FPGA的计算器设计摘要:本文介绍了一个简单计算器的设计,该设计采用了现场可编程逻辑器件FPGA设计,并基于硬件描述语言VHDL在Altera公司的QuartusⅡ软件上实现仿真。系统由计算部分、存储部分、显示部分和输入部分四个部分组成,计算部分为加法器、减法器、乘法器和除法器,存储部分需要3个存储器来实现:内部累加器(acc)、输入寄存器(reg)以及结果暂存器(ans)。显示部分由四个七段译码管组成,分别来显示输入数字,输入部分采用外接键盘,由0—9十个数字按键,加减乘除四个运算符按键,一个等号按键和一个清零按键组成的。通过外部的按键可以完成四位数之内的‘加’、‘减’、‘乘’、‘除’四种功能运算,其结构简单,易于实现。关键词:FPGA;VHDL;计算器IIThedesignofcalculatorbasedonFPGAAbstract:Thisarticledescribesthedesignofasimplecalculator,thedesignusesFieldProgrammableGateArrayFPGAbasedonVHDLhardwaredescriptionlanguagetodesignandAltera'sQuartusⅡinsoftwareforemulation.Thissystemiscomponenttedbythecalculationsection,storagesection,displayandinputsectionofthefourparts,thecomputingpartincludeadder,subtractor,multiplieranddivider,Storagepartneedsthreememorytohelpachieved:internalaccumulator(acc),inputregister(reg)aswellastheresultsofregisters(ans).Displaypartismadeupthreedecoderof7sections,respectivelytoshowthenumberofinput.Inputparthastennumberkeys,from0–9,alsohasadditionandsubtractionandmultiplicationanddivisionarithmeticoperatorkeys,abuttonandofequalsignandtheclearkey.Buttonscanbedonethroughexternalwithinthefour-digit'add','subtract','multiple','divede'thefourkindsoffunctionaloperations,itsstructureissimpleandeasytoimplement.Keywords:FPGA;VHDL;calclute1第一章引言1.1课题研究的目的与意义在人类学会交易的时候,计算也随之产生,而算盘作为计算最实用的工具存在了几千年。算盘亦称珠算,是中国人民创造的一种计算工具,素有“中国计算机”之称。算盘产生于汉代之前,是由古代的“筹算”演变而来的,珠算一词,最早见于汉末三国时代徐岳撰《数术记遗》,书中有“珠算,控带四时,经纬三才”的记述。南宋数学家杨辉的《乘除通变算宝》中有“九归”口诀,元代刘因亦有算盘诗,明人吴敬《九章详注比类算法大全》记载了珠算的有关算法。明清时期,算盘的应用已很广泛,关于算盘制造规格,明万历年间柯尚迁的《数学通轨》载有13档算盘图,上2珠,下5珠,呈长方形,四周为木框,内有轴心,俗称“档”,档中间用一根横梁隔开,运算时定位后拨珠运算。后来出现的各种规格的算盘,都是在此基础上发展起来的。算盘构造简单,便于掌握,使用方便,成为计算理财不可缺少的工具。算盘从明代开始传入朝鲜、日本等东亚