收藏 分销(赏)

简易计算器pld实现.doc

上传人:精*** 文档编号:2626944 上传时间:2024-06-03 格式:DOC 页数:21 大小:142.50KB
下载 相关 举报
简易计算器pld实现.doc_第1页
第1页 / 共21页
简易计算器pld实现.doc_第2页
第2页 / 共21页
简易计算器pld实现.doc_第3页
第3页 / 共21页
简易计算器pld实现.doc_第4页
第4页 / 共21页
简易计算器pld实现.doc_第5页
第5页 / 共21页
点击查看更多>>
资源描述

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

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

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

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

5、开题报告、外文译文、译文原文(复印件)次序装订3)其它目 录一、毕业设计(论文)开题报告二、毕业设计(论文)外文资料翻译及原文三、学生“毕业论文(论文)计划、进度、检查及落实表”四、实习鉴定表xx大学xx学院毕业设计(论文)开题报告题目: 简易计算机的PLD实现 机电 系 电子信息工程 专业学 号: 学生姓名: 指导教师: (职称:讲师 ) (职称: ) XXXX年X月XX日课题来源 随着科技的发展,对于计算器的越来越大,它在人们的经济、生活等各个方面发挥着重要作用。在我国,对于PLD器件的需求也越来越大。 以国际大环境为背景,加快高等教育的信息化、国际化进程也是急需的科学依据(包括课题的科学

6、意义;国内外研究概况、水平和发展趋势;应用前景等)可编程逻辑器件PLD具有高性能、低成本、低功耗、体积小和可靠性高的特性。 在我国,随着改革开发开放和经济建设的迅速发展,对PLD器件的需求越来越来大。我国ASIC的设计和生产能力都比较薄弱,而绝大多数的电子产品的密度和速度不是太高,批量也比较小。因此,广泛使用PLD器件是非常适合提高我国电子产品性能和竞争能力的主要措施之一,应大力普及以及推广。 然而,由于PLD技术的加密功能,又使得我们对于引进技术的消化、吸收和创新具有了一定的难度。在此情况下,PLD的解析技术应运而生了。这种技术我国目前处于起步阶段。 采用PLD对器件进行设计是通过对芯片的逻

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

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

9、010年3月5日:填写毕业实习报告。2010年3月8日-2010年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工作原理和器件的应用

10、个特点。(4)掌握软件的基本操作,时序分析验证设计的正确性。特色或创新之处 PLD发展很快,已由初期的低密度SPLD(如PAL/GAL)等,向高密度的CPLD发展。 PLD可以完成任何数字器件的功能,上至高性能CPU,下至简单的74系列电路都可以利用PLD来实现。已具备的条件和尚需解决的问题 电路的设计已经完成,仿真结果也正确,说明总电路图不但正确而且具备了应有的功能。 用VHDL语言设计的能力尚需加强。指导教师意见 指导教师签名:年 月 日教研室(学科组、研究所)意见该生查阅了大量的相关资料,设计方案合理,同意开题。 教研室主任签名: 年 月 日系意见 主管领导签名: 年 月 日英文原文nt

11、roducing the Virtual DIY CalculatorWhen 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 ou

12、t). Sad to relate, however, there 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 h

13、ow to do something if you actually 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

14、 immediately leap into the fray 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

15、. This article is a spin-off from 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 mat

16、hematical operations, make decisions 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

17、 programs(sequences of instructions) 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 har

18、d-coded as part of its construction; 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 act

19、ually makes use of three buses called 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 use

20、s the data bus to convey information 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 d

21、ecimal; or $0000 to $FFFF in hexadecimal, 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

22、 computers can be assigned, but 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

23、the computer (Figure 1).Figure 1. 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 b

24、utton is pressed. Meanwhile, one 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 sys

25、tem, which comprises just two digits: 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

26、111; and so on. As our virtual computer 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

27、 to think in terms of long strings 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

28、values. Each hexadecimal digit directly 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 (A

29、CC) and Status Register (SR)There 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

30、memory elements, each of which can 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 o

31、r condition codes, because they 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

32、this register as being the same 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 ou

33、r imaginations, so their non-existent 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

34、 these buttons are part of the “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,

35、the CLRCODE label is associated 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

36、 display. Similarly, the KEYPAD 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

37、 the EQU commands we see a ORG(“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

38、this address.)Next, we use a LDA(“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

39、are going to wait for the user to 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 wit

40、h that button is loaded into this 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, th

41、e hexadecimal codes associated with 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

42、previously noted, this is the address 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

43、1; this means that the user clicked 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,

44、 we use a STA (“store accumulator”) 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 ta

45、sk here is completed. Entering and 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 read

46、er will lean and how long it will 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 book are provided as PowerPoint slides that can be used as the basis for present

展开阅读全文
相似文档                                   自信AI助手自信AI助手
猜你喜欢                                   自信AI导航自信AI导航
搜索标签

当前位置:首页 > 包罗万象 > 大杂烩

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        获赠5币

©2010-2024 宁波自信网络信息技术有限公司  版权所有

客服电话:4008-655-100  投诉/维权电话:4009-655-100

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :gzh.png    weibo.png    LOFTER.png 

客服