简易计算器的PLD实现毕业设计论文

上传人:无*** 文档编号:80106468 上传时间:2022-04-24 格式:DOC 页数:20 大小:140.51KB
收藏 版权申诉 举报 下载
简易计算器的PLD实现毕业设计论文_第1页
第1页 / 共20页
简易计算器的PLD实现毕业设计论文_第2页
第2页 / 共20页
简易计算器的PLD实现毕业设计论文_第3页
第3页 / 共20页
资源描述:

《简易计算器的PLD实现毕业设计论文》由会员分享,可在线阅读,更多相关《简易计算器的PLD实现毕业设计论文(20页珍藏版)》请在装配图网上搜索。

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, al

47、l of the illustrations in the book 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 ad

48、dition, subtraction, multiplication, 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

49、floating-point values, describing 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 beg

50、inning, because we plan on creating 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, creat

51、ed VHDL models of the DIY calculator 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版软件即将出来)。然而,遗憾的是书并不多,但有非常复杂的大学课程,它教你电脑实际上怎么工作。为了解决这种现状,

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

53、并基于处理结果作出决定,最终把处理的信息以新的形式返回到外部世界中。形成计算机系统的主要元素是它的中央处理单元(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)

54、 has its contents hard-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.只读存储器(ROM)以硬编码的内容作为建设的部分;通过比较,在随机存取存储器(RAM)中,你可以加载新值到其中,读完这些值后再返回。The term “bus” is used to refer to a group

55、of signals that carry similar information and perform a common function.所谓“巴士”是指一个函数组的信号进行类似的信息并执行共同的功能。A computer actually 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 t

56、o indicate whether it wishes to “talk” (output/write/transmit data) or “listen” (input/read/ receive data); and it uses the data bus to convey information back and forth between itself and the other components.实际上一台电脑利用三辆巴士被称为控制总线,地址总线和数据总线。CPU把地址总线用于“点”到系统的其他组件;它使用控制总线来表明它是否希望“讲“(输出/写/数据传输)或”听“(输入/

57、读/接收数据);以及它使用数据总线在它之间来回传递信息和其他组件。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 hexadecimal, where the concepts

58、 of binary and hexadecimal are briefly introduced a little later in this article.我们的虚拟电脑配备有一个8位宽的数据总线和一个地址总线,其16地址总线指向216 = 65536个不同的内存位置,它的编号在十进制中从0至65,535;或在十六进制中从0000至FFFF,本文对二进制和十六进制的概念简要进行了介绍。一旦我们对一般用途的电脑构思了自己的想法,下一个步骤是想些和它有关的东西。 In fact there are millions of tasks to which computers can be ass

59、igned, 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 of有一点我们需要的是某种形式的用户界面,这将使我们现有的数据呈现在电

60、脑上,并在电脑中查看结果(图1)。图1.形成一个电脑计算器的主要元素该计算器的用户界面主要包括按钮和一些显示类型。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 of the computers output ports c

61、an be used to drive the display portion of the interface.与此同时,电脑输出端之一可用于驱动界面的显示部分。一个简单的测试案例此刻我们要创造我们自己的方案,但在我们开始之前,我们要明白,计算机存储和处理数据使用二进制数字系统,其中只有两个数字:0和1。一根线(或寄存器位/记忆体元件)可以用来表示两个不同的值:二进制0或1;两条线可以代表四个值:二进制00,01,10和11;三条线可以代表八个值:二进制000,001,010,011 ,100,101,110,111,等等。 As our virtual computer has an 8-

62、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). 由于我们的虚拟电脑有一个8位数据总线,这可以用来表示256个不同的二进制值,以指示十进制中编号从0到255或二进制中00000000到11111111(其中“”符号用于指示一个二制值)。问题是就0秒或1秒的长串而言, 人们往往难以思考。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 3.因此,当电脑工作的,我们往往更喜欢十六进制数字系统,其中包括

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

copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!