【正文】
I 摘 要 邏輯分析儀是一種分析數(shù)字化設備的測試儀器,主要用于分析數(shù)字系統(tǒng)的邏輯關系,有效地解決越來越復雜的數(shù)字系統(tǒng)的檢測和故障診斷問題。隨著電子技術的迅猛發(fā)展,計算機的廣泛應用,基于 PC 的虛擬儀器也將是測試儀器領域的一大發(fā)展趨勢。 USB 通用串行總線是一種主流的標準計算機接口。 USB 接口具有即插即用與熱插拔的特性,它可使用戶迅速方便地連接 PC 主機的各種接口設備。基于 USB 接口的邏輯分析儀充分利用計算機的強大功能,大大突破了傳統(tǒng)儀器儀表在數(shù)據(jù)傳送、處理、顯示和存儲等方面的限制,在性能方面得到了極大的提高。因此研 究基于 USB 接口的虛擬邏輯分析儀具有一定的經(jīng)濟效益和現(xiàn)實意義。 本文主要介紹了基于 USB 接口的虛擬邏輯分析儀的實現(xiàn)原理和過程。采用現(xiàn)場可編程器件 FPGA,設計基于 USB 的虛擬邏輯分析儀, 首先進行了方案的論證與選取,而后進行軟件和硬件設計 。 硬件設計 主要是外圍電路設計, 包括電源電路、復位電路、時鐘電路、配置電路、 USB 接口電路等。 軟件設計主要是利用 Verilog HDL 語言編程而后 用 QuartusⅡ軟件 進行 波形 仿真等。 關鍵詞 : 邏輯分析儀 。 USB。 FPGA。 II Abstract Logic analyzer is a kind of test instrument to analyse the digital devices, is usually used to analyse the logic relationship of the digital system. It can solve the detection and fault diagnosis of the digital system effectively. With the rapid development of electronics, the widely used of the PC, the virtual instrument based on PC will be a major development trend in the test instrument. USB is a mainstream standard puter interface. The USB interface has many features, such as plug and play, hot swap. It allows users to quickly and easily connecting a variety of interface devices of PC. The logic analyzer based on USB makes full use of the puter to breakthrough the limitation of traditional instrumentation in transmission, processing, display and storage, has greatly improved in capability. Therefore, research the logic analyzer based on USB interface has great economic and practical significance. This paper describes the principles and processes of the logic analyzer based on USB. With the help of the Fieldprogrammable devicesFPGA to design the logic analyzer based on USB, greatly simplifies the peripheral hardware circuit. The first first selection, the demonstration and scheme of software and hardware design. Hardware design mainly is the peripheral circuit design, including power supply circuit, reset circuit, clocking circuit and configuration circuit, USB interface circuit , etc. Software design is the main Verilog HDL language programming and then use QuartusⅡ software waveform simulation, etc. Key words: Logic analyzer。 USB。 FPGA III 目錄 摘 要 ............................................................................................................................. I Abstract ........................................................................................................................II 1 緒論 ........................................................................................................................... 1 課題研究背景及意義 ...................................................................................... 1 國內(nèi)外研究現(xiàn)狀及發(fā)展趨勢 ......................................................................... 2 本論文研究的主要內(nèi)容 .................................................................................. 3 2 方案論證 ................................................................................................................ 4 方案設計與選取 .............................................................................................. 4 系統(tǒng)邏輯框架 .................................................................................................. 6 3 邏輯分析儀硬件設計 ......................................................................................... 7 現(xiàn)場可編程邏輯器件 FPGA .......................................................................... 7 FPGA 的選用依據(jù) .......................................................................................... 7 邏輯分析儀主芯片的選型 ............................................................................. 7 FPGA 芯片配置 .............................................................................................. 9 虛擬邏輯分析儀硬件總體方案設計 ........................................................... 13 4 USB 驅動設計 ..................................................................................................... 18 USB 技術概述 ............................................................................................... 18 USB 芯片選擇 ............................................................................................... 18 芯片結構 ....................................................................................................... 19 CY7C68013 管腳 .......................................................................................... 21 USB 和 FPGA 的驅動電路 ........................................................................... 24 5 邏輯分析儀的軟件設計 .................................................................................. 26 FPGA 設計流程 ............................................................................................ 26 QuartusⅡ軟件介紹 ....................................................................................... 27 邏輯分 析儀功能模塊設計 ........................................................................... 27 6 結論 ........................................................................................................................ 37 IV 7 附錄 ........................................................................................................................ 38 致謝 ............................................................................................................................ 41 [參考文獻 ] ................................................................................................................ 42 1 1緒論 及意義 20 世紀 70 年代以來,伴隨計算機技術、大規(guī)模集成電路、可編程邏輯器件、高速數(shù)據(jù)信號處理器的迅猛發(fā)展,各種數(shù)字系統(tǒng)的設計、開發(fā)、檢測任務越來越多,也越來越復雜了。數(shù)字電路系統(tǒng)所處理的信息都是用離散的二進制來表示,常用“ 1”來表示高電平,“ 0”表示低電平,多個二進制位的組合構成一個數(shù)據(jù),我們稱這一領域是數(shù)據(jù)域;該領域測試技術即 被稱為數(shù)據(jù)域測試技術,簡稱數(shù)據(jù)域測試。 在數(shù)據(jù)域測試的領域中,大多數(shù)情況下只在意數(shù)據(jù)信號之間的邏輯關系和時序關系,缺忽視了實際的具體波形。對于設計人員來說,若想從大量的數(shù)據(jù)流中找出一些無規(guī)則、隱蔽、隨機的錯誤無異于大海撈針,所以,必須采用一些全新的測試設備才能及時、準確的解決問題, 比如 邏輯分析儀、仿真器、數(shù)據(jù)圖形產(chǎn)生器、嵌入式開發(fā)系統(tǒng)等等。其中,邏輯分析儀( Logic Analyzer,簡稱 LA)是最基本、最具有代表性的數(shù)據(jù)域測試儀器。 邏輯分析儀的主要 功能 是在時鐘作用下對被 檢