2022年7月28日 星期四

修復 short routing nets

 
當做完 routing 後,可用 verify_lvs 指令檢查是否有 open / short 錯誤。當發生 short 錯誤時,可將發生 short 的 routing net 刪除,並且用 route_zrt_eco 指令重新進行繞線。若有多條 nets 發生 short 可一次處理,可用以下指令。

set short_nets [list net0 net1 net2 net3]
remove_net_routing $short_nets
route_zrt_eco -nets $short_nets -reroute modified_nets_only

如果發生 short 的 net 是 power net,不可將其刪除,只要刪除 signal net 就好。修復 open / short 時有可能會產生其它的 timing violations,必須再次進行檢查,直到 short 和 timing violation 全部都修復為止。

修復 max capacitance / max transition time violations

 

繞線時走線太遠,或是 cell output 驅動的負載太大,都會產生 max capacitance 與 max transition time violations,修復方法是在這些 routing nets 上插入 buffer。

insert_buffer [get_nets net0] BUFFD0BWP40

一開始先使用較小 size 的 buffer,若還是有 violations,則在新產生的 net 上面再插入較大 size 的 buffer。

insert_buffer [get_nets eco_net] BUFFD2BWP40

插入 buffer 後可用 report_constraint -all 指令再次確認是否有解決 violations。若仍未解決,可加入更大 size 的 buffer。若解決了,就用以下指令將插入的 buffer 進行適當的 placement,並進行繞線。

legalize_placement -cells [get_cells {eco_cell_0 eco_cell_1}]
route_zrt_eco -reroute modified_nets_only

完成後要記得將這些新加入的 buffer 連接上 VDD/VSS。

derive_pg_connection -power_net $DGZ_POWER -ground_net $DGZ_GROUND -power_pin $DGZ_POWER -ground_pin $DGZ_GROUND

2022年7月21日 星期四

將 APR 後的 gds 檔和 memory 及 analog macro 的 gds 合併

做完 APR 以後,產出的 gds 檔中沒有 memory 和 analog macro 的 layout,需要將這些 macro 的 layout 進行合併,可使用以下指令。

calibredrv -a layout filemerge -smartdiff -rename -preserve merge_filterfile\
    -in top_apr.gds \
    -in memory.gds \
    -in analog_macro.gds \
    -out top_apr_merge.gds \
    -topcell top_apr

-smartdiff
由於在不同的 gds 中可能存在相同名稱的 cell,當合併時會造成某些 cell 被覆蓋掉,加上這個選項,就可以自動辨別 cell 的內容,當 cell 內容不同時會自動重新命名。

-in
定義要被合併的 gds 路徑與檔名。

-out
定義輸出的 gds 的路徑與檔名。

-topcell
指定 top cell 的名稱。

-preserve
在 -preserve 後面的 merge_filterfile 是一個檔案,其內容如下:

analog_macro.gds    analog_macro_module_name  -nohier
memory.gds             memory_module_name            -nohier

由於在原本 APR 後產生的 memory 和 analog macro 要用真實的 layout 換掉,因此在 merge_filter_file 中定義 analog_macro.gds 和 memory.gds 是合併後保留的。

-nohier 表示只有 analog_macro 的最上層 hierarchy 會被強制保留,其它內容還是會透過 smartdiff 進行比對,決定是否需要重新命名。如果沒有加上 -nohier,會造成 memory.gds 或 analog_macro.gds 中的 cell 可能把 top_apr.gds 裡面同名的 cell 覆蓋掉。


將 gate level netlist 轉成 LVS 用的 spice netlist

 

v2lvs -64 -i \
    -v top_apr.v \
    -v memory.v \
    -lsr standard_cell_library.spi \
    -lsr io_cell_library.spi \
    -lsr memory.spi \
    -lsr analog_macro.sp \
    -s standard_cell_library.spi \
    -s io_cell_library.spi \
    -s memory.spi \
    -s analog_macro.sp \
    -o top_apr.sp

-v            將 top module、memory 的 verilog code 加入
-lsr          將 standard cell library、io cell library、memory 和 analog macro 的 spice netlist 加入
-s            在產生的 spice netlist 的一開頭加入 .include 的指令,把需要的檔案引入
-o            定義輸出檔案名稱

如何使 Virtuoso 產生的 netlist pin order 符合 library 中的順序

 

做完 Automatic Placement & Routing (APR) 後,要產生 netlist 進行 LVS。

如果 IC 內部有 analog macro,analog macro 中也有用到 standard cell 的話,可能會發現 virtuoso 轉出的 netlist 中的 pin order 和 standard cell library 中的定義不一致。 

解決方式為:

1. 在執行 virtuoso 的目錄下建立一個名為 .simrc 的檔案

2. 在檔案中加入以下文字 auCdlCDFPinCntrl=t


2021年10月31日 星期日

登山紀錄

 小百岳

[新北] 基隆山 588m

[桃園] 大棟山 405m

[桃園] 石門山 551m

[新竹] 十八尖山 130m

[新竹] 飛鳳山 423m

[新竹] 鵝公髻山 1,579m

[苗栗] 火炎山 596m

[苗栗] 哈堪尼山加里山縱走 2,220m

[高雄] 大社觀音山 177m

其它

[新竹] 觀霧國家森林遊樂區

        榛山步道

        雲霧步道

        觀霧瀑布步道

        檜山巨木群步道

[新竹] 九芎湖步道

[新竹] 五指山橫向登山步道 856m

[新竹] 獅山古道 492m

[台中] 鳶嘴山 2,180m

[台南] 糖子恩山 642m

[高雄] 半屏山 181m


2021年7月31日 星期六

開源IC設計工具

 

Verilog Simulation

安裝 Icarus:         sudo apt-get install iverilog

安裝 GTKWave: sudo apt-get install gtkwave

使用方式:

1. 編譯:                           iverilog -o out test.v

                                           iverilog -o out -s top_module -c file_list.txt

                                           iverilog -o out test.v -Dmacro=value

2. 模擬與產生波形檔:   vvp -n out -lxt2

3. 開啟波形檔:               gtkwave wave.vcd &

testbench 中需加入以下指令以產生波形檔

initial begin

    $dumpfile("wave.vcd");

    $dumpvars;

end