;================================================================================ ; Robert Johnstone ; Simon Fraser University ; ; Copyright 2000,2002 Robert W. Johnstone ;-------------------------------------------------------------------------------- ; 2002/06/03 ; - modified code because the interface to dbCreateMumpsPin changed ; 2000/07/01 ; - created cell if( (!boundp( 'admLibraryName )) then warn( "Setting the destination library to default value of ADM" ) admLibraryName = "ADM" ) pcDefinePCell( list( ddGetObj(admLibraryName) "resistor_snake" "layout" ) ; end of list for first argument ( ( width 100.0 ) ( bars 5 ) ( gap 0 ) ( pin_size 20.0 ) ( chamfer 0.0 ) ( include_R t ) ) ; end of parameter list prog( let( pcNet tmp tmp2 pcTechFile ) ; load tech file rules pcTechFile = techGetTechFile( pcCellView ) p0_minWidth = techGetSpacingRule( pcTechFile "minWidth" "POLY0" ) if( (p0_minWidth==nil) then warn("minWidth rule for POLY0 not set") ) p0_minSpacing = techGetSpacingRule( pcTechFile "minSpacing" "POLY0" ) if( (p0_minSpacing==nil) then warn("minSpacing rule for POLY0 not set") ) p1a1_enclosure = techGetOrderedSpacingRule( pcTechFile "minEnclosure" "POLY1" "ANCHOR1" ) if( (p1a1_enclosure==nil) then warn("minEnclosure rule for POLY1->ANCHOR1 not set") ) p1p2_enclosure = techGetOrderedSpacingRule( pcTechFile "minEnclosure" "POLY1" "POLY2" ) if( (p1p2_enclosure==nil) then warn("minEnclosure rule for POLY1->POLY2 not set") ) p2m_enclosure = techGetOrderedSpacingRule( pcTechFile "minEnclosure" "POLY2" "METAL" ) if( (p2m_enclosure==nil) then warn("minEnclosure rule for POLY2->METAL not set") ) p2v_enclosure = techGetOrderedSpacingRule( pcTechFile "minEnclosure" "POLY2" "P1P2VIA" ) if( (p2v_enclosure==nil) then warn("minEnclosure rule for POLY2->P1P2VIA not set") ) v_minWidth = techGetSpacingRule( pcTechFile "minWidth" "P1P2VIA" ) if( (v_minWidth==nil) then warn("minWidth rule for P1P2VIA not set") ) m_minWidth = techGetSpacingRule( pcTechFile "minWidth" "METAL" ) if( (m_minWidth==nil) then warn("minWidth rule for METAL not set") ) ; check parameters width = if( (width<2*p0_minWidth+2*p0_minSpacing) 2*p0_minWidth+2*p0_minSpacing width ) bars = if( (bars<0) 0 bars ) gap = if( (gapparamVal + 2*SPCInfo->increment ) ) rodAssignHandleToParameter( ?parameter "bars" ?rodObj rodObj ?handleName list( "centerLeft" "centerRight" ) ?displayName "bars" ?stretchDir "x" ?updateIncrement (p0_minWidth + gap)*0.5 ?userFunction lambda( (SPCInfo) SPCInfo->paramVal + round(SPCInfo->increment/SPCInfo->userData) ) ?userData p0_minWidth + gap ) ; Create the instNamePrefix property dbReplaceProp( pcCellView "instNamePrefix" "string" "resistor" ) ; 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