;================================================================================ ; Robert Johnstone ; Simon Fraser University ; ; Copyright 2000,2001,2002 Robert W. Johnstone ;-------------------------------------------------------------------------------- ; 2002/08/10 ; - added option "include_R", which indicates that the pcell should calculate ; and display the resistance of the underpasses ; 2002/06/03 ; - updated code because dbCreateMumpsPin function was modified ; 2001/05/28 ; -modified unless( boundp( 'admLibraryName ) warn( "Setting the destination library to default value of ADM" ) admLibraryName = "ADM" ) pcDefinePCell( list( ddGetObj(admLibraryName) "bridge" "layout" ) ; end of list for first argument ( ( pin_size 20.0 ) ( passes 1 ) ( rows 1 ) ( chamfer 0.0 ) ( include_R t ) ) ; end of parameter list prog( ; declare variables ( pcTechFile pcNet p1_nomSpacing p1a1_enclosure p1p2_enclosure p1p2_spacing a1_nomWidth p2p0_enclosure p2v_enclosure p2m_enclosure v_minWidth m_minWidth x y y0 x1 y1 x2 y2 tmp_i tmp tmp2 ) ; load tech file rules pcTechFile = techGetTechFile( pcCellView ) p1_nomSpacing = techGetSpacingRule( pcTechFile "nomSpacing" "POLY1" ) unless( p1_nomSpacing warn("nomSpacing rule for POLY1 not set") ) p1a1_enclosure = techGetOrderedSpacingRule( pcTechFile "minEnclosure" "POLY1" "ANCHOR1" ) unless( p1a1_enclosure warn("minEnclosure rule for POLY1->ANCHOR1 not set") ) p1p2_enclosure = techGetOrderedSpacingRule( pcTechFile "minEnclosure" "POLY1" "POLY2" ) unless( p1p2_enclosure warn("minEnclosure rule for POLY1->POLY2 not set") ) p1p2_spacing = techGetSpacingRule( pcTechFile "minSpacing" "POLY2" "POLY1" ) unless( p1p2_spacing warn("minSpacing rule for POLY1<->POLY2 not set") ) a1_nomWidth = techGetSpacingRule( pcTechFile "nomWidth" "ANCHOR1" ) unless( a1_nomWidth warn("nomWidth rule for ANCHOR1 not set") ) p2p0_enclosure = techGetOrderedSpacingRule( pcTechFile "minEnclosure" "POLY2" "POLY0" ) unless( p2p0_enclosure warn("minEnclosure rule for POLY2->POLY0 not set") ) p2v_enclosure = techGetOrderedSpacingRule( pcTechFile "minEnclosure" "POLY2" "P1P2VIA" ) unless( p2v_enclosure warn("minEnclosure rule for POLY2->P1P2VIA not set") ) p2m_enclosure = techGetOrderedSpacingRule( pcTechFile "minEnclosure" "POLY2" "METAL" ) unless( p2m_enclosure warn("minEnclosure rule for POLY2->METAL not set") ) v_minWidth = techGetSpacingRule( pcTechFile "minWidth" "P1P2VIA" ) unless( v_minWidth warn("minWIdth rule for P1P2VIA not set") ) m_minWidth = techGetSpacingRule( pcTechFile "minWidth" "METAL" ) unless( m_minWidth warn("minWIdth rule for METAL not set") ) ; check parameters pin_size = techGetMumpsPinSize( pcTechFile pin_size ) passes = if( (passes<1) 1 passes ) rows = if( (rows<1) 1 rows ) rows = if( (rows>passes) passes rows ) chamfer = if( (chamfer<0) 0 chamfer ) chamfer = if( (chamfer>pin_size*0.25) pin_size*0.25 chamfer ) ; precalculations y0 = pin_size - p1p2_enclosure + p1_nomSpacing for( lp 0 passes-1 x = lp * (pin_size + p1_nomSpacing ) pcNet = dbMakeNet( pcCellView strcat( "B" pcExprToString(lp+1) ) ) dbCreateMumpsPin( pcCellView pcNet x:y0 pin_size chamfer ) tmp_i = if( (lp+1>rows) rows lp+1 ) y = y0 - tmp_i * (pin_size + p1_nomSpacing) - pin_size + 2*(p1p2_enclosure-p1p2_spacing) + p1_nomSpacing dbCreateMumpsPin( pcCellView pcNet x:y pin_size chamfer ) tmp = pin_size*0.5 - p1p2_enclosure - p2p0_enclosure dbCreateRect( pcCellView "POLY0" list( x-tmp:y0+tmp x+tmp:y-tmp ) ) if( (include_R==t) then tmp2 = 1.5e-5 * ( y0-y ) / (2*tmp * 0.5) tmp2 = tmp2 * 1e6 + 2 * 3060 / ( 4*tmp*(tmp+p2p0_enclosure) ) dbCreateLabel( pcCellView "TMP" x:(y0+y)*0.5 sprintf(nil "R > %0.0f" tmp2) "centerCenter" "R90" "stick" tmp ) ) ) pcNet = dbMakeNet( pcCellView "A0" ) dbCreateMumpsPin( pcCellView pcNet -pin_size-p1_nomSpacing:0 pin_size chamfer ) for( lp 0 rows-1 y = -lp * (pin_size + p1_nomSpacing) pcNet = dbMakeNet( pcCellView strcat( "A" pcExprToString(lp) ) ) if( (lp>0) then x = (lp-1) * ( pin_size + p1_nomSpacing ) dbCreateMumpsPin( pcCellView pcNet x:y pin_size chamfer ) ) x = passes * (pin_size + p1_nomSpacing) dbCreateMumpsPin( pcCellView pcNet x:y pin_size chamfer ) x1 = lp*(pin_size+p1_nomSpacing)-pin_size*0.5 - p1_nomSpacing - p1p2_enclosure y1 = y + pin_size*0.5 - p1p2_enclosure x2 = x - pin_size*0.5 + p1p2_enclosure y2 = y - pin_size*0.5 + p1p2_enclosure dbCreateRect( pcCellView "POLY2" list( x1:y1 x2:y2 ) ) x1 = x1 - p2m_enclosure y1 = y1 - p2m_enclosure x2 = x2 + p2m_enclosure y2 = y2 + p2m_enclosure dbCreateRect( pcCellView "METAL" list( x1:y1 x2:y2 ) ) ) ; set default instance name prefix dbReplaceProp( pcCellView "instNamePrefix" "string" "bridge" ) ; set version string dbReplaceProp( pcCellView "version" "string" "1.1.4" ) ; body SKILL code returns value t return(t) ) ; end of body-of-SKILL-code prog ) ; ; end of pcDefinePCell