Vivado和ISE相比ChipScope已經大幅改變,不少人都不習慣。在ISE中稱爲ChipScope而Vivado中就稱爲in system debug。下面就介紹Vivado中如何使用debug工具。session
Debug分爲3個階段:
1. 探測信號:在設計中標誌想要查看的信號
2. 佈局佈線:給包含了debug IP的設計佈局佈線
3. 分析:上板看信號工具
一 探測信號
探測信號有2種方法一種是直接在HDL源代碼中用(*mark_debug = 「true」*)標識出要探測的信號 另外一種是 在綜合事後的網表文件中添加標誌。佈局
1 .在HDL源代碼中添加標誌url
![點擊圖片可在新窗口打開](http://static.javashuo.com/static/loading.gif)
而後點擊open Synthesized Design.net
![點擊圖片可在新窗口打開](http://static.javashuo.com/static/loading.gif)
而後點擊Tools-> Set Up Debugdebug
![點擊圖片可在新窗口打開](http://static.javashuo.com/static/loading.gif)
點擊 Next設計
![點擊圖片可在新窗口打開](http://static.javashuo.com/static/loading.gif)
點擊Add/Remove Nets3d
![點擊圖片可在新窗口打開](http://static.javashuo.com/static/loading.gif)
點擊find會出來全部信號。若是須要添加debug的信號,從左邊框中選擇所需信號,點擊按 鈕加到右邊來。若是須要去除不須要的debug信號,從右邊框中選擇所需信號,點擊
按鈕就 去除了。選好信號以後,在右下角點擊Ok按鈕。調試
![點擊圖片可在新窗口打開](http://static.javashuo.com/static/loading.gif)
在此框中爲全部debug信號選擇時鐘域,選擇debug信號,右鍵選擇Select Clock Domain。注意每個時鐘域對應一個單獨的ILA 2.0core。blog
![點擊圖片可在新窗口打開](http://static.javashuo.com/static/loading.gif)
在此框中選擇所需時鐘,點擊ok
![點擊圖片可在新窗口打開](http://static.javashuo.com/static/loading.gif)
點擊next
![點擊圖片可在新窗口打開](http://static.javashuo.com/static/loading.gif)
而後繼續下面的Implement 流程
![點擊圖片可在新窗口打開](http://static.javashuo.com/static/loading.gif)
點擊Save保存修改後的工程
![點擊圖片可在新窗口打開](http://static.javashuo.com/static/loading.gif)
後面像之前同樣等工程跑結束。
2.在網表文件中添加標誌
網表文件添加標誌,第一步也是打開綜合後設計。以下圖所示
![點擊圖片可在新窗口打開](http://static.javashuo.com/static/loading.gif)
第二步是打開debug窗口
![點擊圖片可在新窗口打開](http://static.javashuo.com/static/loading.gif)
Open synthesized Design以後,有2種方法來標誌debug信號
(1) 第一種方法是在Netlist窗口中選擇信號,右鍵點擊Mark Debug
![點擊圖片可在新窗口打開](http://static.javashuo.com/static/loading.gif)
(2) 第二種方法是在Tools中選擇Setup Debug 推薦使用此方法
![點擊圖片可在新窗口打開](http://static.javashuo.com/static/loading.gif)
而後和前面同樣繼續跑工程。
二 上板調試
上板的時候選擇Open hardware session ,而後Open a new hardware target
![點擊圖片可在新窗口打開](http://static.javashuo.com/static/loading.gif)
選擇next
![點擊圖片可在新窗口打開](http://static.javashuo.com/static/loading.gif)
選擇next
![點擊圖片可在新窗口打開](http://static.javashuo.com/static/loading.gif)
選擇Next
![點擊圖片可在新窗口打開](http://static.javashuo.com/static/loading.gif)
選擇FPGA來配置文件
![點擊圖片可在新窗口打開](http://static.javashuo.com/static/loading.gif)
注意移到另外一臺電腦看debug信號時,必須將debug_nets.ltx 文件和bit文件一塊兒移過去。以下圖紅框所示
![點擊圖片可在新窗口打開](http://static.javashuo.com/static/loading.gif)
若是須要設置觸發條件,選擇Windows –> Debug Probes
![點擊圖片可在新窗口打開](http://static.javashuo.com/static/loading.gif)
在Debug Probe窗口中選擇須要設置的信號,而後設置觸發條件。在Trigger Pos中能夠設置抓取到觸發信號跳變前N個時鐘週期能夠被抓到
![點擊圖片可在新窗口打開](http://static.javashuo.com/static/loading.gif)