Quartus II & ModelSim === >彙整者:陳奕廷 >>契合課程:**硬體描述語言**、**FPGA系統晶片設計** ###### tags: `程式語言` :::danger :warning: 僅供學習用途,請勿用於商業行為 :warning: [踴躍支持正版軟體](https://www.altera.com/downloads/download-center.html) ::: :::success :bookmark: **目錄** :::spoiler [TOC] ::: # 使用 Quartus II & ModelSim 開發硬體描述語言 ## Quartus II - New Project Wizard >新增專案 ### Page1 -  - 自訂路徑,可由系統代為新增資料夾,不必手動 - Name of Project也是自訂 - **Top Level攸關到後續Module Name**,得小心 ### Page2 - 直接Next ### Page3 -  - 依學校設備,應更正為 - Device Family:MAX7000s - Available Device:EPM7128SLC84-7 ### Page4 -  ### Page5 -  ## Quartus II - File/New File >新增檔案 -  ## Quartus II - Module Name >模組名稱 - New Project Wizard 的 Top-Level Name -  ## Quartus II - Coding & Compile >編輯 & 編譯程式 -  ## Quartus II - Tool/Netlist Viewers/RTL Viewer >觀察電路圖 -  -  ## Quartus II - RTL Simulation >編譯程式後的時脈編譯 -  - 跳轉到ModelSim介面 - **此時介面會出現在Quartus II指定的I/O** ## ModelSim - Add Wave >新增波型 -  ## ModeSim - Coding >在ModeSim視窗下指令 -  | 行列數 | 指令 | 作用 | | -------- | -------- | -------- | | VSIM6> | force | 強制產生 | | VSIM7> | -deposit | 波型 | | VSIM8> | /A & /B | 自定義I/O輸入 | | VSIM9> | 2# | 二進制 | | VSIM10> | 0、20 | 波型時脈 | | VSIM11> | run | 自定義時間 | ## ModeSim - Q & A - Q1:指令碼改成二進制 - A1:右鍵/Redix/Decimal -  - Q2:時間軸如何從指定時間開始 - A2:指令"run" + 秒數 -  # 使用 Quartus II 開發 FPGA - 有別於硬體描述語言,FPGA課堂將**不必於Modelsim下指令**,而是利用Quartus II裏頭的**Assignments/Setting/Simulation**做調整。 - 此調整有兩個先決條件: - 1.擁有一個**專案** - 新增專案參考硬體描述語言/Quartus II/New Project Wizard - 專案內容大多是**I/O腳位的設置與定義** - 2.擁有一個**測試檔** - 是一個Verilog File,可以參考硬體描述語言/Quartus II/Add New File - 檔案內容大多是**真值表波型和時間脈波定義** ## 將測試檔加入專案 - Assignment/Setting/Files/Add -  - 確認是否加入成功 -  ## Assignments/Setting/Simulation設定 -  - A:Simulation - B:執行Gate-Level模式 - C:進入Simulation的Test Benches - 加入測試檔的地方 ## Test Benches設定 ### 新增Test Benches -  ### 選擇Test Benches選項並指定Test Benches檔案 -  - A:Test Benches名稱 - 通常都設定成跟測試檔的檔名一樣 - B:Simulation秒數 - C:指定Test Benches檔案 ### 確認Test Benches檔案列表 -  - 確認完之後不斷OK,Apply ## 編譯專案 -  - 直接跳轉到Modelsim - Error1:沒有跳轉 - Error2:已跳轉,但沒有波型 - 出現以上錯誤得重複檢查程式碼 ## Modelsim - 對波型按右鍵,選擇ZoomFull可以看見完整波型 - 
×
Sign in
Email
Password
Forgot password
or
Sign in via Google
Sign in via Facebook
Sign in via X(Twitter)
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
Continue with a different method
New to HackMD?
Sign up
By signing in, you agree to our
terms of service
.