;================================================================================ ; Robert Johnstone ; Simon Fraser University ; ; Copyright 2001,2002 Robert W. Johnstone ;-------------------------------------------------------------------------------- ; 2002/02/22 ; - removed parameter dimples ; - dimple spacing now calculated from techfile DIMPLE maxSpacing rule ; - modified code to use poly and anchor variables ; - layers are no longer hard coded ; - created suspension_crab_2 ; 2001/01/08 ; - creation date unless( boundp( 'admLibraryName ) warn( "Setting the destination library to default value of ADM" ) admLibraryName = "ADM" ) pcDefinePCell( list( ddGetObj(admLibraryName) "suspension_crab" "layout" ) ; end of list for first argument ( ( length 100.0 ) ( spacing 10.0 ) ( shuttle_length 50.0 ) ( shuttle_width 12.0 ) ( truss_length 10.0 ) ( truss_width 5.0 ) ( yoke_length 35.0 ) ( yoke_width 5.0 ) ( anchor_width 0.0 ) ( include_poly0 t ) ) ; end of parameter list prog( let( hub_i hub_o dimples poly anchor p0p_enclosure p_minWidth p_nomSpacing p_nomWidth pa_enclosure pd_enclosure a_nomWidth d_nomWidth d_maxSpacing ) poly = "POLY1" anchor = "ANCHOR1" ; load tech file rules pcTechFile = techGetTechFile( pcCellView ) p0p_enclosure = techGetOrderedSpacingRule( pcTechFile "minEnclosure" "POLY0" poly ) unless( p0p_enclosure warn(strcat( "minEnclosure rule for POLY0->" poly " not set" ) ) ) p_minWidth = techGetSpacingRule( pcTechFile "minWidth" poly ) unless( p_minWidth warn(strcat( "minWidth rule for " poly " not set") ) ) p_nomSpacing = techGetSpacingRule( pcTechFile "nomSpacing" poly ) unless( p_nomSpacing warn(strcat( "nomSpacing rule for " poly " not set") ) ) p_nomWidth = techGetSpacingRule( pcTechFile "nomWidth" poly ) unless( p_nomWidth warn(strcat( "nomWidth rule for " poly " not set") ) ) pa_enclosure = techGetOrderedSpacingRule( pcTechFile "minEnclosure" poly anchor ) unless( pa_enclosure warn(strcat( "minEnclosure rule for " poly "->" anchor " not set") ) ) pd_enclosure = techGetOrderedSpacingRule( pcTechFile "minEnclosure" poly "DIMPLE" ) unless( pd_enclosure warn(strcat( "minEnclosure rule for " poly "->DIMPLE not set") ) ) a_nomWidth = techGetSpacingRule( pcTechFile "nomWidth" anchor ) unless( a_nomWidth warn(strcat( "nomWidth rule for " anchor " not set") ) ) d_nomWidth = techGetSpacingRule( pcTechFile "nomWidth" "DIMPLE" ) unless( d_nomWidth warn("nomWidth rule for DIMPLE not set") ) d_maxSpacing = techGetSpacingRule( pcTechFile "maxSpacing" "DIMPLE" ) unless( d_maxSpacing warn("maxSpacing rule for DIMPLE not set") ) ; check parameters shuttle_width = if( (shuttle_widthanchor_width) a_nomWidth+2*pa_enclosure anchor_width ) ; to ease latter calculations dimples = ceiling( shuttle_length / d_maxSpacing ) + 1 shuttle_width = shuttle_width*0.5 shuttle_length = shuttle_length*0.5 ; create shuttle and yokes dbCreatePolygon( pcCellView poly list( yoke_length*0.5:shuttle_length yoke_length*0.5:shuttle_length-yoke_width shuttle_width:shuttle_length-yoke_width shuttle_width:-shuttle_length+yoke_width yoke_length*0.5:-shuttle_length+yoke_width yoke_length*0.5:-shuttle_length -yoke_length*0.5:-shuttle_length -yoke_length*0.5:-shuttle_length+yoke_width -shuttle_width:-shuttle_length+yoke_width -shuttle_width:shuttle_length-yoke_width -yoke_length*0.5:shuttle_length-yoke_width -yoke_length*0.5:shuttle_length ) ) ; create bars tmpx = shuttle_width tmpx2 = shuttle_width + length tmpy = spacing*0.5 tmpy2 = spacing*0.5 + p_minWidth dbCreateRect( pcCellView poly list( -tmpx:-tmpy -tmpx2:-tmpy2 ) ) dbCreateRect( pcCellView poly list( -tmpx:tmpy -tmpx2:tmpy2 ) ) dbCreateRect( pcCellView poly list( tmpx:-tmpy tmpx2:-tmpy2 ) ) dbCreateRect( pcCellView poly list( tmpx:tmpy tmpx2:tmpy2 ) ) tmpx = tmpx2 tmpx2 = tmpx+truss_width tmpy2 = tmpy + p_minWidth + truss_length dbCreateRect( pcCellView poly list( -tmpx:-tmpy -tmpx2:-tmpy2 ) ) dbCreateRect( pcCellView poly list( -tmpx:tmpy -tmpx2:tmpy2 ) ) dbCreateRect( pcCellView poly list( tmpx:-tmpy tmpx2:-tmpy2 ) ) dbCreateRect( pcCellView poly list( tmpx:tmpy tmpx2:tmpy2 ) ) ; create anchors tmpx = tmpx - pa_enclosure tmpx2 = tmpx2 + pa_enclosure tmpy = tmpy2 tmpy2 = tmpy + anchor_width dbCreateRect( pcCellView poly list( -tmpx:-tmpy -tmpx2:-tmpy2 ) ) dbCreateRect( pcCellView poly list( -tmpx:tmpy -tmpx2:tmpy2 ) ) dbCreateRect( pcCellView poly list( tmpx:-tmpy tmpx2:-tmpy2 ) ) dbCreateRect( pcCellView poly list( tmpx:tmpy tmpx2:tmpy2 ) ) tmpx = tmpx + pa_enclosure tmpx2 = tmpx2 - pa_enclosure tmpy = tmpy + pa_enclosure tmpy2 = tmpy2 - pa_enclosure dbCreateRect( pcCellView anchor list( -tmpx:-tmpy -tmpx2:-tmpy2 ) ) dbCreateRect( pcCellView anchor list( -tmpx:tmpy -tmpx2:tmpy2 ) ) dbCreateRect( pcCellView anchor list( tmpx:-tmpy tmpx2:-tmpy2 ) ) dbCreateRect( pcCellView anchor list( tmpx:tmpy tmpx2:tmpy2 ) ) ; add dimples ;if( (dimples>1) then for( lp 0 dimples-1 tmpx = lp * (shuttle_length*2 - 2*pd_enclosure - d_nomWidth) / (dimples-1) tmpx = tmpx - shuttle_length + pd_enclosure dbCreateRect( pcCellView "DIMPLE" list( -d_nomWidth*0.5:tmpx d_nomWidth*0.5:tmpx+d_nomWidth ) ) ) ;else ; dbCreateRect( pcCellView "DIMPLE" list( -d_nomWidth*0.5:-d_nomWidth*0.5 d_nomWidth*0.5:d_nomWidth*0.5 ) ) ;) ; add poly0 if( (include_poly0==t) then tmpx = - car( car( pcCellView~>bBox ) ) + p0p_enclosure tmpy = - car( cdr( car( pcCellView~>bBox ) ) ) + p0p_enclosure dbCreateRect( pcCellView "POLY0" list( -tmpx:-tmpy tmpx:tmpy ) ) ) ; Create the instNamePrefix property dbReplaceProp( pcCellView "instNamePrefix" "string" "suspension" ) ; set version string dbReplaceProp( pcCellView "version" "string" "1.2.1" ) ; body SKILL code returns value t return(t) ) )