[Inst1]方形电感INDS

;------------------------------------------------------------------;
;- Code Purpose     : Inductor pCell Example 
;- Type             : Square inductor
;- Default Segments : 12 
;------------------------------------------------------------------;

;- Test Parameters
LIBRARY = "master"
CELL    = "myInductor"
LAYER   = "metal2"

pcDefinePCell(
	list( ddGetObj(LIBRARY) CELL "layout" )
	
;- Define Formal Parameters:
  (
	(indLayer	LAYER   ) 
  	(indLengthX	130.0   )
   	(indLengthY	120.0   )
  	(indWidth	8.0     )
   	(indGap	        7.0     )
   	(indSeg	        12      )
  )

;- Define local variables of this cellview:	
let(
     (
     indPath indPoints i j tmpPt pt 
     indSpacing 
     totalLength
     pt1 pt2 pt3 pt4 pt5 
     )
  
   indSpacing	= indWidth + indGap 

   ;- First five points for four outer loop segments.
   pt1	= list( 0 -(indWidth/2) )
   pt2	= list( 0 indLengthY )
   pt3	= list( indLengthX indLengthY )
   pt4	= list( indLengthX 0 )
   pt5	= list( rodPointX(pt1)+indSpacing 0 )
   indPoints = list( pt1 pt2 pt3 pt4 pt5 )

   ;- Rest of the points just follow the conditions.
   ;- It could've been written the same way for all the points.
   ;- But, that will make following equations look more complex.

   ;- For inner loop segments.
   for( i 5 indSeg

     j=mod(i 4)                   ;- Modulus of Segment Number and 4
     pt    = nth( i-4 indPoints ) ;- Dependency point.  

     case( j
       (0 
          tmpPt = list( 
                  rodPointX( pt ) + indSpacing 
		  rodPointY( pt ) + indSpacing
	        )
       )
       (1 
          tmpPt = list( 
                  rodPointX( pt ) + indSpacing 
		  rodPointY( pt ) - indSpacing 
	        )
       )
       (2 
          tmpPt = list( 
                  rodPointX( pt ) - indSpacing 
		  rodPointY( pt ) - indSpacing 
	        )
       )
       (3 
          tmpPt = list( 
                  rodPointX( pt ) - indSpacing 
		  rodPointY( pt ) + indSpacing 
	        )
       )
     )
     ;- Append new point (tmpPt) to point list ( indPoints ).
     indPoints = append1( indPoints tmpPt )
        
   ) 

;- Define inductor:     	

   indPath = rodCreatePath(
	?cvId	pcCellView
	?layer	list( indLayer "drawing" )
	?width	indWidth
	?pts	indPoints
	?endType "variable"
	?endExt	indWidth / 2
	)


 

;- Create reference labels (length, width, cap value):
  dbCreateLabel(
	pcCellView
	list( "text" "drawing" )
	( indPath~>centerCenter )
	sprintf(nil "\nX = %L \nY = %L"		 /* \nL = %L */
	indLengthX indLengthY)			 /* totalLength */
	"centerCenter"
	"R0"
	"stick"
	4.0
	)
	
	
 ); let
); pcDefinePcell

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值