;================================================================================ ; Robert Johnstone ; Simon Fraser University ; ; Last Modified: 2000/12/05 ; ; Copyright 2000 Robert W. Johnstone ;-------------------------------------------------------------------------------- if( (!boundp( 'admLibraryName )) then warn( "Setting the destination library to default value of ADM" ) admLibraryName = "ADM" ) pcDefinePCell( list( ddGetObj(admLibraryName) "strain_gauge_2" "layout" ) ; end of list for first argument ( ( length1 500.0 ) ( length2 250.0 ) ( space 0.0 ) ( width 0.0 ) ( actuation 10.0 ) ( include_poly0 "boolean" nil ) ( include_meter t ) ) ; end of parameter list prog( let( pcTechFile pcMeter pcInst rodObj1 rodObj2 p0_minWidth p0p_enclosure p_minSpacing p_minWidth pa_enclosure a_nomWidth rodObj1 rodObj2 tmp tmp2 player alayer ) player = "POLY2" alayer = "ANCHOR2" ; 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") ) p0p_enclosure = techGetOrderedSpacingRule( pcTechFile "minEnclosure" "POLY0" player ) if( (p0p_enclosure==nil) then warn("minEnclosure rule for POLY0->" + player + " not set.") ) p_minSpacing = techGetSpacingRule( pcTechFile "minSpacing" player ) if( (p_minSpacing==nil) then warn("minSpacing rule for " + player + " not set") ) p_minWidth = techGetSpacingRule( pcTechFile "minWidth" player ) if( (p_minWidth==nil) then warn("minWidth rule for " + player + " not set") ) pa_enclosure = techGetOrderedSpacingRule( pcTechFile "minEnclosure" player alayer ) if( (pa_enclosure==nil) then warn("minEnclosure rule for " + player + "->" + alayer + " not set.") ) a_nomWidth = techGetSpacingRule( pcTechFile "nomWidth" alayer ) if( (a_nomWidth==nil) then warn("nomWidth rule for " + player + " not set") ) ; check parameters width = if( (widthlib "meter_2" "layout" nil "r" ) pcInst = dbCreateParamInst( pcCellView pcMeter nil -space*0.5-width*0.5-actuation:length1+width*0.5+2*p_minWidth+p_minSpacing "R270" 1 list( list( "length" "float" 2*actuation+space+width ) list( "include_poly0" "boolean" include_poly0 ) ) ) tmp = length1 + width*0.5 + p_minWidth + p_minSpacing tmp = tmp + p_minWidth + 2*pa_enclosure + a_nomWidth dbCreateRect( pcCellView player list( -p_minWidth*0.5:tmp p_minWidth*0.5:tmp+p_minWidth ) ) if( (include_poly0==t) then tmp2 = p_minWidth*0.5 + p0p_enclosure dbCreateRect( pcCellView "POLY0" list( -tmp2:tmp tmp2:tmp+p_minWidth+p0p_enclosure ) ) ) dbClose( pcMeter ) ) ; Create the instNamePrefix property dbReplaceProp( pcCellView "instNamePrefix" "string" "test" ) ; set version string dbReplaceProp( pcCellView "version" "string" "1.1.1" ) ; body SKILL code returns value t return(t) ) )