;================================================================================ ; Robert Johnstone ; Simon Fraser University ; ; Copyright 2001,2002 Robert W. Johnstone ;-------------------------------------------------------------------------------- ; 2002/02/22 ; - removed dimples parameter, dimples now cacluated from tech file info ; - modified code to use poly and anchor variables ; - layers are no longer hard coded ; - created shuttle_folder_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_folded_2" "layout" ) ; end of list for first argument ( ( length 100.0 ) ( shuttle_length 50.0 ) ( shuttle_width 12.0 ) ( truss_width 5.0 ) ( yoke_width 5.0 ) ( anchor_width 0.0 ) ( include_poly0 t ) ) ; end of parameter list prog( let( pcTechFile poly anchor p0p_enclosure p_minWidth p_nomSpacing p_nomWidth pa_nomSpacing pd_nomSpacing a_nomWidth d_nomWidth dimples beami beamo beam_sep) poly = "POLY2" anchor = "ANCHOR2" ; 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_nomSpacing = techGetOrderedSpacingRule( pcTechFile "minEnclosure" poly anchor ) unless( pa_nomSpacing warn(strcat( "minEnclosure rule for " poly "->" anchor " not set") ) ) pd_nomSpacing = techGetOrderedSpacingRule( pcTechFile "minEnclosure" poly "DIMPLE" ) unless( pd_nomSpacing 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 then 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_length = if( (shuttle_lengthanchor_width) a_nomWidth+2*pa_nomSpacing anchor_width ) ; to ease calculations later dimples = ceiling( shuttle_length / d_maxSpacing ) + 1 shuttle_width = shuttle_width*0.5 shuttle_length = shuttle_length*0.5 beami = shuttle_width + p_nomSpacing + anchor_width beamo = beami + length ; create shuttle and yokes dbCreatePolygon( pcCellView poly list( beami:shuttle_length beami:shuttle_length-yoke_width shuttle_width:shuttle_length-yoke_width shuttle_width:-shuttle_length+yoke_width beami:-shuttle_length+yoke_width beami:-shuttle_length -beami:-shuttle_length -beami:-shuttle_length+yoke_width -shuttle_width:-shuttle_length+yoke_width -shuttle_width:shuttle_length-yoke_width -beami:shuttle_length-yoke_width -beami:shuttle_length ) ) ; create beams beam_sep = (shuttle_length*2 - yoke_width) / 3 dbCreateRect( pcCellView poly list( beami:beam_sep*1.5+p_minWidth*0.5 beamo:beam_sep*1.5-p_minWidth*0.5 ) ) dbCreateRect( pcCellView poly list( beami:beam_sep*0.5+p_minWidth*0.5 beamo:beam_sep*0.5-p_minWidth*0.5 ) ) dbCreateRect( pcCellView poly list( beami:-beam_sep*0.5+p_minWidth*0.5 beamo:-beam_sep*0.5-p_minWidth*0.5 ) ) dbCreateRect( pcCellView poly list( beami:-beam_sep*1.5+p_minWidth*0.5 beamo:-beam_sep*1.5-p_minWidth*0.5 ) ) dbCreateRect( pcCellView poly list( -beami:beam_sep*1.5+p_minWidth*0.5 -beamo:beam_sep*1.5-p_minWidth*0.5 ) ) dbCreateRect( pcCellView poly list( -beami:beam_sep*0.5+p_minWidth*0.5 -beamo:beam_sep*0.5-p_minWidth*0.5 ) ) dbCreateRect( pcCellView poly list( -beami:-beam_sep*0.5+p_minWidth*0.5 -beamo:-beam_sep*0.5-p_minWidth*0.5 ) ) dbCreateRect( pcCellView poly list( -beami:-beam_sep*1.5+p_minWidth*0.5 -beamo:-beam_sep*1.5-p_minWidth*0.5 ) ) ; create bars dbCreateRect( pcCellView poly list( beamo:shuttle_length beamo+truss_width:-shuttle_length ) ) dbCreateRect( pcCellView poly list( -beamo:shuttle_length -beamo-truss_width:-shuttle_length ) ) ; create anchors dbCreateRect( pcCellView poly list( beami:beam_sep*0.5+p_minWidth*0.5+pa_nomSpacing beami-anchor_width:-beam_sep*0.5-p_minWidth*0.5-pa_nomSpacing ) ) dbCreateRect( pcCellView poly list( -beami:beam_sep*0.5+p_minWidth*0.5+pa_nomSpacing -beami+anchor_width:-beam_sep*0.5-p_minWidth*0.5-pa_nomSpacing ) ) dbCreateRect( pcCellView anchor list( beami-pa_nomSpacing:beam_sep*0.5+p_minWidth*0.5 beami-anchor_width+pa_nomSpacing:-beam_sep*0.5-p_minWidth*0.5 ) ) dbCreateRect( pcCellView anchor list( -beami+pa_nomSpacing:beam_sep*0.5+p_minWidth*0.5 -beami+anchor_width-pa_nomSpacing:-beam_sep*0.5-p_minWidth*0.5 ) ) ; add dimples ;if( (dimples>1) then tmp = beamo + truss_width*0.5 for( lp 0 dimples-1 tmpx = lp * (shuttle_length*2 - 2*pd_nomSpacing - d_nomWidth) / (dimples-1) tmpx = tmpx - shuttle_length + pd_nomSpacing dbCreateRect( pcCellView "DIMPLE" list( -d_nomWidth*0.5:tmpx d_nomWidth*0.5:tmpx+d_nomWidth ) ) dbCreateRect( pcCellView "DIMPLE" list( -d_nomWidth*0.5-tmp:tmpx d_nomWidth*0.5-tmp:tmpx+d_nomWidth ) ) dbCreateRect( pcCellView "DIMPLE" list( -d_nomWidth*0.5+tmp:tmpx d_nomWidth*0.5+tmp:tmpx+d_nomWidth ) ) ) ;else ; if( (dimples>0) then ; tmp = beamo + truss_width*0.5 ; dbCreateRect( pcCellView "DIMPLE" list( -d_nomWidth*0.5:-d_nomWidth*0.5 d_nomWidth*0.5:d_nomWidth*0.5 ) ) ; dbCreateRect( pcCellView "DIMPLE" list( -d_nomWidth*0.5-tmp:-d_nomWidth*0.5 d_nomWidth*0.5-tmp:d_nomWidth*0.5 ) ) ; dbCreateRect( pcCellView "DIMPLE" list( -d_nomWidth*0.5+tmp:-d_nomWidth*0.5 d_nomWidth*0.5+tmp: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.3.1" ) ; body SKILL code returns value t return(t) ) )