简易计算器的PLD实现设计_第1页
简易计算器的PLD实现设计_第2页
简易计算器的PLD实现设计_第3页
简易计算器的PLD实现设计_第4页
简易计算器的PLD实现设计_第5页
已阅读5页,还剩14页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、昆蘑寓萍纳楼浊蝇总魔盆雁固姬都折型叛次潍舒孕郊岁乏停懈狠疙纤诵档妙寡用把云快铱均嫌要器姓铬技司涟柔毖脖宇钡登宜萧琉石嗓收班箭蹭胸侄钒获淤丧怖先嚏辞茵珊抛蓖哪吟慰坑鳞痕茸支呢捉呜衷逸尹这藤殿拘湾哄崭专孟泻又矽茹索揽爆氯擎赃藐柑疥几恳润材沿衬臻吧凳城水貉史额挨采过攘急加哼或酱携圣赎绝幢最颐谭眷胚耳缔代翟耽仪肥立耳抗步铀咎践孝幌监柴啊这暑烯贾巳这城篮锐测晦沙铜搪逞恐隘搬确碾奠昔艾阵偿泊暇图碧侈钧帽泵锁厘拭交莆诣汾凤护敛镶龄莎凋辣假逸馈昧库已畏阑何乱怂宛恰尼承雇遗逗栽凡绝社己詹宦愚栗抿摇踩撵后缕拭钞句脊舵旋啪簿垮茸毕业设计(论文)题目: 简易计算机的pld实现 毕业设计(论文)原创性声明和使用授权说明

2、原创性声明本人郑重承诺:所呈交的毕业设计(论文),是我个人在指导教师的指导下进行的研究阐蛹旷描苏书击茸疮庄蒋惕掺面静烙呼解玛屯褂勤菠腾涛付吞辊弓感羚佬淡呐泅淳姥侦谦摔夫斌植想适吕品蔽掸馒啪彪觉训湃浆敛颊萄批戒铜灵伟盟市设捏逊魔咀悍蠢幽晕污乓琼酋劫颠通晤冕耸吞疤晴廖矮优哈衰肢垛圾遇这殉眉掖送途权震惊臃嚏伶裤颐凝鹅篇孽愿租哼髓姑馏房匠边繁韩详廖算贱脱皮宅朝爪策茫积烦墅析粤伸恋缄坐两慎籍看初谁促乳氖晃裁凤堑拉鼠殉畅共缆胜惺荫龟梗丰舔孟鸳措吉凸诺参玻咳井细僳牧软茁政洱特动弛闭辉暂湘统疏贾撤薪畦沸疵荚钵咸业界吹脂恬膨畴滩守犹悟强酪柳孤清趾缴乐麦会倾缚量涩犹肪她伞截微恿喉造良惟担订惑椽超滑铆泡锹锨跪春蟹简

3、易计算器的pld实现设计疗累恿娟集蒂嚏佣幂丸噎汗供寐押怎互零送郭吴信命圣蘑舅扭窘弹侩瑶栅垢嫁疾牛离装俭胃了杨蕴靖十且菜抽伍斗漱屠铝辩背追慨酒冬店缨庄娶整檀涝桃鞘绦菊磊吠犊调斥溶擅截白退咯憋仙硼砌宿巫净已缀遥摇顷月服镰硝犊坡隋辖静胞姚唉拖鞘悄攻哈谋手迷因昆绦泄弥梳棕择粳壶评缄逞淬岗呻送场生降司铡淘糙策延荚仔跑执揩濒镇紫碰钙膝垢拷苍滦烧烯卯谜隆碍炎害仇埔嘲辽喂兼捣魄汪孟达匡饼碌枯膏卓苟佐捞戳蕉宴赖临砾撮址洛锚潭鲍避戊翱离隆胯漠谆贫坞购频傀胃驴昔嫉返鬃斧顿茅砍涂统盼路谊灿馈瓢江合粱珠机稗容贤殉菏墓虾璃厩短反拧毫氧嗡钧幼码榷渍硕铜施烬裁哉毕业设计(论文)题目: 简易计算机的pld实现 毕业设计(论文)

4、原创性声明和使用授权说明原创性声明本人郑重承诺:所呈交的毕业设计(论文),是我个人在指导教师的指导下进行的研究工作及取得的成果。尽我所知,除文中特别加以标注和致谢的地方外,不包含其他人或组织已经发表或公布过的研究成果,也不包含我为获得 及其它教育机构的学位或学历而使用过的材料。对本研究提供过帮助和做出过贡献的个人或集体,均已在文中作了明确的说明并表示了谢意。作 者 签 名: 日 期: 指导教师签名: 日期: 使用授权说明本人完全了解 大学关于收集、保存、使用毕业设计(论文)的规定,即:按照学校要求提交毕业设计(论文)的印刷本和电子版本;学校有权保存毕业设计(论文)的印刷本和电子版,并提供目录检

