Programming 언어/Skill

[SKILL] 원클릭으로 export_gds 하기

호드맨 2017. 1. 4. 23:59

블로그 포스팅하면서 가장 인기 있었던 시리즈의 강좌 글이 아니었나 싶다. (확인해보니 두 번째.) 이 강좌 글들로 인해 질문도 많이 받았고, 글을 보고 성공했다는 분들도 있어서 개인적으로도 뿌듯하다. 몇 년간 더 발전된 코딩으로 업그레이드된 버전의 원클릭으로 ~~ 하기를 올리기 전에 예전에 올렸던 글들을 티스토리 최신 에디터로 서식을 바꾸고 있다. 예전 게 좋네 최신 게 좋네 말들이 많은데 개인적으로는 최신 것이 더 깔끔해 보인다.

 

이 강좌의 최종 목적은 calibre DRC, LVS를 Virtuoso 환경에서 원클릭으로 진행하도록 해보는 것이었다. DRC 과정에서는 필요 없지만 LVS에서 필요한 export_cdl를 만들었었고, 함께 사용할 export_gds를 작성했었다. 지금은 특정 이유로 많이 변경되었지만 예전 버전 그대로 작성해 본다.

 

procedure(export_gds()
   prog(()
      cv=hiGetCurrentWindow()->cellView
      ipcProcess=ipcBeginProcess(sprintf(_tmp, "strmout -library \"%s\" -strmFile ../VERIFY/GDS/%s.gds -topCell \"%s\" -view \"%s\" -logFile ../VERIFY/GDS/PIPO.log",
                 cv->libName, cv->cellName, cv->cellName, cv->viewName))
    )
)

IC6버전 이후에 잘 동작하고, string 부분이 길지만 간단히 현재 library, cell, view의 정보를 "../VERIFY/GDS" 경로에 추출하는 것이다. 별다른 옵션을 지정하지 않았고, 기존에 사용했던 옵션 값을 그대로 가져오기 때문에 GUI를 사용해서 옵션에 손을 댔다면 원하지 않는 결괏값을 낼 때도 있었다. 이걸 만들고는 대부분 SKILL을 이용해 추출했기 때문에 문제는 없었지만 나중에 다른 옵션을 사용할 일이 많아져서 큰 수정을 하였다. 그리고 IC5141 사용하는 분을 위해 예전 버전의 코드도 올렸는데 몇 년이 지난 지금도 구버전을 쓰는 분은 없겠지만 추억 삼아 올려본다.

 

_RUNDIR=getWorkingDir()

cv=getCurrentWindow()->cellView
outPort=outfile(sprintf(_tmp, "../verify/gds/strmoutKey"))

fprintf(outPort, "streamOutKeys = list(nil\n")
fprintf(outPort, " 'dumpPcellInfo t\n")
fprintf(outPort, " 'userSkillFile \"\"\n")
fprintf(outPort, " 'layerTable \"\"\n")
fprintf(outPort, " 'convertPin \"geometry\"\n")
fprintf(outPort, " 'libVersion \"5.0\"\n")
fprintf(outPort, " 'units \"micron\"\n")
fprintf(outPort, " 'scale 0.001\n")
fprintf(outPort, " 'cellMapTable \"\"\n")
fprintf(outPort, " 'caseSensitivity \"preserve\"\n")
fprintf(outPort, " 'errFile \"PIPO.LOG.%s\"\n", cv->cellName)
fprintf(outPort, " 'outFile \"%s.calibre.db\"\n", cv->cellName)
fprintf(outPort, " 'viewName \"layout\"\n")
fprintf(outPort, " 'primaryCell \"%s\"\n", cv->cellName)
fprintf(outPort, " 'libName \"%s\"\n", cv->libName)
fprintf(outPort, " 'runDir \"%s/../verify/gds\"\n", _RUNDIR, cv->cellName)
fprintf(outPort, ")")

close(outPort)
ipcProcess=ipcBeginProcess(sprintf(_tmp, "\"pipo strmout %s/../verify/gds/strmoutKey\"", _RUNDIR))

최신 버전도 명령어만 바꾸면 비슷한 방식으로 사용 가능한데, strmoutKey라는 template 파일을 작성하고, 그 파일을 실행시키는 방법이다. 여러 옵션을 수정하기에는 이 방식이 더 유용하다. 앞으로 작성할 최신 버전은 이런 방식이 들어가 있다. 참고해 두어도 좋은 방식이다.