DFTug - Getting Started(上篇)
引言
本篇將從DFTug的第六章Getting Started進(jìn)行介紹從而熟悉DFT的基本流程。本篇博客是對(duì)DFTug的一個(gè)總結(jié)概括,所以總結(jié)出來(lái)的命令是希望背下來(lái)的。
Setting Up Your Design Environment
首先,下面的幾個(gè)SNPS的系統(tǒng)參數(shù)變量需要你在環(huán)境中定義。
link_library: 用于resolve 你的cell。
target_library:一般來(lái)說(shuō)與link_library是相同的,除非你想translatng a design between technologies。
symbol_library: cell的圖形
search_path:搜索的路徑列表
hdlin_enable_rtldrc_info: Reports file names and line numbers associated with each violation during test design ruled checking. This makes it easier fr you to later edit the source code and fix violations.
For example:
# configuration logic libraries set_app_var target_library {my_library.db} set_app_var link_library {* my_library.db} set_app_var hdlin_enable_rtldrc_info true上面例子中,其實(shí)應(yīng)該不熟悉的只有hdlin_enable_rtldrc_info了,查看syn3手冊(cè),解釋如下:
官方的意思,我個(gè)人理解的應(yīng)該是:開(kāi)啟了這個(gè)后,當(dāng)我們使用dft_drc的時(shí)候,如果有violation,會(huì)定位到HDL code的行號(hào),該選項(xiàng)默認(rèn)是關(guān)閉的,所以官方的建議是打開(kāi)。
Read In Your Design
接下來(lái)就是讀入你的設(shè)計(jì),
讀取設(shè)計(jì)有三個(gè)命令:read_ddc, read_verilog, read_vhdl(verilog是我在項(xiàng)目中見(jiàn)過(guò)最多的)
dc_shell> read_verilog {my_design.v my_block.v}
dc_shell> current_design my_design
dc_shell> link
dc_shell> read_sdc top_constraints.sdc
Setting Scan Style
SNPS提供了下面四種style,其中第一種mux FF是最常用的一種,后面三種,待有機(jī)會(huì),我會(huì)再來(lái)理解。
如下cmd是默認(rèn)mux style。
Configuring te Test Cycle Timing
設(shè)置下面的測(cè)試時(shí)間變量需要詢(xún)問(wèn)半導(dǎo)體廠(chǎng)商,默認(rèn)為下面的設(shè)置值:
dc_shell> set_app_var test_default_delay 0 dc_shell> set_app_var test_default_bidir_delay 0 dc_shell> set_app_var test_default_strobe 40 dc_shell> set_app_var test_default_period 100Define the DFT Signals
設(shè)置DFT signals 的view有兩種,一種是-view existing_dft .。另外一種是,-view spec。二者的區(qū)別,初學(xué)者可能并不能真正理解,existing_dft是不會(huì)在dft_insert階段做make connection的動(dòng)作(比如時(shí)鐘信號(hào)、復(fù)位信號(hào)),而-view spec是會(huì)做make connection的動(dòng)作(比如 scan_enbale信號(hào)),這是二者的本質(zhì)區(qū)別。
dc_shell> set_dft_signal -view existing_dft -type ScanClock dc_shell> set_dft_signal -view existing_dft -type Reset -active_state 0dc_shell> set_dft_signal -view spec -type ScanEnable -port scan_enbale_port -active_state 1即使,你是用已經(jīng)存在的ports作為Scan_in和Scan_out仍然要使用-view spec的認(rèn)知,因?yàn)樵赾hain上內(nèi)部是還沒(méi)有連接的。這里我把-view翻譯為“認(rèn)知”。
dc_shell> set_dft_sgnal -view spec -type ScanDataIn -port DAT_IN[7] dc_shell> set_dft_signal -view spec -type ScanDataOut -port DAT_OUT[7] dc_shell> set_dft_signal -view spec -type ScanDataIn -port TEST_SI dc_shell> set_dft_signal -view spec -type ScanDataOut -port TEST_SO dc_shell> set_dft_signal -view spec -type ScanEnable -port TEST_SEConfiguring Scan Insertion
為了配置scan insertion,你可以指定test ports,define test modes, adn identify and mark any cells taht you do not want to have scaned.
dc_shell> set_scan_configuration -chain_count 4接下來(lái),你需要?jiǎng)?chuàng)建測(cè)試協(xié)議,即使你是讀入了一個(gè)test_protocol,你也需要再create一下。
dc_shell> create_test_protocol然后run pre-DFT test DRC
dc_shell> dft_drcPreview Scan Insertion
dc_shell> preview_dftPerforming Post-DFT Optimization
默認(rèn)情況下,在wire load mode中,insert_dft會(huì)自動(dòng)的執(zhí)行基本的門(mén)級(jí)優(yōu)化,但建議是關(guān)掉他,某視頻里面說(shuō)他做優(yōu)化做的并不好。
dc_shell> set_dft_insertion_configuration -synthesis_optimization none但是在topographical mode下,inser_dft是不會(huì)執(zhí)行post-DFT optimization的。
Inserting the DFT Logic
dc_shell> insert_dftAnalyzing Your Post-DFT Design
dc_shell> dft_drc該過(guò)程稱(chēng)之為post_DFT DRC ,DFTC會(huì)檢查設(shè)計(jì)測(cè)試的潛在問(wèn)題。這個(gè)檢查機(jī)制會(huì)比pre-DFT更加復(fù)雜。they check for the correct operation of the scan chain.
dc_shell> write -formate ddc -hierarchy -output my_design.ddc dc_shell> write_test_protocol -output my_design_final.spf但是有一些錯(cuò)誤是不支持DRC的,因此只能在TMAX中來(lái)報(bào)錯(cuò)出來(lái)。
Reporting
接下來(lái)就是查看report,查看report是一向非常重要的技能。
dc_shell> report_scan_path -view existing_dft -chain all dc_shell> report_scan_path -view existing_dft -cell all#DFT Configuration Report
dc_shell> report_dft_configuration
#Scan Configuration Report
dc_shell> report_scan_configuration
#DFT Signal Report
dc_shell> report_dft_signal -view existing_dft
dc_shell>report_dft_signal -view spec
#Report on a user-specified scan path
dc_shell> report_scan_path -view spec -chain all
#autofix configuration report
dc_shell> report_autofix_configuration
本節(jié)腳本匯總,加強(qiáng)記憶
set_app_var target_library { xx.db} set_app_var link_library {xx.db} set_app_var hdlin_enable_rtldrc_info trueset_app_var test_default_delay 0 set_app_var test_default_bidir_delay 0 set_app_var test_default_strobe 40 set_app_var test_default_period 100set_dft_signal -view existing_dft -type ScanClock set_dft_signal -view existing_dft -type Reset -active_state 0 set_dft_signal -view spec -type ScanDataIn -port DAT_IN[7] set_dft_signal -view spec -type ScanDataOut -port DAT_OUT[7]set_scan_configuration -style multiplexed_flip_flop set_scan_configuration -chain_count 4 set_dft_insertion_configuration -synthesis_optimization none set_dft_configuration -clock_mix mix_clocks set_dft_configuration -clock_mix mix_edges create_test_protocoldft_drcpreview_dftinsert_dftdft_drcwrite -formate ddc -hierarchy -output my_design.ddc write -formate verilog -hierarchy -output my_design.v write_test_protocol -output my_design_final.spf report_scan_path -view existing_dft -chain all report_scan_path -view exisiting_dft -cell allreport_dft_configuration report_scan_configuration report_dft_signal -view existing_dft report_dft_signal -view spec report_scan_path -view spec -chain all report_autofix_configuration如何查看報(bào)告
preview_dft -show后面有幾個(gè)比較好用的選項(xiàng),需要背下來(lái)。
preview_dft -show scan_clocks
參考
DFTug 第六章 p103-p121
可以結(jié)合axr的第一個(gè)lab記錄進(jìn)行對(duì)比鞏固。
https://blog.csdn.net/ciscomonkey/article/details/110942075
https://blog.csdn.net/ciscomonkey/article/details/112221279
總結(jié)
以上是生活随笔為你收集整理的DFTug - Getting Started(上篇)的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 如何理解ScanDef的概念
- 下一篇: DFTug - Getting Star