;================================================================================ ; Robert Johnstone ; Simon Fraser University ; ; Copyright 2000,2001,2002 Robert W. Johnstone ;-------------------------------------------------------------------------------- ; 2002/02/21 ; - modified code to use poly and anchor variables instead of hardcoded layers ; - added spring_2 ; 2000/11/29 ; - creation date unless( boundp( 'admLibraryName ) warn( "Setting the destination library to default value of ADM" ) admLibraryName = "ADM" ) pcDefinePCell( list( ddGetObj(admLibraryName) "spring" "layout" ) ; end of list for first argument ( ( width 100.0 ) ( gap 2.0 ) ( bars 5 ) ( include_anchor t ) ( include_poly0 "boolean" nil ) ) ; end of parameter list prog( ; declare variables ( pcTechFile pcShape rodObj p0p_enclosure p_minSpacing p_minWidth p_nomWidth pa_enclosure a_nomWidth poly anchor y w2 path ) ; set layers poly = "POLY1" anchor = "ANCHOR1" ; load tech file rules pcTechFile = techGetTechFile( pcCellView ) p0p_enclosure = techGetOrderedSpacingRule( pcTechFile "minEnclosure" "POLY0" poly ) if( (p0p_enclosure==nil) then warn(strcat( "minEnclosure rule for POLY0->" poly " not set") ) ) p_minSpacing = techGetSpacingRule( pcTechFile "minSpacing" poly ) if( (p_minSpacing==nil) then warn(strcat( "minSpacing rule for " poly " not set") ) ) p_minWidth = techGetSpacingRule( pcTechFile "minWidth" poly ) if( (p_minWidth==nil) then warn(strcat( "minWidth rule for " poly " not set") ) ) p_nomWidth = techGetSpacingRule( pcTechFile "nomWidth" poly ) if( (p_nomWidth==nil) then warn(strcat( "nomWidth rule for " poly " not set") ) ) pa_enclosure = techGetOrderedSpacingRule( pcTechFile "minEnclosure" poly anchor ) if( (pa_enclosure==nil) then warn(strcat( "minEnclosure rule for " poly "->" anchor " not set") ) ) a_nomWidth = techGetSpacingRule( pcTechFile "nomWidth" anchor ) if( (a_nomWidth==nil) then warn(strcat( "nomWidth rule for " anchor " not set") ) ) ; fix parameters gap = if( (gapparamVal + 2*SPCInfo->increment ) ) rodAssignHandleToParameter( ?parameter "bars" ?rodObj rodObj ?handleName "upperCenter" ?displayName "bars" ?stretchDir "y" ?updateIncrement p_minSpacing + gap ?userFunction lambda( (SPCInfo) SPCInfo->paramVal + round(SPCInfo->increment/SPCInfo->userData) ) ?userData p_minWidth + gap ) ; Create the instNamePrefix property dbReplaceProp( pcCellView "instNamePrefix" "string" "spring" ) ; set version string dbReplaceProp( pcCellView "version" "string" "1.3.1" ) ; body SKILL code returns value t return(t) ) ; end of body-of-SKILL-code prog ) ; ; end of pcDefinePCell