/* addPad.il 現在, NELとSYMしか対応してません. */ ;---- May 15 10:20 97 kobayasi 896 ------------------------------------ ;hiCreateSimpleMenu('simpleMenu "sample" '("one" "two" "three") '("println(\"one\n\")" "println(\"two\n\")" "println(\"two\n\")")) ;simpleMenu() ;... addPadMenu ............... May 15 97 kobayasi 547 procedure(addPadMenu() prog(( padctrlmenu cancel processMenu sizeMenu Curprocess labelMenu rep numIO powerSpaceCell gndCell vddCell spaceCell numscell numvcell numgcell llp llpx llpy library gcell vcell pcell scell abrep vendor) rep = geGetWindowCellView(hiGetCurrentWindow()) if(rep~>cellViewType != "schematic" then printf("please executed on schematic view\n") return(nil) ) numIO = 0 if( boundp('process) == nil then printf("process is undefined\n") return(nil) else vendor= case(process ("nel05" "NEL") ("mot15" "MOT") ("symobolic" "SYM") (t "SYM") ) ) processMenu = hiCreateRadioField(?name 'processMenu ?choices '("NEL" "MOT" "SYM") ?prompt "Process" ?value vendor ?defValue vendor ) sizeMenu = hiCreateRadioField(?name 'sizeMenu ?choices '("2.3mm" "4.8mm" "7.2mm") ?prompt "Size" ?value "2.3mm" ?defValue "2.3mm" ) padctrlmenu = hiCreateAppForm( ?name 'padctrlmenu ?formTitle "Adding Pad" ?fields list('processMenu 'sizeMenu) ) if( !hiDisplayForm(padctrlmenu) return(nil) ) foreach( inst rep~>instances if( member("abstract" dbAllCellViews(inst~>master~>lib inst~>cellName)) then abrep = dbOpenCellView(inst~>libName inst~>cellName "abstract" nil "r") if( abrep~>prCellType == "IO" then numIO = numIO + 1 ) ) ) ; ** foreach inst ** printf("number of IO pins are %d\n" numIO) println(processMenu~>value) Curprocess = processMenu~>value size = sizeMenu~>value case( Curprocess ("NEL" library = "nelIO" powerSpaceCell = "Z8XIOCEL_POWER" gndCell = "Z8XVDD0" vddCell = "Z8XGND0" spaceCell = "Z8XIOCEL" case( size ("2.3mm" numpcell = 1 numgcell = 0 numvcell = 0 numIOpin = 28 ) ("4.8mm" numpcell = 0 numgcell = 4 numvcell = 4 numIOpin = 96 ) (t printf("invalid size for %s\n" Curprocess) return(nil) ) ) ; ** case size ** numscell = numIOpin - numIO - numpcell - numgcell - numvcell if( numscell < 0 then printf("number of IO pins exceed limit\n") return(nil) ) ) ("SYM" library = "symbolicIO" powerSpaceCell = "padspacer_s" gndCell = "" vddCell = "" spaceCell = "padspacer" case( size ("2.3mm" numpcell = 1 numgcell = 0 numvcell = 0 numIOpin = 56 ) ( printf("invalid size for %s\n" Curprocess) return(nil) ) ) ; ** case size ** numscell = numIOpin - numIO - numpcell - numgcell - numvcell if( numscell < 0 then printf("number of IO pins exceed limit\n") return(nil) ) ) (t printf("invalid process\n") ) ) ; ** case process ** llpx = nth(0 nth(0 rep~>bBox)) llpy = nth(1 nth(0 rep~>bBox)) - 1 if( numpcell > 0 then pcell = dbOpenCellView(library powerSpaceCell "symbol" nil "r") dbCreateInst(rep pcell nil list(llpx llpy) "R0" numpcell) llpx = llpx + 1.0 ) if( numgcell > 0 then gcell = dbOpenCellView(library gndCell "symbol" nil "r") dbCreateInst(rep gcell nil list(llpx llpy) "R0" numgcell) llpx = llpx + 1.0 ) if( numvcell > 0 then vcell = dbOpenCellView(library vddCell "symbol" nil "r") dbCreateInst(rep vcell nil list(llpx llpy) "R0" numvcell) llpx = llpx + 1.0 ) if( numscell > 0 then scell = dbOpenCellView(library spaceCell "symbol" nil "r") dbCreateInst(rep scell nil list(llpx llpy) "R0" numscell) llpx = llpx + 1.0 ) ) ; ** prog ** ) ; ** procedure ** ;addPadMenu() ;hiSetBindKey("Schematics" "t" "addPadMenu()")