;================================================================================ ; Robert Johnstone ; Simon Fraser University ; ; Last Modified: 2001/05/18 ; ; Copyright 2000 Robert W. Johnstone ;-------------------------------------------------------------------------------- unless( boundp( 'admLibraryName ) warn( "Setting the destination library to default value of ADM" ) admLibraryName = "ADM" ) pcDefinePCell( list( ddGetObj(admLibraryName) "plate_2" "layout" ) ; end of list for first argument ( ( width 100.0 ) ( height 100.0 ) ( use_hole_nom_width t ) ) ; end of parameter list prog( ( pcTechFile pcMetal rodObj p_minWidth p_maxWidth h_minWidth d_minWidth d_maxSpacing poly hole count_x count_y x y w h n ) ; set layer poly = "POLY2" hole = "HOLE2" ; load tech file rules pcTechFile = techGetTechFile( pcCellView ) p_minWidth = techGetSpacingRule( pcTechFile "minWidth" poly ) unless( p_minWidth warn( strcat("minWidth rule for " poly " not set" ) ) ) p_maxWidth = techGetSpacingRule( pcTechFile "maxWidth" poly ) unless( p_maxWidth warn( strcat( "maxWidth rule for " poly " not set" ) ) ) if( use_hole_nom_width then h_minWidth = techGetSpacingRule( pcTechFile "nomWidth" hole ) unless( h_minWidth warn( strcat( "nomWidth rule for " hole " not set" ) ) ) else h_minWidth = techGetSpacingRule( pcTechFile "minWidth" hole ) unless( h_minWidth warn( strcat( "minWidth rule for " hole " not set" ) ) ) ) d_minWidth = techGetSpacingRule( pcTechFile "minWidth" "DIMPLE" ) unless( d_minWidth warn( "minWidth rule for DIMPLE not set" ) ) d_maxSpacing = techGetSpacingRule( pcTechFile "maxSpacing" "DIMPLE" ) unless( d_maxSpacing warn( "maxSpacing rule for DIMPLE not set" ) ) unless( (d_maxSpacing>=p_maxWidth) warn( "DIMPLE maxSpacing is less than the POLY maxWidth" ) ) ; check parameters width = if( (width 1 ) ( count_x = count_x + n - mod( count_x n ) ) ) ) ; iterations in y direction count_y = ceiling( height / p_maxWidth ) cond( ( ( mod( count_y n ) < 1 ) ( count_y = count_y + 1 ) ) ( ( mod( count_y n ) > 1 ) ( count_y = count_y + n - mod( count_x n ) ) ) ) ; create holes for( lp_x 1 count_x-1 x = width * ( 1.0*lp_x /count_x - 0.5 ) for( lp_y 1 count_y-1 y = height * ( 1.0*lp_y /count_y - 0.5 ) dbCreateRect( pcCellView hole list( x-h_minWidth*0.5:y-h_minWidth*0.5 x+h_minWidth*0.5:y+h_minWidth*0.5 ) ) ) ) ; add dimples for( lp_x 0 count_x/n lp_x = lp_x * n x = width * ( (lp_x+0.5)/count_x - 0.5 ) for( lp_y 0 count_y/n lp_y = lp_y * n y = height * ( (lp_y+0.5) / count_y - 0.5 ) dbCreateRect( pcCellView "DIMPLE" list( x-d_minWidth*0.5:y-d_minWidth*0.5 x+d_minWidth*0.5:y+d_minWidth*0.5 ) ) ) ) ; add stretch handles rodObj = rodGetObj( "" pcCellView ) rodAssignHandleToParameter( ?parameter "width" ?rodObj rodObj ?handleName list( "centerLeft" "centerRight" ) ?displayName "width" ?stretchDir "x" ?userFunction lambda( (SPCInfo) SPCInfo->paramVal + 2*SPCInfo->increment ) ) rodAssignHandleToParameter( ?parameter "height" ?rodObj rodObj ?handleName list( "lowerCenter" "upperCenter" ) ?displayName "height" ?stretchDir "y" ?userFunction lambda( (SPCInfo) SPCInfo->paramVal + 2*SPCInfo->increment ) ) ; Create the instNamePrefix property dbReplaceProp( pcCellView "instNamePrefix" "string" "plate" ) ; set version string dbReplaceProp( pcCellView "version" "string" "1.0.1" ) ; body SKILL code returns value t return(t) ) ; end of body-of-SKILL-code prog ) ; ; end of pcDefinePCell