| |||
本文作者:YEUNGCHIE
本文连接:https://www.cnblogs.com/yeungchie/p/13144402.html
## code
```
procedure(ycTechLibToDesign(libName attachLibName)
prog((libId techId attachLibId attachTechId)
unless(libId = ddGetObj(libName)
error("Could not access library %s\n" libName)
)
techId = techGetTechFile(libId)
unless(techId~>libName == libName
error("Library is already attached to tech library %s\n" techId~>libName)
)
unless(attachLibId = ddGetObj(attachLibName)
error("Could not access library %s\n" attachLibName)
)
attachTechId = techGetTechFile(attachLibId)
techDeleteTechFile(techId)
techBindTechFile(libId attachTechId~>libName attachTechId~>fileName)
return(t)
)
)
```
## describe
```
ycTechLibToDesign(t_libName t_attachLibName)
```
将被识别成 Technology Library 的 t_libName 库 Attach 到 t_attachLibName 上。
这会让 t_libName 重新识别为 Design Library 。
## example
```
ycTechLibToDesign("project_layout" "pdk_library")
=>t
```