• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. How to calculate area for a given schematic

Stats

  • Locked Locked
  • Replies 13
  • Subscribers 143
  • Views 22001
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to calculate area for a given schematic

IC Layout
IC Layout over 16 years ago

 Hello! Every body, I am using cadence IC514 version and a 90nm PDK kit called "gpdk090".
My intention is to calculate area for a given schematic.
I wrote a procedure called "area()" which will calculate area in the current level (means for transistors, capacitors and resistors only).
Now I need to call this procedure for every instance which is not a transistor,cap or a resistor.
I wrote something like this........................
foreach( inst geGetEditCellView()~>instances
    when( inst~>purpose == "cell"
        if( inst~>libName == "gpdk090" then
            area()
        else
            label:
            cv1=dbOpenCellViewByType(inst~>libName inst~>cellName "schematic")
            foreach( inst1 cv1~>instances
                when( inst1~>purpose == "cell"
                    if( inst1~>libName == "gpdk090" then
                        area()
                    else
                        goto label
        ]
Can some body guide me in this way...
                Thanks in Advance...    
                                                                Prabhakar. K

  • Cancel
Parents
  • IC Layout
    IC Layout over 16 years ago

     Hello, Sir! I have re-written the code but still I am not able to display the result in user units (i.e sq.microns)..

    I am in confusion.......Please kindly read this code and suggest me........

    ************************area.il****************************

     Ap = Ac = Ar = An = evalstring("0u")
    div_fac = evalstring("1f")
    count = 0
    procedure( area(cv)
        foreach(inst cv~>instances
        when( and(inst~>purpose == "cell" inst~>libName == "gpdk090")
            if(inst~>cellName == "pmos2v" then
                w1 = evalstring(cdfFormatFloatString(dbGetq(inst "w") "u"))
                l1 = evalstring(cdfFormatFloatString(dbGetq(inst "l") "u"))
                m1 = evalstring(dbGetq(inst "m"))    
                f1 = evalstring(dbGetq(inst "fingers"))    
                
                wp = w1 + evalstring("1.4u") ; (0.7u + 0.7u) oxide to nwell enclosure in vertical direction for "pmos2v"
                lp = (f1*l1) + ((f1-1)*evalstring("0.36u")) + evalstring("2u")
                ;0.36u is space b/w poly fingers
                ;(1u + 1u)  poly to nwell enclosure in horizontal direction for "pmos2v"
                areap = m1*wp*lp
                Ap = Ap + areap
                Ap1 = atof(cdfFormatFloatString(artMakeString(Ap) "p"))
            else
            if(inst~>cellName == "nmos2v" then
                w1 = evalstring(cdfFormatFloatString(dbGetq(inst "w") "u"))
                l1 = evalstring(cdfFormatFloatString(dbGetq(inst "l") "u"))
                m1 = evalstring(dbGetq(inst "m"))    
                f1 = evalstring(dbGetq(inst "fingers"))    
                
                wn = w1 + evalstring("0.6u") ; (0.3u + 0.3u) oxide to oxide_thk enclosure in vertical direction for "nmos2v"
                ln = (f1*l1) + ((f1-1)*evalstring("0.36u")) + evalstring("1.12u")
                ;0.36u is space b/w poly fingers
                ;(0.56u + 0.56u)  poly to oxide_thk enclosure in horizontal direction for "nmos2v"
                arean = m1*wn*ln
                An = An + arean
                An1 = atof(cdfFormatFloatString(artMakeString(An) "p"))
            else
            if( inst~>cellName == "mimcap" then
                c1 = evalstring(dbGetq(inst "c"))
                m1 = evalstring(dbGetq(inst "m"))
                
                areac = m1*c1
                ratio = areac/div_fac
                Ac = Ac + ratio
            else
            if( inst~>cellName == "resnsppoly" then
                w1 = evalstring(cdfFormatFloatString(dbGetq(inst "segW") "u"))
                l1 = evalstring(cdfFormatFloatString(dbGetq(inst "segL") "u"))
                m1 = evalstring(dbGetq(inst "segments"))
                
                wr = (m1*w1) + (m1-1)*evlastring("0.6u") + evalstring("0.56u")
                lr = l1 + evalstring("1.12u")
                arear = wr*lr
                Ar = Ar + arear
                Ar1 = atof(cdfFormatFloatString(artMakeString(Ar) "p"))
            else
            println("Nothing to calculate")
    );if
    );if
    );if
    );if
    );when
            when( and(inst~>purpose == "cell" inst~>libName != "gpdk090")
                cv1 = dbOpenCellViewByType(inst~>libName inst~>cellName "schematic")
                println(inst~>cellName)
                count = count + 1
                area(cv1) ;function call
                dbClose(cv1)
    );when
    );foreach
    );procedure

    area(geGetEditCellView())

    area = Ap1 + An1 + Ar1 + Ac
    printf("Number of instances/blocks in the design : %d \n" count)
    println(area)
    ;printf("The Total area of the design : %f \n" area)
    *************************end of area.il********************************

    And one more kind request How to get the area of each instance/block (which are in toplevel schematic only).

    Thanks in advance

                                 Prabhakr. K - Layout Design Engineer

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • IC Layout
    IC Layout over 16 years ago

     Hello, Sir! I have re-written the code but still I am not able to display the result in user units (i.e sq.microns)..

    I am in confusion.......Please kindly read this code and suggest me........

    ************************area.il****************************

     Ap = Ac = Ar = An = evalstring("0u")
    div_fac = evalstring("1f")
    count = 0
    procedure( area(cv)
        foreach(inst cv~>instances
        when( and(inst~>purpose == "cell" inst~>libName == "gpdk090")
            if(inst~>cellName == "pmos2v" then
                w1 = evalstring(cdfFormatFloatString(dbGetq(inst "w") "u"))
                l1 = evalstring(cdfFormatFloatString(dbGetq(inst "l") "u"))
                m1 = evalstring(dbGetq(inst "m"))    
                f1 = evalstring(dbGetq(inst "fingers"))    
                
                wp = w1 + evalstring("1.4u") ; (0.7u + 0.7u) oxide to nwell enclosure in vertical direction for "pmos2v"
                lp = (f1*l1) + ((f1-1)*evalstring("0.36u")) + evalstring("2u")
                ;0.36u is space b/w poly fingers
                ;(1u + 1u)  poly to nwell enclosure in horizontal direction for "pmos2v"
                areap = m1*wp*lp
                Ap = Ap + areap
                Ap1 = atof(cdfFormatFloatString(artMakeString(Ap) "p"))
            else
            if(inst~>cellName == "nmos2v" then
                w1 = evalstring(cdfFormatFloatString(dbGetq(inst "w") "u"))
                l1 = evalstring(cdfFormatFloatString(dbGetq(inst "l") "u"))
                m1 = evalstring(dbGetq(inst "m"))    
                f1 = evalstring(dbGetq(inst "fingers"))    
                
                wn = w1 + evalstring("0.6u") ; (0.3u + 0.3u) oxide to oxide_thk enclosure in vertical direction for "nmos2v"
                ln = (f1*l1) + ((f1-1)*evalstring("0.36u")) + evalstring("1.12u")
                ;0.36u is space b/w poly fingers
                ;(0.56u + 0.56u)  poly to oxide_thk enclosure in horizontal direction for "nmos2v"
                arean = m1*wn*ln
                An = An + arean
                An1 = atof(cdfFormatFloatString(artMakeString(An) "p"))
            else
            if( inst~>cellName == "mimcap" then
                c1 = evalstring(dbGetq(inst "c"))
                m1 = evalstring(dbGetq(inst "m"))
                
                areac = m1*c1
                ratio = areac/div_fac
                Ac = Ac + ratio
            else
            if( inst~>cellName == "resnsppoly" then
                w1 = evalstring(cdfFormatFloatString(dbGetq(inst "segW") "u"))
                l1 = evalstring(cdfFormatFloatString(dbGetq(inst "segL") "u"))
                m1 = evalstring(dbGetq(inst "segments"))
                
                wr = (m1*w1) + (m1-1)*evlastring("0.6u") + evalstring("0.56u")
                lr = l1 + evalstring("1.12u")
                arear = wr*lr
                Ar = Ar + arear
                Ar1 = atof(cdfFormatFloatString(artMakeString(Ar) "p"))
            else
            println("Nothing to calculate")
    );if
    );if
    );if
    );if
    );when
            when( and(inst~>purpose == "cell" inst~>libName != "gpdk090")
                cv1 = dbOpenCellViewByType(inst~>libName inst~>cellName "schematic")
                println(inst~>cellName)
                count = count + 1
                area(cv1) ;function call
                dbClose(cv1)
    );when
    );foreach
    );procedure

    area(geGetEditCellView())

    area = Ap1 + An1 + Ar1 + Ac
    printf("Number of instances/blocks in the design : %d \n" count)
    println(area)
    ;printf("The Total area of the design : %f \n" area)
    *************************end of area.il********************************

    And one more kind request How to get the area of each instance/block (which are in toplevel schematic only).

    Thanks in advance

                                 Prabhakr. K - Layout Design Engineer

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information