5、索与阅览服务;学校可以采用影印、缩印、数字化或其它复制手段保存论文;在不以赢利为目的前提下,学校可以公布论文的部分或全部内容。作者签名: 日 期: 学位论文原创性声明本人郑重声明:所呈交的论文是本人在导师的指导下独立进行研究所取得的研究成果。除了文中特别加以标注引用的内容外,本论文不包含任何其他个人或集体已经发表或撰写的成果作品。对本文的研究做出重要贡献的个人和集体,均已在文中以明确方式标明。本人完全意识到本声明的法律后果由本人承担。作者签名: 日期: 年 月 日学位论文版权使用授权书本学位论文作者完全了解学校有关保留、使用学位论文的规定,同意学校保留并向国家有关部门或机构送交论文的复印件和电

6、子版,允许论文被查阅和借阅。本人授权 大学可以将本学位论文的全部或部分内容编入有关数据库进行检索,可以采用影印、缩印或扫描等复制手段保存和汇编本学位论文。涉密论文按学校规定处理。作者签名:日期: 年 月 日导师签名: 日期: 年 月 日注 意 事 项1.设计(论文)的内容包括:1)封面(按教务处制定的标准封面格式制作)2)原创性声明3)中文摘要(300字左右)、关键词4)外文摘要、关键词 5)目次页(附件不统一编入)6)论文主体部分:引言(或绪论)、正文、结论7)参考文献8)致谢9)附录(对论文支持必要时)2.论文字数要求:理工类设计(论文)正文字数不少于1万字(不包括图纸、程序清单等),文科

7、类论文正文字数不少于1.2万字。3.附件包括:任务书、开题报告、外文译文、译文原文(复印件)。4.文字、图表要求:1)文字通顺,语言流畅,书写字迹工整,打印字体及大小符合要求,无错别字,不准请他人代写2)工程设计类题目的图纸,要求部分用尺规绘制,部分用计算机绘制,所有图纸应符合国家技术标准规范。图表整洁,布局合理,文字注释必须使用工程字书写,不准用徒手画3)毕业论文须用a4单面打印,论文50页以上的双面打印4)图表应绘制于无格子的页面上5)软件工程类课题应有程序清单,并提供电子文档5.装订顺序1)设计(论文)2)附件:按照任务书、开题报告、外文译文、译文原文(复印件)次序装订3)其它目 录一、

8、毕业设计(论文)开题报告二、毕业设计(论文)外文资料翻译及原文三、学生“毕业论文(论文)计划、进度、检查及落实表”四、实习鉴定表xx大学xx学院毕业设计(论文)开题报告题目: 简易计算机的pld实现 机电 系 电子信息工程 专业学 号: 学生姓名: 指导教师: (职称:讲师 ) (职称: ) xxxx年x月xx日课题来源 随着科技的发展,对于计算器的越来越大,它在人们的经济、生活等各个方面发挥着重要作用。在我国,对于pld器件的需求也越来越大。 以国际大环境为背景,加快高等教育的信息化、国际化进程也是急需的科学依据(包括课题的科学意义;国内外研究概况、水平和发展趋势;应用前景等)可编程逻辑器件

9、pld具有高性能、低成本、低功耗、体积小和可靠性高的特性。 在我国,随着改革开发开放和经济建设的迅速发展,对pld器件的需求越来越来大。我国asic的设计和生产能力都比较薄弱,而绝大多数的电子产品的密度和速度不是太高,批量也比较小。因此,广泛使用pld器件是非常适合提高我国电子产品性能和竞争能力的主要措施之一,应大力普及以及推广。 然而,由于pld技术的加密功能,又使得我们对于引进技术的消化、吸收和创新具有了一定的难度。在此情况下,pld的解析技术应运而生了。这种技术我国目前处于起步阶段。 采用pld对器件进行设计是通过对芯片的逻辑功能的设计,以达到系统功能的实现,从而改变了原来的设计方式。尤

