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

下载本文档

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

文档简介

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

2、、使用毕业设计(论 文)的规定,BP:按照学校要求提交毕业设计(论文)的卬刷本和电 子版本;学校有权保存毕业设计(论文)的卬刷本和电子版,并提供 目录检索与阅览服务;学校可以采用影印、缩卬、数字化或其它复制 手段保存论文;在不以赢利为目的前提下,学校可以公布论文的部分 或全部内容。 作者签名: 日 期: 如不慎侵犯了你的权益请联系我们告知 学位论文原创性声明 木人郑重声明:所呈交的论文是本人在导师的指导下独立进行研 究所取得的研究成果。除了文中特别加以标注引用的内容外,本论文 不包含任何其他个人或集体已经发表或撰写的成果作品。对本文的研 究做出重要贡献的个人和集体,均己在文中以明确方式标明。本

3、人完 全意识到木声明的法律后果由木人承担。 作者签名:日期: 年 月 日 学位论文版权使用授权书 本学位论文作者完全了解学校有关保留、使用学位论文的规定, 同意学校保留并向国家有关部门或机构送交论文的复印件和电子版, 允许论文被查阅和借阅。本人授权大学可以将本学位 论文的全部或部分内容编入有关数据库进行检索,可以采用影印、缩 卬或扫描等复制手段保存和汇编木学位论文。 涉密论文按学校规定处理。 作者签名:日期: 年 月 日 导师签名: 日期: 年 月 日 如不慎侵犯了你的权益,请联系我们告知! 注意事项 1. 设计(论文)的内容包括: 1)封面(按教务处制左的标准封而格式制作) 2)原创性声明

4、3)中文摘要(300字左右)、关键词 4)外文摘要、关键词 5)目次页(附件不统一编入) 6)论文主体部分:引言(或绪论)、正文、结论 7)参考文献 8)致谢 9)附录(对论文支持必要时) 2. 论文字数要求:理工类设计(论文)正文字数不少于1万字(不包括图纸、程序清单等), 文科类论文正文字数不少于1. 2万字。 3. 附件包括:任务书、开题报告、外文译文、译文原文(复印件)。 4. 文字、图表要求: 1)文字通顺,语言流畅,书写字迹工整,打印字体及大小符合要求,无错别字,不准 请他人代写 2)工程设计类题目的图纸,要求部分用尺规绘制,部分用计算机绘制,所有图纸应符 合国家技术标准规范。图表

5、整洁,布局合理,文字注释必须使用工程字书写,不准用徒 手画 3)毕业论文须用A4单而打印,论文50页以上的双而打印 4)图表应绘制于无格子的页而上 5)软件工程类课题应有程序淸单,并提供电子文档 5. 装订顺序 1)设计(论文) 2)附件:按照任务书、开题报告、外文译文、译文原文(复印件)次序装订 3)其它 如不慎侵犯了你的权益,请联系我们告知! 一、毕业设计(论文)开题报告 二、毕业设计(论文)外文资料翻译及原文 三、学生“毕业论文(论文)计划、进度、检查及落实表” 四、实习鉴定表 如不慎侵犯了你的权益,请联系我们告知! 如不慎侵犯了你的权益请联系我们告知! XX大学XX学院 毕业设计(论文

6、) 开题报告 题目:简易计算机的PLD实现 机电系 电子信息工程专业 学 号: 学生姓名: 指导教师:(职称:讲师) (职称:) XXXX年X月XX日 如不慎侵犯了你的权益,请联系我们吿知! 课题来源 随着科技的发展,对于计算器的越来越大,它在人们的经济、生活等各个方面 发挥着重要作用。在我国,对于PLD器件的需求也越来越大。 以国际大环境为背景,加快高等教育的信息化、国际化进程也是急需的 科学依据(包括课题的科学意义;国内外研究概况、水平和发展趋势;应 用前景等) 可编程逻辑器件PLD具有高性能、低成本、低功耗、体积小和可靠性高的特性。 在我国,随着改革开发开放和经济建设的迅速发展,对PLD

7、器件的需求越来越来大。 我国ASIC的设讣和生产能力都比较薄弱,而绝大多数的电子产品的密度和速度不是太 高,批量也比较小。因此,广泛使用PLD器件是非常适合提高我国电子产品性能和竞 争能力的主要措施之一,应大力普及以及推广。 然而,由于PLD技术的加密功能,乂使得我们对于引进技术的消化、吸收和创新具 有了一定的难度。在此情况下,PLD的解析技术应运而生了。这种技术我国口前处于 起步阶段。 采用PLD对器件进行设计是通过对芯片的逻辑功能的设讣,以达到系统功能的实 现,从而改变了原来的设讣方式。尤其是在系统可编程逻辑器件ISP的生产,给数字 系统设计带了了一个飞跃。 研究内容 通过数字电路基础知识

