;================================================================================ ; Robert Johnstone ; Simon Fraser University ; ; Copyright 2000,2002 Robert W. Johnstone ;-------------------------------------------------------------------------------- ; 2002/08/07 ; - added option to show the exclusion zone, default is true ; 2002/07/23 ; - modified code to include option to print substrate capacitance ; - default for new parameter is true ; 2002/06/03 ; - modified code because interface to dbCreateRoundRect changed ; 2000/07/01 ; - creation date unless( boundp( 'admLibraryName ) warn( "Setting the destination library to default value of ADM" ) admLibraryName = "ADM" ) pcDefinePCell( list( ddGetObj(admLibraryName) "pad" "layout" ) ; end of list for first argument ( ( width 100.0 ) ( height 100.0 ) ( chamfer 0.0 ) ( include_C t ) ( include_Exclusion t ) ) ; end of parameter list unless( fboundp( 'cdfcallback_adm_pad ) procedure( cdfcallback_adm_pad() let( ; declare variables ( pcCellView pcTechFile width height chamfer p0p1_enclosure p1p2_enclosure p2m_enclosure p2v_enclosure v_nomWidth m_nomWidth ) ; get references pcCellView = dbOpenCellViewByType( cdfgData~>id~>lib~>name "pad" "layout" "" "r" ) pcTechFile = techGetTechFile( pcCellView ) dbClose( pcCellView ) ; load tech file rules p0p1_enclosure = techGetOrderedSpacingRule( pcTechFile "minEnclosure" "POLY0" "POLY1" ) unless( p0p1_enclosure warn("minEnclosure rule for POLY0->POLY1 not set") ) p1p2_enclosure = techGetOrderedSpacingRule( pcTechFile "minEnclosure" "POLY1" "POLY2" ) unless( p1p2_enclosure warn("minEnclosure rule for POLY1->POLY2 not set") ) p2m_enclosure = techGetOrderedSpacingRule( pcTechFile "minEnclosure" "POLY2" "METAL" ) unless( p2m_enclosure warn("minEnclosure rule for POLY2->METAL not set") ) p2v_enclosure = techGetOrderedSpacingRule( pcTechFile "minEnclosure" "POLY2" "P1P2VIA" ) unless( p2v_enclosure warn("minEnclosure rule for POLY2->P1P2VIA not set") ) v_nomWidth = techGetSpacingRule( pcTechFile "nomWidth" "P1P2VIA" ) unless( v_nomWidth warn("nomWidth rule for P1P2VIA not set") ) m_nomWidth = techGetSpacingRule( pcTechFile "nomWidth" "METAL" ) unless( m_nomWidth warn("nomWidth rule for METAL not set") ) ; copy CDF parameters width = cdfgData->width->value height = cdfgData->height->value chamfer = cdfgData->chamfer->value ; check parameters if( (widthwidth->value = width ) if( (heightheight->value = height ) if( (width+2*(p2m_enclosure-p2v_enclosure)width->value = width ) if( (height+2*(p2m_enclosure-p2v_enclosure)height->value = height ) if( (chamfer<0) then chamfer = 0 warn( "Chamfer must be greater than or equal to zero." ); cdfgData->chamfer->value = chamfer ) width = width + p2m_enclosure + p1p2_enclosure + p0p1_enclosure height = height + p2m_enclosure + p1p2_enclosure + p0p1_enclosure cdfgData->capacitance->value = (width*1e-6)*(height*1e-6)*7.5*8.854187818e-12/0.6e-6 ))) prog( ; declare variables ( pcTechFile pcNet pcShape rodObj p0p1_enclosure p1a1_enclosure p1p2_enclosure p2m_enclosure p2v_enclosure v_nomWidth m_nomWidth w h tmp ) ; load tech file rules pcTechFile = techGetTechFile( pcCellView ) p0p1_enclosure = techGetOrderedSpacingRule( pcTechFile "minEnclosure" "POLY0" "POLY1" ) unless( p0p1_enclosure warn("minEnclosure rule for POLY0->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") ) p2m_enclosure = techGetOrderedSpacingRule( pcTechFile "minEnclosure" "POLY2" "METAL" ) unless( p2m_enclosure warn("minEnclosure rule for POLY2->METAL not set") ) p2v_enclosure = techGetOrderedSpacingRule( pcTechFile "minEnclosure" "POLY2" "P1P2VIA" ) unless( p2v_enclosure warn("minEnclosure rule for POLY2->P1P2VIA not set") ) v_nomWidth = techGetSpacingRule( pcTechFile "nomWidth" "P1P2VIA" ) unless( v_nomWidth warn("nomWidth rule for P1P2VIA not set") ) m_nomWidth = techGetSpacingRule( pcTechFile "nomWidth" "METAL" ) unless( m_nomWidth warn("nomWidth rule for METAL not set") ) ; check parameters ;width = if( (widthparamVal + 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" "pad" ) ; set version string dbReplaceProp( pcCellView "version" "string" "1.2.1" ) ; body SKILL code returns value t return(t) ) ; end of body-of-SKILL-code prog ) ; ; end of pcDefinePCell ; Create CDF information let( ( pcCDF pcCell pcFile ) pcCell = ddGetObj( admLibraryName "pad" ) ; create callback skill function pcFile = outfile( strcat( ddGetObjReadPath( pcCell ) "/callbacks.il" ) "w" ) fprintf( pcFile "skill goes here" ) close( pcFile ) ; delete CDF information if it exists pcCDF = cdfGetBaseCellCDF( pcCell ) if( pcCDF cdfDeleteCDF( cdfGetBaseCellCDF( pcCell ) ) ) ; add CDF information pcCDF = cdfCreateBaseCellCDF( pcCell ) cdfCreateParam( pcCDF ?name "width" ?type "float" ?defValue 100.0 ?prompt "METAL width" ?units "lengthMetric" ?callback "cdfcallback_adm_pad()" ) cdfCreateParam( pcCDF ?name "height" ?type "float" ?defValue 100.0 ?prompt "METAL height" ?units "lengthMetric" ?callback "cdfcallback_adm_pad()" ) cdfCreateParam( pcCDF ?name "chamfer" ?type "float" ?defValue 0.0 ?prompt "Chamfer" ?units "lengthMetric" ?callback "cdfcallback_adm_pad()" ) cdfCreateParam( pcCDF ?name "include_C" ?type "boolean" ?defValue t ?prompt "include_C" ) cdfCreateParam( pcCDF ?name "include_Exclusion" ?type "boolean" ?defValue t ?prompt "include_Exclusion" ) cdfCreateParam( pcCDF ?name "capacitance" ?type "float" ?defValue (100*1e-6)*(100*1e-6)*7.5*8.854187818e-12/0.6e-6 ?prompt "Substrate capacitance" ?editable "nil" ?units "capacitance" ) cdfSaveCDF( pcCDF ) ) ; ; end create CDF