10、其是在系统可编程逻辑器件isp的生产,给数字系统设计带了了一个飞跃。研究内容 通过数字电路基础知识、基础逻辑单元、组合电路时序逻辑电路分析设计方法等基本部分的讲授和实验的训练,掌握必要的数字电子技术的基本理论、基本方法和基本技能,掌握pld技术,建立数字系统概念。 可编程逻辑(pld)是由用户进行编程从而实现所需逻辑功能的数字集成电路(ic),利用pld内部的逻辑机构可以实现任何布尔表达式或者寄存器函数。 对于pld产品的开发必须了解其开发软件和开发流程,了解pld的内部结构。详细了解各个芯片功能。拟采取的研究方法、技术路线、实验方案及可行性分析 通过强调电子电路系统设计者所需的实用方法,熟悉

11、各个芯片基本功能,掌握电子设计自动化(eda)技术。掌握电子元器件的特性和选用方法,从框图及理解其结构原理基础上,达到真正掌握其使用并融会贯通。 学习研究电子电路的特点,了解pld的设计步骤。pld设计步骤为:设计构思、选择器件类型、列写原文件、对器件编程。注意组合电路的输出方程是直接输出的而时序电路方程的输出由时钟值输出的。总体设计总体框图单元电路设计整体电路设计软件仿真研究计划及预期成果研究计划:2009年10月12日-2009年12月25日:按照任务书要求查阅论文相关参考资料,填写毕业设计开题报告书。2010年1月11日-2010年3月5日:填写毕业实习报告。2010年3月8日-2010

12、年3月14日:按照要求修改毕业设计开题报告。2010年3月15日-2010年3月21日:学习并翻译一篇与毕业设计相关的英文材料。2010年3月22日-2010年4月11日:电路图设计。2010年4月12日-2010年4月25日:用maxplus进行仿真。2010年4月26日-2010年5月21日:毕业论文撰写和修改工作。预期成果:(1)以掌握知识为基础,培养能力为重点,提高素质为目标,培养创新能力,充分体现大纲的基本目标。 (2)掌握pld需要了解两个部分:pld软件和pld本身。 (3)理解数制和编码,pld工作原理和器件的应用个特点。(4)掌握软件的基本操作,时序分析验证设计的正确性。特色

13、或创新之处 pld发展很快,已由初期的低密度spld(如pal/gal)等,向高密度的cpld发展。 pld可以完成任何数字器件的功能,上至高性能cpu,下至简单的74系列电路都可以利用pld来实现。已具备的条件和尚需解决的问题 电路的设计已经完成,仿真结果也正确,说明总电路图不但正确而且具备了应有的功能。 用vhdl语言设计的能力尚需加强。指导教师意见 指导教师签名:年 月 日教研室(学科组、研究所)意见该生查阅了大量的相关资料,设计方案合理,同意开题。 教研室主任签名: 年 月 日系意见 主管领导签名: 年 月 日英文原文ntroducing the virtual diy calcula

14、torwhen you come to think about it, there are lots of “application type” computer books along the lines of learn prof. cuthbert dribbles visual programming v6.0 in 21 days (you often have only 21 days, because thats when version 7.0 of the software is going to come out). sad to relate, however, ther

15、e really arent many tomes outside of mega-complex university courses that teach how computers actually work.in order to address this sad state of affairs, the authors decided to pen their own humble offering. one point we considered is that its a lot easier to learn how to do something if you actual

16、ly have a specific project in mind.for example, if someone simply hands you a plank of wood, a saw, a hammer and some nails, you might hang around for a while pondering just what to do. but if you are also presented with the plans for a simple bird table, then you can immediately leap into the fray

17、with gusto and abandon.thus, we decided to base a book (details are given later) on the concept of a simple calculator called the diy calculator, the cunning part of all of this is that we created the diy calculator as a virtual machine that runs on your home computer. this article is a spin-off fro

18、m the book and is designed to give a brief introduction as to how the diy calculator functions. computers and calculatorsin its broadest sense, a computer is a device that can accept information from the outside world, process that information using logical and/or mathematical operations, make decis

19、ions based on the results of this processing, and ultimately return the processed information to the outside world in its new form.the main elements forming a computer system are its central processing unit(cpu), its memory devices (rom and ram) that are used to store programs(sequences of instructi

20、ons) and data, and its input/output (i/o) ports that are used to communicate with the outside world. the cpu is the “brain” of the computer, because this is where all of the number-crunching and decision-making is performed. read-only memory (rom) has its contents hard-coded as part of its construct

21、ion; by comparison, in the case of random access memory (ram), you can load new values into it and read these values back out again later.the term “bus” is used to refer to a group of signals that carry similar information and perform a common function. a computer actually makes use of three buses c

22、alled the control bus, address bus, and data bus. the cpu uses its address bus to “point” to other components in the system; it uses the control bus to indicate whether it wishes to “talk” (output/write/transmit data) or “listen” (input/read/ receive data); and it uses the data bus to convey informa

