Archived: Cycle-Accurate Simulation in LabVIEW FPGA

NI does not actively maintain this document.

This content provides support for older products and technology, so you may notice outdated links or obsolete information about operating systems or other relevant products.

綜覽

As field-programmable gate array (FPGA) applications grow larger and more complex, simulation has increasingly become important to validate IP before committing to a time-intensive compilation process and debugging the design with high-fidelity test coverage. In NI LabVIEW software, you can simulate your application logic for both functionality and timing. Cycle-accurate simulators test the timing constraints of your application by providing a means to validate the signal propagation of your logic. These simulators also give you the ability to test your entire FPGA application because they incorporate both your LabVIEW FPGA and Component-Level IP (CLIP) or IP Integration Node logic. This white paper focuses on LabVIEW FPGA integration with third-party cycle-accurate simulators. To learn more about the functional simulation capabilities of LabVIEW FPGA, refer to LabVIEW FPGA Online Help.

 

Note: The Mentor Graphics Questa Advanced Simulator is no longer supported as a simulation tool in LabVIEW FPGA as of the LabVIEW 2018 FPGA Module release.

 

Note: The Mentor Graphics ModelSim is no longer supported as a simulation tool in LabVIEW FPGA as of LabVIEW 2014.

Contents

以 LabVIEW 搭配其他製造商模擬器的協同模擬

FPGA 應用的協同模擬作業,將可直接透過 LabVIEW 建立並執行模擬作業,且於背景完整發揮第三方精確週期模擬器的效能。

在協同模擬中,LabVIEW 可針對受測 IP 提供激發、控制模擬器的執行情況,再擷取最後反應。透過 LabVIEW 的協同模擬,控制輸入與執行的主要 VI,將可搭配常見的 FPGA 主要介面功能,以取代既有的 VHDL 架構測試平台。使用者以現有的 LabVIEW 技巧即可提高產能,且不需另外深入了解 VHDL,亦可於 LabVIEW FPGA VI 上開發/執行精確週期的模擬作業。

圖 1:LabVIEW FPGA 中的精確週期協同模擬功能,可支援 LabVIEW 所撰寫的測試平台;不需額外深入了解 VHDL 的專業知識。

每個 FPGA 主函式的執行情況,將決定第三方模擬器執行模擬作業下個階段的時機。舉例來說,若於 LabVIEW 主要 VI 中執行 Write Property Node,則該節點將對模擬器溝通合適的激發,與後續的模擬時間。一旦模擬器運算結果完畢,隨即停止執行並等待 LabVIEW 的下個控制指令。

若模擬器執行作業需要額外的彈性與控制功能,則 Simulation FPGA 主面板的函式將可檢索目前模擬時間、強制模擬作業等待特定時間,或暫停模擬作業。

圖 2:Simulation FPGA 主要面板的函式,將可詳盡控制第三方模擬器的執行時間。

LabVIEW 測試平台的協同模擬,目前支援 Mentor Graphics ModelSim 與 Mentor Graphics Questa Advanced Simulator。若需逐步說明,請參閱 LabVIEW 搭配 Mentor Graphics Simulator 的精確週期協同模擬

針對第三方模擬器的模擬匯出功能

精確週期模擬作業的次要方式,即是產生並匯出 LabVIEW FPGA 模擬,以直接用於第三方模擬器中。與協同模擬相反,此方式必須以 HDL 架構的測試平台提供激發、控制測試作業,最後擷取/檢驗輸出。若此方式要搭配 LabVIEW FPGA,則必須先熟悉 HDL 模擬器與 VHDL。而此方式的優點在於,除了 Mentor Graphics ModelSim 與 Questa 之外,亦可透過 LabVIEW FPGA 將相關模擬檔案匯入至 Xilinx ISim 精確週期模擬器。 精確週期模擬器 (包含 LabVIEW FPGA)。

圖 3:修改 LabVIEW 所產生的測試平台之後,即可於 ModelSim、Questa 或 ISim 中執行精確週期模擬。

LabVIEW 亦屬於模擬匯出 (Simulation Export) 的一部分,可針對使用者的 FPGA 應用,產生客制化的測試平台檔案範本。一旦能確實搭配此方法,即可新增特定 VHDL 以正確執行自己的設計。

以正確執行自己的設計。

圖 4:LabVIEW 可產生 VHDL 測試平台範本,並作為模擬匯出檔案的一部分,以加速開發測試平台。

若要了解如何產生模擬檔案、編輯測試平台,並於 Xilinx ISim 中執行模擬,請參閱使用 Xilinx ISim 進行精確週期模擬線上教學。

結論

在編譯與佈署作業之前,若要有效模擬自己的 FPGA 應用,則可透過 LabVIEW FPGA 工具而同時模擬功能與精確週期時序。精確週期模擬器可找出重要的訊號傳播衝突,與平行程式碼之間的意外互動。針對傳統的 IP 開發作業,往往需要特定專業知識並耗費大量時間。

若能透過 Mentor Graphics ModelSim 或 Mentor Graphics Questa,於 LabVIEW FPGA 中進行精確週期的協同模擬,使用者只要運用 LabVIEW 技術,不再需要專業的 VHDL 技能,就可以大幅縮短測試平台的開發時間。

LabVIEW FPGA 亦隨附免費的精確週期模擬器:Xilinx ISim。但此範例由 LabVIEW 所產生的 VHDL 測試平台範本,使用者必須進一步加以修改,自己的設計才能正確運作。

Was this information helpful?

Yes

No