RT
刚开始学习SKILL,借鉴一个脚本想实现去掉交叉金属线多余部分并自动打孔(该脚本为IC51版本,想通过修改相关函数来达到目的)
目前卡在了两个地方
1:在图形界面实现菜单,查阅Cadence Help发现可以在hicreateAPPForm/hiCreateStringField后接入hiContextMenu实现,但是没有接触过脚本语言,对语法嵌套比较陌生,不知道怎么写
2:脚本中的 Via 关联到tf文件;通过填入过孔名称的方式来打孔,CIW报错提示:*Error* dbCreateVia: argument #2 should be a database object (type template = "ddltg") at line 222 of file "~/test.il" - "M1_M2"
?name 'M1M2ContactTypeGUI
?prompt "M1_M2 Contact Type"
?defValue "M1_M2" ;contact cype must be same as PDK name
?callback "hiGetCurrentForm()"
?editable t
)
M2MTTContactTypeGUI=hiCreateStringField(
?name 'M2MTTContactTypeGUI
?prompt "M2_MTT Contact Type"
?defValue "M2_MTT" ;contact type must be same as PDK name
?callback "hiGetCurrentForm()"
?editable t
)
WidthViaGUI=hiCreateFloatField(
?name 'WidthViaGUI
?prompt "Width of Via"
?defValue 0.1 ;default
?callback "hiGetCurrentForm()"
?editable t
)
LengthViaGUI=hiCreateFloatField(
?name 'LengthViaGUI
?prompt "Length of Via"
?defValue 0.1 ;default
?callback "hiGetCurrentForm()"
?editable t
)
XViaSpaceGUI=hiCreateFloatField(
?name 'XViaSpaceGUI
?prompt "X Via Space"
?defValue 0.13 ;default
?callback "hiGetCurrentForm()"
?editable t
)
YViaSpaceGUI=hiCreateFloatField(
?name 'YViaSpaceGUI
?prompt "Y Via Space"
?defValue 0.13 ;default
?callback "hiGetCurrentForm()"
?editable t
if((objectA~>purpose=="drawing"&&objectB~>purpose=="drawing")!=t
then
JWMessage("Error!!!" 'Close "Incorrect Layer,Create Contact Failed!")
)
/*
if((widthA>=0.16&&widthB>=0.16)!=t
then
JWMessage("Warning!!!" 'Close "The metal width is too small")
)
*/
?name 'M1M2ContactTypeGUI
?prompt "M1_M2 Contact Type"
?defValue "M1_M2" ;contact cype must be same as PDK name
?callback "hiGetCurrentForm()"
?editable t
)
M2MTTContactTypeGUI=hiCreateStringField(
?name 'M2MTTContactTypeGUI
?prompt "M2_MTT Contact Type"
?defValue "M2_MTT" ;contact type must be same as PDK name
?callback "hiGetCurrentForm()"
?editable t
)
WidthViaGUI=hiCreateFloatField(
?name 'WidthViaGUI
?prompt "Width of Via"
?defValue 0.1 ;default
?callback "hiGetCurrentForm()"
?editable t
)
LengthViaGUI=hiCreateFloatField(
?name 'LengthViaGUI
?prompt "Length of Via"
?defValue 0.1 ;default
?callback "hiGetCurrentForm()"
?editable t
)
XViaSpaceGUI=hiCreateFloatField(
?name 'XViaSpaceGUI
?prompt "X Via Space"
?defValue 0.13 ;default
?callback "hiGetCurrentForm()"
?editable t
)
YViaSpaceGUI=hiCreateFloatField(
?name 'YViaSpaceGUI
?prompt "Y Via Space"
?defValue 0.13 ;default
?callback "hiGetCurrentForm()"
?editable t
if((objectA~>purpose=="drawing"&&objectB~>purpose=="drawing")!=t
then
JWMessage("Error!!!" 'Close "Incorrect Layer,Create Contact Failed!")
)
/*
if((widthA>=0.16&&widthB>=0.16)!=t
then
JWMessage("Warning!!!" 'Close "The metal width is too small")
)
*/