簡易計算器的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

提交評論