예전 작성했던 글중 인기 많았던 씨리즈(?)인 원클릭으로 LVS 돌리는 방법이다. 역시나 몇 년이나 지난 만큼 최근 사용하는 코드는 많이 업그레이드 되었지만, 기록 차원에서 남겨둔다. 새로운 강좌글을 작성할 때 기초 단계 정도로 참고할 수 있을 것 같다. 방식은 export GDS, CDL 등과 유사하다. template 파일을 작성하고 ipc (inter process communicate)를 통해 calibre LVS를 실행하게 된다.
procedure(run_lvs()
prog(()
cv=hiGetCurrentWindow()->cellView
_RUNDIR=getWorkingDir()
ipcProcess=ipcBeginProcess(sprintf(_tmp, "mkdir %s/../VERIFY/LVS/%s", _RUNDIR cv->cellName))
out_file1=outfile(sprintf(_tmp "%s/../VERIFY/LVS/%s/_source.net_" _RUNDIR cv->cellName))
fprintf(out_file1 ".INCLUDE \"%s/../VERIFY/RULE/source_added\"\n" _RUNDIR)
fprintf(out_file1 ".INCLUDE \"%s/../VERIFY/NET/%s.net\"\n" _RUNDIR cv->cellName)
close(out_file1)
out_file2=outfile(sprintf(_tmp "%s/../VERIFY/LVS/%s/_calibre.lvs_" _RUNDIR cv->cellName))
fprintf(out_file2 "LAYOUT PATH \"%s/../VERIFY/GDS/%s.gds\"\n" _RUNDIR cv->cellName)
fprintf(out_file2 "LAYOUT PRIMARY \"%s\"\n" cv->cellName)
fprintf(out_file2 "LAYOUT SYSTEM GDSII\n")
fprintf(out_file2 "\n")
fprintf(out_file2 "SOURCE PATH \"%s/../VERIFY/LVS/%s/_source.net_\"\n" _RUNDIR cv->cellName)
fprintf(out_file2 "SOURCE PRIMARY \"%s\"\n" cv->cellName)
fprintf(out_file2 "SOURCE SYSTEM SPICE\n")
fprintf(out_file2 "\n")
fprintf(out_file2 "MASK SVDB DIRECTORY \"svdb\" QUERY\n")
fprintf(out_file2 "\n")
fprintf(out_file2 "LVS REPORT \"%s.lvs.report\"\n" cv->cellName)
fprintf(out_file2 "\n")
fprintf(out_file2 "LVS REPORT OPTION NONE\n")
fprintf(out_file2 "LVS FILTER UNUSED OPTION NONE SOURCE\n")
fprintf(out_file2 "LVS FILTER UNUSED OPTION NONE LAYOUT\n")
fprintf(out_file2 "LVS REPORT MAXIMUM 50\n")
fprintf(out_file2 "LVS POWER NAME \"VDDA\" \"VDD\"\n")
fprintf(out_file2 "\n")
fprintf(out_file2 "LVS GROUND NAME\n")
fprintf(out_file2 " \"VSSA\"\n")
fprintf(out_file2 " \"VSS\"\n")
fprintf(out_file2 "\n")
fprintf(out_file2 "\n")
fprintf(out_file2 "LVS RECOGNIZE GATES ALL\n")
fprintf(out_file2 "\n")
fprintf(out_file2 "\n")
fprintf(out_file2 "LVS ABORT ON SOFTCHK NO\n")
fprintf(out_file2 "LVS ABORT ON SUPPLY ERROR YES\n")
fprintf(out_file2 "LVS IGNORE PORTS NO\n")
fprintf(out_file2 "LVS SHOW SEED PROMOTIONS NO\n")
fprintf(out_file2 "LVS SHOW SEED PROMOTIONS MAXIMUM 50\n")
fprintf(out_file2 "\n")
fprintf(out_file2 "LVS ISOLATE SHORTS NO\n")
fprintf(out_file2 "\n")
fprintf(out_file2 "\n")
fprintf(out_file2 "VIRTUAL CONNECT COLON YES\n")
fprintf(out_file2 "VIRTUAL CONNECT REPORT NO\n")
fprintf(out_file2 "LVS EXECUTE ERC YES\n")
fprintf(out_file2 "ERC RESULTS DATABASE \"%s.erc.results\"\n" cv->cellName)
fprintf(out_file2 "ERC SUMMARY REPORT \"%s.erc.summary\" REPLACE HIER\n" cv->cellName)
fprintf(out_file2 "ERC MAXIMUM RESULTS 1000\n")
fprintf(out_file2 "ERC MAXIMUM VERTEX 4096\n")
fprintf(out_file2 "\n")
fprintf(out_file2 "DRC ICSTATION YES\n")
fprintf(out_file2 "\n")
fprintf(out_file2 "\n")
fprintf(out_file2 "INCLUDE \"%s/../VERIFY/RULE/calibre.lvs\"\n" _RUNDIR)
close(out_file2)
ipcProcess=ipcBeginProcess(sprintf(_tmp, "cd %s/../VERIFY/LVS/%s ; calibre -lvs -hier -turbo -turbo_litho -hyper -nowait %s/../VERIFY/LVS/%s/_calibre.lvs_", _RUNDIR cv->cellName _RUNDIR cv->cellName))
ipcWait(ipcProcess)
ipcProcess=ipcBeginProcess(sprintf(_tmp, "calibre -rve -lvs %s/../VERIFY/LVS/%s/svdb", _RUNDIR, cv->cellName))
)
)
ipcWait 를 걸게 되면 virtuoso 환경이 해당 기능이 종료될 때까지 멈추게 된다. 작은 Block 이라면 금방 끝나겠지만, 오래 걸릴 경우 비효율적이 되어 최근에는 touch 기능을 이용하도록 변경하였다. 최신 방법으로 작성하는 것은 새로운 포스팅을 조금만 기다려 주시길.
'Programming 언어 > Skill' 카테고리의 다른 글
[SKILL 강좌] calculate_area : 1. gui 설정과 reload 함수 (0) | 2017.01.11 |
---|---|
[SKILL] 원클릭으로 LPE를 추출해보자 (1) | 2017.01.09 |
[SKILL] 원클릭으로 DRC 돌리기 (2) | 2017.01.05 |
[SKILL] 원클릭으로 export_gds 하기 (0) | 2017.01.04 |
[SKILL] path, rectangular 의 center point 찾기 (0) | 2017.01.03 |