8、、基础逻辑单元、组合电路时序逻辑电路分析设计方法 等基本部分的讲授和实验的训练,掌握必要的数字电子技术的基本理论、基本方法和 基本技能,掌握PLD技术,建立数字系统概念。 可编程逻辑(PLD)是山用户进行编程从而实现所需逻辑功能的数字集成电路 (IC),利用PLD内部的逻辑机构可以实现任何布尔表达式或者寄存器函数。 对于PLD产品的开发必须了解其开发软件和开发流程,了解PLD的内部结构。 详细了解各个芯片功能。 如不慎侵犯了你的权益,请联系我们吿知! 拟采取的研究方法、技术路线、实验方案及可行性分析 通过强调电子电路系统设讣者所需的实用方法,熟悉各个芯片基本功能,掌握 电子设讣自动化(EDA)

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

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

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

12、 年月日 如不慎门犯了你的权益,谄联系我们r次! 系意见 主管领导签名: 如不慎侵犯了你的权益.请联系我们告知! 英文原文 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, be

13、cause 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 humbl

14、e 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

15、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

16、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 fro

17、m 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 process

18、ing 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 ubrain of the computer, because this is where all of the number-crunching and decis

19、ion-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

20、 similar information and perforin 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 uta

21、lk,f (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 t

22、o 216 = 65,536 different memory locations, which are numbered from 0 to t们告知! 65,535 in decimal; or S0000 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

23、 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 i

24、s 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 c

25、ode 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 befo

26、re 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,

27、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

28、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 Is. 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 Fi

29、gure 2 如不慎侵犯了你的权益, Figure 2 Binary and hexadecimal In this case, we usecharacters 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,

30、536 different memory locations, which are numbered from $0000 to SFFFF in hexadecima1. 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 a

31、ccumulator (ACC) and the status register (SR)(In this context, the term registerM 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 uaccumulates * , intermediate results In the case of the status reg

32、ister, 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

33、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

34、 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 through V or A” throughs

35、et,cgoing 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

36、value of $10, which is a special code that will clear the calculator* s main display. By comparison, the MAIMDISP label is associated with the hexadecimal value SF031, which happens to be the address of the output port that drives the calculator s main display. Similarly, the KEYPAD label is associa

37、ted 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,

38、 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( 4fcload accumulat

39、or ) instruction to load our special clear code into the accumulator, and then we use a STA ( store accumulatorM ) 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

40、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

41、 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 thethrough an

42、d A” through “F keys are $00 through $09 and SOA through $0F, respectively When we arrive at the LOOP label, we use a LDA( Toad accumulatorM ) 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 con

43、nected 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

44、higher than $0F, which we don* t wish to happen Thus, if the user did click a button other than 440* though 9 or A” through , the JC ( jump if carryM ) instruction will return the program to the LOOP label to await anotherOtherwise, we use a STA ( ustore accumulator ) instruction to copy this key co

45、de to the main display, and then we use a JMP ( unconditional jump” ) instruction to return us to the 如不慎侵犯了你的权益,请联系我们告知! 如不慎侵犯了你的权益,请联系我们告知! LOOP label to await another k已y The final statement in the program is a END that, not surprisingly, informs the assembler that its task here is completed Ente

46、ring 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

47、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

48、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 addition, subtraction, multi

49、plication, 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 Calculator* s website, it is intended to develop this much further by introducing the concept of floating-point values, de

50、scribing 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 o

51、n 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 Tyn created VHDL models of the DIY ca

52、lculator and then implemented a physical version of the little scamp using a fie 1 d-programmab 1 e gate array (FPGA) development board 如不慎侵犯了你的权益,请联系我们告知! 中文译文 虚拟DIY计算器的介绍 当你考虑此事,21天中出现很多关于Cuthbert Dribble教授的可视化编程V6. 0 应用 型”的汁算机书籍(你经常只有21天,因为7.0版软件即将岀来)。然而,遗憾的是书并不 多,但有非常复杂的大学课程,它教你电脑实际上怎么工作。 为了解决这种

53、现状,作者们决泄写岀他们自己的理解。我们考虑到的一点是如果你头脑 中确实有一个特定的计划,这就很容易学会如何做。 举一个例子,如果有人只给你一块木板、一把锯子、一把锤子和一些钉子,你可能会逗 留片刻去思考该做些什么。但是,如果你还提出了一个简单的il划,你就会立即带者爱好和 狂热跳进争论。 因此,我们决左把一本书(细化后)以一个叫做DIY计算器的简单计算机为基础,苴巧妙 的部分是我们创造的DIY计算器作为一种虚拟机运行在你的家用电脑中。这篇文章是一种衍 如不慎侵犯了你的权益,请联系我们告知! 生书,目的是对DIY计算器如何运行提供一个简短的介绍。 如不慎侵犯了你的权益,请联系我们告知! .电脑

54、和计算镰I 在其最广泛的意义上来卑护谭缚I;是一种簧置,可以接受来自外界的信息,处理信息使 用逻辑和/或数学运算,:处理结呆定,-養把处理的信息以新的形式返回到外 部世界中。込F 形成汁算机系统的濒芫索是它的中荧处理单严MPU冬垃的存储设备(ROH和RAM) 用于存储程序(指令序列)和数据,而且它的(10)的端口是用来与外界沟通。 CPU是整个电脑的脑子,因为这是所有的数字运算和决薰被执行的地方。只读存储器(ROM) 以硬编码的内容作为建设的部分;通过比较,任随机存取存储器(RAM)中,你可以加载新 值到其中,读完这些值后再返回。 所谓“巴士”是指一个函数组的信号进行类似的信息并执行共同的功能

55、。实际上一台电 脑利用三辆巴士被称为控制总线,地址总线和数据总线。CPU把地址总线用于“点”到系统 的英他组件:它使用控制总线来表明它是否希望“讲(输出/写/数据传输)或”听“(输 入/读/接收数据);以及它使用数据总线在它之间来回传递信息和其他组件。我们的虚拟电 脑配备有一个8位宽的数据总线和一个地址总线,英16地址总线指向216 = 65536个不同 的内存位置,它的编号在十进制中从0至65, 535;或在十六进制中从0000至FFFF,本文对 二进制和十六进制的槪念简要进行了介绍。 一旦我们对一般用途的电脑构思了自己的想法,下一个步骤是想些和它有关的东西。 事实上有以百万计的任务可以分配

56、给计算机,但这里我们感兴趣的应用是一个简单的计算 器。那么,它消耗了什么来强制电脑扮演一个计算器的角色?有一点我们需要的是某种形式 的用户界而,这将使我们现有的数据呈现在电脑上,并在电脑中查看结果(图1)。 图1.形成一个电脑计算器的主要元素 该计算器的用户界面主要包括按钮和一些显示类型。每个按钮都有一个唯一的与它相关 的二进制代码,而这代码当该按钮被按下时将被提交到计算机的输入端口。与此同时,电脑 输岀端之一可用于驱动界而的显示部分。 如不慎侵犯了你的权益,请联系我们告知! 一个简单的测试案例 此刻我们要创造我们自己的方案,但在我们开始之前,我们要明白,计算机存储和处理 数据使用二进制数字系

57、统,其中只有两个数字:0和1。一根线(或寄存器位/记忆体元件) 可以用来表示两个不同的值:二进制0或1;两条线可以代表四个值:二进制00, 01, 10 和11:三条线可以代表八个值:二进制000, 001, 010, 011 , 100, 101, 110, 111,等等。 由于我们的虚拟电脑有一个8位数据总线,这可以用来表示256个不同的二进制值,以指示 十进制中编号从0到255或二进制中%00000000到%11111111 (其中“”符号用于指示 一个二制值)。 问题是就0秒或1秒的长串而言,人们往往难以思考。因此,当电脑工作的,我们往往 更喜欢十六进制数字系统,其中包括16位数字:0

58、到9和A到F,如图3所示。 琴电制和十六进制 在这种情况下,我们址用冷U 殊龛示I 穴进制帼解51呻叭进制数字直接映射到4 令旷1O = Overflow flag 个二进制数字(当然,反之亦然)。舟憊解释了删却倔刪鋼过,我们的16位地址总 线可以用来指向216二6553倂耦的内存位筑驚辭券进制中编号从S0000至FFFF。 囂加器(ACC)和状态寄存器(SR) 在我们首先投入争论小毬有很多东西我们巒知道。在其他事项中,我们的CPU包含 两个8位寄存器,英称为累加(ACC)和状态寄请器(SR)。/在这种情况下,术语寄存器”是 指一组元素的内存,每个元詰制聲二个炉的三連制数汗。) 正如其名称所示,累加闊勢诜聚蠱扌或积累”,中间结果。在状态寄存器 的情形下,它的每一个位称为一个瞬/G他似尹常被称为状态标志或条件代码,因为它 们有助于信号(标志),某些条件已经发生。我们因为例程序的目的只关注进位(C)的标志。 由于我们有时想从内存装载状态寄存器(或存储它),它通常是把这个寄存器当作

温馨提示

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

评论

0/150

提交评论