简易计算器pld实现.doc
《简易计算器pld实现.doc》由会员分享,可在线阅读,更多相关《简易计算器pld实现.doc(21页珍藏版)》请在咨信网上搜索。
毕业设计(论文) 题目: 简易计算机的PLD实现 毕业设计(论文)原创性声明和使用授权说明 原创性声明 本人郑重承诺:所呈交的毕业设计(论文),是我个人在指导教师的指导下进行的研究工作及取得的成果。尽我所知,除文中特别加以标注和致谢的地方外,不包含其他人或组织已经发表或公布过的研究成果,也不包含我为获得 及其它教育机构的学位或学历而使用过的材料。对本研究提供过帮助和做出过贡献的个人或集体,均已在文中作了明确的说明并表示了谢意。 作 者 签 名: 日 期: 指导教师签名: 日 期: 使用授权说明 本人完全了解 大学关于收集、保存、使用毕业设计(论文)的规定,即:按照学校要求提交毕业设计(论文)的印刷本和电子版本;学校有权保存毕业设计(论文)的印刷本和电子版,并提供目录检索与阅览服务;学校可以采用影印、缩印、数字化或其它复制手段保存论文;在不以赢利为目的前提下,学校可以公布论文的部分或全部内容。 作者签名: 日 期: 学位论文原创性声明 本人郑重声明:所呈交的论文是本人在导师的指导下独立进行研究所取得的研究成果。除了文中特别加以标注引用的内容外,本论文不包含任何其他个人或集体已经发表或撰写的成果作品。对本文的研究做出重要贡献的个人和集体,均已在文中以明确方式标明。本人完全意识到本声明的法律后果由本人承担。 作者签名: 日期: 年 月 日 学位论文版权使用授权书 本学位论文作者完全了解学校有关保留、使用学位论文的规定,同意学校保留并向国家有关部门或机构送交论文的复印件和电子版,允许论文被查阅和借阅。本人授权 大学可以将本学位论文的全部或部分内容编入有关数据库进行检索,可以采用影印、缩印或扫描等复制手段保存和汇编本学位论文。 涉密论文按学校规定处理。 作者签名: 日期: 年 月 日 导师签名: 日期: 年 月 日 注 意 事 项 1.设计(论文)的内容包括: 1)封面(按教务处制定的标准封面格式制作) 2)原创性声明 3)中文摘要(300字左右)、关键词 4)外文摘要、关键词 5)目次页(附件不统一编入) 6)论文主体部分:引言(或绪论)、正文、结论 7)参考文献 8)致谢 9)附录(对论文支持必要时) 2.论文字数要求:理工类设计(论文)正文字数不少于1万字(不包括图纸、程序清单等),文科类论文正文字数不少于1.2万字。 3.附件包括:任务书、开题报告、外文译文、译文原文(复印件)。 4.文字、图表要求: 1)文字通顺,语言流畅,书写字迹工整,打印字体及大小符合要求,无错别字,不准请他人代写 2)工程设计类题目的图纸,要求部分用尺规绘制,部分用计算机绘制,所有图纸应符合国家技术标准规范。图表整洁,布局合理,文字注释必须使用工程字书写,不准用徒手画 3)毕业论文须用A4单面打印,论文50页以上的双面打印 4)图表应绘制于无格子的页面上 5)软件工程类课题应有程序清单,并提供电子文档 5.装订顺序 1)设计(论文) 2)附件:按照任务书、开题报告、外文译文、译文原文(复印件)次序装订 3)其它 目 录 一、毕业设计(论文)开题报告 二、毕业设计(论文)外文资料翻译及原文 三、学生“毕业论文(论文)计划、进度、检查及落实表” 四、实习鉴定表 xx大学xx学院 毕业设计(论文) 开题报告 题目: 简易计算机的PLD实现 机电 系 电子信息工程 专业 学 号: 学生姓名: 指导教师: (职称:讲 师 ) (职称: ) XXXX年X月XX日 课题来源 ① 随着科技的发展,对于计算器的越来越大,它在人们的经济、生活等各个方面发挥着重要作用。在我国,对于PLD器件的需求也越来越大。 ② 以国际大环境为背景,加快高等教育的信息化、国际化进程也是急需的 科学依据(包括课题的科学意义;国内外研究概况、水平和发展趋势;应用前景等) 可编程逻辑器件PLD具有高性能、低成本、低功耗、体积小和可靠性高的特性。 在我国,随着改革开发开放和经济建设的迅速发展,对PLD器件的需求越来越来大。我国ASIC的设计和生产能力都比较薄弱,而绝大多数的电子产品的密度和速度不是太高,批量也比较小。因此,广泛使用PLD器件是非常适合提高我国电子产品性能和竞争能力的主要措施之一,应大力普及以及推广。 然而,由于PLD技术的加密功能,又使得我们对于引进技术的消化、吸收和创新具有了一定的难度。在此情况下,PLD的解析技术应运而生了。这种技术我国目前处于起步阶段。 采用PLD对器件进行设计是通过对芯片的逻辑功能的设计,以达到系统功能的实现,从而改变了原来的设计方式。尤其是在系统可编程逻辑器件ISP的生产,给数字系统设计带了了一个飞跃。 研究内容 ① 通过数字电路基础知识、基础逻辑单元、组合电路时序逻辑电路分析设计方法等基本部分的讲授和实验的训练,掌握必要的数字电子技术的基本理论、基本方法和基本技能,掌握PLD技术,建立数字系统概念。 ② 可编程逻辑(PLD)是由用户进行编程从而实现所需逻辑功能的数字集成电路(IC),利用PLD内部的逻辑机构可以实现任何布尔表达式或者寄存器函数。 ③ 对于PLD产品的开发必须了解其开发软件和开发流程,了解PLD的内部结构。详细了解各个芯片功能。 拟采取的研究方法、技术路线、实验方案及可行性分析 ① 通过强调电子电路系统设计者所需的实用方法,熟悉各个芯片基本功能,掌握电子设计自动化(EDA)技术。掌握电子元器件的特性和选用方法,从框图及理解其结构原理基础上,达到真正掌握其使用并融会贯通。 ② 学习研究电子电路的特点,了解PLD的设计步骤。PLD设计步骤为: 设计构思、选择器件类型、列写原文件、对器件编程。注意组合电路的输出方程是直接输出的而时序电路方程的输出由时钟值输出的。 总体设计——总体框图——单元电路设计——整体电路设计——软件仿真 研究计划及预期成果 研究计划: 2009年10月12日-2009年12月25日:按照任务书要求查阅论文相关参考资料,填写毕业设计开题报告书。 2010年1月11日-2010年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日:用MAX-plusⅡ进行仿真。 2010年4月26日-2010年5月21日:毕业论文撰写和修改工作。 预期成果: (1)以掌握知识为基础,培养能力为重点,提高素质为目标,培养创新能力,充分体现大纲的基本目标。 (2)掌握PLD需要了解两个部分:PLD软件和PLD本身。 (3)理解数制和编码,PLD工作原理和器件的应用个特点。 (4)掌握软件的基本操作,时序分析验证设计的正确性。 特色或创新之处 ① PLD发展很快,已由初期的低密度SPLD(如PAL/GAL)等,向高密度的CPLD发展。 ② PLD可以完成任何数字器件的功能,上至高性能CPU,下至简单的74系列电路都可以利用PLD来实现。 已具备的条件和尚需解决的问题 ① 电路的设计已经完成,仿真结果也正确,说明总电路图不但正确而且具备了应有的功能。 ② 用VHDL语言设计的能力尚需加强。 指导教师意见 指导教师签名: 年 月 日 教研室(学科组、研究所)意见 该生查阅了大量的相关资料,设计方案合理,同意开题。 教研室主任签名: 年 月 日 系意见 主管领导签名: 年 月 日 英文原文 ntroducing the Virtual DIY Calculator When you come to think about it, there are lots of “application type” computer books along the lines of Learn Prof. Cuthbert Dribble’s Visual Programming V6.0 In 21 Days (you often have only 21 days, because that’s when version 7.0 of the software is going to come out). Sad to relate, however, there really aren’t 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 it’s a lot easier to learn how 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 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. 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 Calculators In 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 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 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 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. 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 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 uses 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,535 in decimal; or $0000 to $FFFF in hexadecimal, where the concepts of binary and hexadecimal are briefly introduced a little later in this article. Once we’ve 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 the application we’re 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 user interface, which will allow us to present data to – and view results from – the computer (Figure 1). Figure 1. The main elements forming a computer-calculator The calculator’s 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 computer’s input port whenever that button is pressed. Meanwhile, one of the computer’s output ports can be used to drive the display portion of the interface. A Simple Test Case In a moment we’re 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 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 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 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 hexadecimal In this case, we use “$” characters to indicate hexadecimal 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 (ACC) 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 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 or 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 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 our imaginations, so their non-existent contents are, by definition, undefined. The Program Itself For the purposes of this article, we’re going to create a simple program that first clears the calculator’s 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 “0” through “9” or “A” through “F” set, we’re going to display these value on the main display. Let’s 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 with a hexadecimal value of $10, which is a special code that will clear the calculator’s 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 calculator’s main 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 calculator’s 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 (“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 Calculator’s virtual RAM. When we come to run the program, the DIY Calculator will automatically start at 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 the LOOP address label, which is where we 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 calculator’s 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 this register. When the CPU reads from the input port connected to the calculator’s 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 with the “0” through “9” and “A” through “F” keys are $00 through $09 and $0A through $0F, respectively. When we arrive at the LOOP label, 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 address of the input port connected to the calculator’s 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 clicked a button whose code is higher than $0F, which we don’t 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 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 END that, not surprisingly, informs the assembler that its task here is completed. Entering and Running the Program The 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 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- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 简易 计算器 pld 实现
咨信网温馨提示:
1、咨信平台为文档C2C交易模式,即用户上传的文档直接被用户下载,收益归上传人(含作者)所有;本站仅是提供信息存储空间和展示预览,仅对用户上传内容的表现方式做保护处理,对上载内容不做任何修改或编辑。所展示的作品文档包括内容和图片全部来源于网络用户和作者上传投稿,我们不确定上传用户享有完全著作权,根据《信息网络传播权保护条例》,如果侵犯了您的版权、权益或隐私,请联系我们,核实后会尽快下架及时删除,并可随时和客服了解处理情况,尊重保护知识产权我们共同努力。
2、文档的总页数、文档格式和文档大小以系统显示为准(内容中显示的页数不一定正确),网站客服只以系统显示的页数、文件格式、文档大小作为仲裁依据,个别因单元格分列造成显示页码不一将协商解决,平台无法对文档的真实性、完整性、权威性、准确性、专业性及其观点立场做任何保证或承诺,下载前须认真查看,确认无误后再购买,务必慎重购买;若有违法违纪将进行移交司法处理,若涉侵权平台将进行基本处罚并下架。
3、本站所有内容均由用户上传,付费前请自行鉴别,如您付费,意味着您已接受本站规则且自行承担风险,本站不进行额外附加服务,虚拟产品一经售出概不退款(未进行购买下载可退充值款),文档一经付费(服务费)、不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
4、如你看到网页展示的文档有www.zixin.com.cn水印,是因预览和防盗链等技术需要对页面进行转换压缩成图而已,我们并不对上传的文档进行任何编辑或修改,文档下载后都不会有水印标识(原文档上传前个别存留的除外),下载后原文更清晰;试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓;PPT和DOC文档可被视为“模板”,允许上传人保留章节、目录结构的情况下删减部份的内容;PDF文档不管是原文档转换或图片扫描而得,本站不作要求视为允许,下载前自行私信或留言给上传者【精***】。
5、本文档所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用;网站提供的党政主题相关内容(国旗、国徽、党徽--等)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
6、文档遇到问题,请及时私信或留言给本站上传会员【精***】,需本站解决可联系【 微信客服】、【 QQ客服】,若有其他问题请点击或扫码反馈【 服务填表】;文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“【 版权申诉】”(推荐),意见反馈和侵权处理邮箱:1219186828@qq.com;也可以拔打客服电话:4008-655-100;投诉/维权电话:4009-655-100。
1、咨信平台为文档C2C交易模式,即用户上传的文档直接被用户下载,收益归上传人(含作者)所有;本站仅是提供信息存储空间和展示预览,仅对用户上传内容的表现方式做保护处理,对上载内容不做任何修改或编辑。所展示的作品文档包括内容和图片全部来源于网络用户和作者上传投稿,我们不确定上传用户享有完全著作权,根据《信息网络传播权保护条例》,如果侵犯了您的版权、权益或隐私,请联系我们,核实后会尽快下架及时删除,并可随时和客服了解处理情况,尊重保护知识产权我们共同努力。
2、文档的总页数、文档格式和文档大小以系统显示为准(内容中显示的页数不一定正确),网站客服只以系统显示的页数、文件格式、文档大小作为仲裁依据,个别因单元格分列造成显示页码不一将协商解决,平台无法对文档的真实性、完整性、权威性、准确性、专业性及其观点立场做任何保证或承诺,下载前须认真查看,确认无误后再购买,务必慎重购买;若有违法违纪将进行移交司法处理,若涉侵权平台将进行基本处罚并下架。
3、本站所有内容均由用户上传,付费前请自行鉴别,如您付费,意味着您已接受本站规则且自行承担风险,本站不进行额外附加服务,虚拟产品一经售出概不退款(未进行购买下载可退充值款),文档一经付费(服务费)、不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
4、如你看到网页展示的文档有www.zixin.com.cn水印,是因预览和防盗链等技术需要对页面进行转换压缩成图而已,我们并不对上传的文档进行任何编辑或修改,文档下载后都不会有水印标识(原文档上传前个别存留的除外),下载后原文更清晰;试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓;PPT和DOC文档可被视为“模板”,允许上传人保留章节、目录结构的情况下删减部份的内容;PDF文档不管是原文档转换或图片扫描而得,本站不作要求视为允许,下载前自行私信或留言给上传者【精***】。
5、本文档所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用;网站提供的党政主题相关内容(国旗、国徽、党徽--等)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
6、文档遇到问题,请及时私信或留言给本站上传会员【精***】,需本站解决可联系【 微信客服】、【 QQ客服】,若有其他问题请点击或扫码反馈【 服务填表】;文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“【 版权申诉】”(推荐),意见反馈和侵权处理邮箱:1219186828@qq.com;也可以拔打客服电话:4008-655-100;投诉/维权电话:4009-655-100。
关于本文