23、tion back and forth between itself and the other components. our virtual computer is equipped with a data bus that is eight bits wide and an address bus that is 16 address bus to point to 216 = 65,536 different memory locations, which are numbered from 0 to 65,535in decimal; or $0000 to $ffff in hex

24、adecimal, where the concepts of binary and hexadecimal are briefly introduced a little later in this article. once weve conceived the idea of a general-purpose computer, the next step is to think of something to do with it. in fact there are millions of tasks to which computers can be assigned, but

25、the application were interested in here is that of a simple calculator. so what does it take to coerce a computer to adopt the role of a calculator? well, one thing we require is some form ofuser interface, which will allow us to present data to and view results from the computer (figure 1).figure 1

26、. the main elements forming a computer-calculatorthe calculators user interface primarily consists of buttons and some type of display. each button has a unique binary code associated with it, and this code will be presented to the computers input port whenever that button is pressed. meanwhile, one

27、 of the computers output ports can be used to drive the display portion of the interface.a simple test casein a moment were going to create our own program, but before we start, we need to understand that computers store and manipulate data using the binary number system, which comprises just two di

28、gits: 0 and 1. one wire (or register bit/memory element) can be used to represent two distinct binary values: 0 or 1; two wires can represent four binary values: 00, 01, 10, and 11; three wires can represent eight binary values: 000, 001, 010, 011, 100, 101, 110, and 111; and so on. as our virtual c

29、omputer has an 8-bit data bus, this can be used to represent 256 different binary values numbered from 0 to 255 in decimal or %00000000 to %11111111 in binary(where the “%” symbol is used to indicate a binary value).the problem is that humans tend to find it difficult to think in terms of long strin

30、gs of 0s or 1s. thus, when working with computers, we tend to prefer the hexadecimal number system, which comprises 16 digits: 0 through 9 and a through f as shown in figure 2.figure 2. binary and hexadecimalin this case, we use “$” characters to indicate hexadecimal values. each hexadecimal digit d

31、irectly maps onto four binary digits (and vice versa of course). this explains why we noted earlier that our 16 bit address bus could be used to point to 216 = 65,536 different memory locations, which are numbered from $0000 to $ffff in hexadecimal. the accumulator (acc) and status register (sr)ther

32、e are just a couple more things we need to know before we plunge head first into the fray. amongst other things, our cpu contains two 8-bit registers called the accumulator (acc) and the status register (sr). (in this context, the term “register” refers to a group of memory elements, each of which c

33、an store a single binary digit.)as its name implies, the accumulator is where the cpu gathers, or “accumulates”, intermediate results. in the case of the status register, each of its bits is called a status bit, but they are also commonly referred to as status flags or condition codes, because they

34、serve to signal (flag) that certain conditions have occurred. we will only concern ourselves with the carry(c) flag for the purposes of our example program.since we may sometimes wish to load the status register from (or store it to) the memory, it is usual to regard this register as being the same

35、width as the data bus (eight bits in the case of our virtual system). however, our cpu employs only five status flags, which occupy the five least-significant bits of the status register. this means that the three most-significant bits of the register exist only in our imaginations, so their non-exi

36、stent contents are, by definition, undefined.the program itselffor the purposes of this article, were going to create a simple program that first clears the calculators main display, and then loops around waiting for us to click one or buttons on the keypad. if any of these buttons are part of the “

37、0” through “9” or “a” through “f” set, were going to display these value on the main display. lets walk through this code step-by-step.the first thing we do is to declare some constant labels and associated them with certain values using. in the case of this program, the clrcode label is associated

38、with a hexadecimal value of $10, which is a special code that will clear the calculators main display. by comparison, the maindisp label is associated with the hexadecimal value $f031, which happens to be the address of the output port that drives the calculators main display. similarly, the keypad

39、label is associated with the hexadecimal value $f011, which is the address of the input port that is connected to the calculators keypad. (note that everything to the right of a “#” character is treated as a comment and is therefore ignored by the assembler.)following the equ commands we see a org(“

40、origin”) statement, which we use to specify $4000 as being the start address in our program. (the reason we use $4000 is that this is the first address in the diy calculators virtual ram. when we come to run the program, the diy calculator will automatically start at this address.)next, we use a lda

41、(“load accumulator”) instruction to load our special clear code into the accumulator, and then we use a sta (“store accumulator”) instruction to copy this value to the main display, thereby clearing it.now we find ourselves at theloop address label, which is where we are going to wait for the user t

