[ Skill ] 圆形平面螺旋电感怎么画?

https://www.cnblogs.com/yeungchie/

目前(2011年),在射频IC设计中最广泛使用的片上电感就是平面螺旋电感,通常用最顶层的金属层来实现,电感的中心点由下面一层的金属线引出。它可以有许多形状:方形、六边形、八边形、圆形等。其中,圆形螺旋电感在给定的金属线宽度和电感值下电阻损耗最小,Q值最高,但很多布线工具和生产技术都难以实现。


下面是在 virtuoso 中绘制圆形电感的方法,本质上是通过增加 polygon 边数量来实现 “拟圆” 的。

code

;--------------------------
; Program  : ycCreateInd.il
; Language : Cadence Skill
; Author   : YEUNGCHIE
;--------------------------

procedure(ycCreateInd(cvId lpp radius width space rings \@optional vertexLimit(4001) "dgnnnnx")
    let((pi step stepTotal stepPerRing initA deltaA initR deltaR points1 points2)

        ; 这里确保全部为浮点数
        radius *= 1.0 ; 起始半径
        width  *= 1.0 ; 线宽度
        space  *= 1.0 ; 线间距
        rings  *= 1.0 ; 线圈匝数

        ; 获取 π
        defMathConstants('ycMath)
        pi = ycMath.PI

        ; 边数统计
        step = 0
        stepTotal = fix2(vertexLimit/2 - 1)
        stepPerRing = stepTotal/rings

        initA  = 0
        deltaA = 360.0/stepPerRing
        initR  = radius
        deltaR = (width+space)/stepPerRing

        while(step <= stepTotal
            let((rad newR x1 y1 x2 y2 o1 o2)
                ; 角度转弧度
                rad = pi*(initA + deltaA*step)/180.0

                initR = radius + deltaR*step
                newR  = initR+width

                x1 = cos(rad)*initR
                y1 = sin(rad)*initR
                x2 = cos(rad)*newR
                y2 = sin(rad)*newR

                o1 = x1:y1
                o2 = x2:y2

                points1 = cons(o1 points1)
                points2 = cons(o2 points2)
            )
            step++
        )

        foreach(p points1
            points2 = cons(p points2)
        )
        dbCreatePolygon(cvId lpp points2)
    )
)

; END

describe

用于创建平面螺旋电感。

  • cvId
    需要绘制的单元,可以用 geGetEditCellView() 来获取。
  • lpp
    指定用于绘制的层次信息,通用格式 "layerName"list("layerName" "purpose")
  • radius
    最小半径
  • width
    螺旋线宽
  • space
    螺旋间距
  • rings
    螺旋匝数

example

ycCreateInd(geGetEditCellView() "M1" 10 2 1 2)

posted @ 2020-08-05 22:54  YEUNGCHIE  阅读(4613)  评论(6编辑  收藏  举报