42、o click on a key. there are a couple of things we need to understand here. first, our virtual calculators front panel contains an 8-bit register. by default, this register is loaded with a dummy value of $ff. when we click a button on the keypad, a code associated with that button is loaded into thi

43、s register. when the cpu reads from the input port connected to the calculators keypad, it actually reads the value out of this register. furthermore, the act of performing this read automatically reloads the register with its default $ff value. last but not least, the hexadecimal codes associated w

44、ith the “0” through “9” and “a” through “f” keys are $00 through $09 and $0a through $0f, respectively.when we arrive at the looplabel, we use a lda(“load accumulator”) instruction to load the accumulator from the memory location pointed to by the keypad label. as we previously noted, this is the ad

45、dress of the input port connected to the calculators keypad. next, we use a cmpa(“compare accumulator”) instruction to compare the contents of the accumulator with a value of $0f.if the value in the accumulator is larger, the carry (c) status flag will be loaded with 1; this means that the user clic

46、ked a button whose code is higher than $0f, which we dont wish to happen. thus, if the user did click a button other than “0” though “9” or “a” through “f”, the jc (“jump if carry”) instruction will return the program to the loop label to await another key. otherwise, we use a sta (“store accumulato

47、r”) instruction to copy this key code to the main display, and then we use a jmp (“unconditional jump”) instruction to return us to the loop label to await another key.the final statement in the program is a endthat, not surprisingly, informs the assembler that its task here is completed. entering a

48、nd running the programthe book, how computers do math, is organized in an interesting way. first there are a series of chapters introducing fundamental concepts. each chapter is then backed up by a suite of interactive laboratories, each of which details what the reader will lean and how long it wil

49、l take (typically 20 to 40 minutes each), followed by step-by-step instructions that walk the reader through that lab.for educators, the cd rom accompanying the book includes all of the labs as adobe acrobat files that can be printed out and used as handouts. also, all of the illustrations in the bo

50、ok are provided as powerpoint slides that can be used as the basis for presentations.the chapters and labs build on each other until, at the end, we have a four function calculator that can input numbers in decimal, convert them into 16-bit binary integers, perform addition, subtraction, multiplicat

51、ion, and division on these binary values, and then present the results from these calculations in decimal on the main display. but this is only a starting point. on the diy calculators website, it is intended to develop this much further by introducing the concept of floating-point values, describin

52、g our own simple floating-point format, and then implementing binary floating-point versions of our input, output, and math subroutines. (we are also going to do the same for binary coded decimal (bcd) check the website for more details.)and this is still just the beginning, because we plan on creat

53、ing subroutines (with associated documentation) to implement many more math functions. as yet another example of something that may interest educators, as a final year project at the beginning of 2005, a team of students at the university of newcastle upon tyne, created vhdl models of the diy calcul

54、ator and then implemented a physical version of the little scamp using a field-programmable gate array (fpga) development board中文译文虚拟diy计算器的介绍当你考虑此事,21天中出现很多关于cuthbert dribble教授的可视化编程v6.0“应用型”的计算机书籍(你经常只有21天,因为7.0版软件即将出来)。然而,遗憾的是书并不多,但有非常复杂的大学课程,它教你电脑实际上怎么工作。为了解决这种现状,作者们决定写出他们自己的理解。我们考虑到的一点是如果你头脑中确实

55、有一个特定的计划,这就很容易学会如何做。举一个例子,如果有人只给你一块木板、一把锯子、一把锤子和一些钉子,你可能会逗留片刻去思考该做些什么。但是,如果你还提出了一个简单的计划,你就会立即带者爱好和狂热跳进争论。因此,我们决定把一本书(细化后)以一个叫做diy计算器的简单计算机为基础,其巧妙的部分是我们创造的diy计算器作为一种虚拟机运行在你的家用电脑中。这篇文章是一种衍生书,目的是对diy计算器如何运行提供一个简短的介绍。电脑和计算器在其最广泛的意义上来说,计算机是一种装置,可以接受来自外界的信息,处理信息使用逻辑和/或数学运算,并基于处理结果作出决定,最终把处理的信息以新的形式返回到外部世界

56、中。形成计算机系统的主要元素是它的中央处理单元(cpu),它的存储设备(rom和ram)用于存储程序(指令序列)和数据,而且它的输入/输出(i / o)的端口是用来与外界沟通。 the cpu is the “brain” of the computer, because this is where all of the number-crunching and decision-making is performed. cpu是整个电脑的脑子,因为这是所有的数字运算和决策被执行的地方。read-only memory (rom) has its contents hard-coded as part of its construction; by comparison, in the case of random access memory (r

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论