• 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
  • IC Layout
    IC Layout over 16 years ago

     Suppose If I have four 4:1 mux's and to resitors and few transistors/caps & each mux is having again two 2:1 mux's inside ..

    Now along with the total area I would like to have the area of each 4:1 Mux separately ...

    I am sending my code here..please notice the comment where I am getting the problem

    *******************************

    totalArea = 0u 

      procedure( area(inst)
                   if( inst~>cellName == "pmos2v"  then
                       w1 = cdfParseFloatString(dbGetq(inst "w"))
                       l1 = cdfParseFloatString(dbGetq(inst "l"))
                       m1 = cdfParseFloatString(dbGetq(inst "m"))
                       f1 = cdfParseFloatString(dbGetq(inst "fingers"))

                           wp = w1 + 1.4u
                           lp = f1*l1 + (f1-1)*0.36u + 2u
                                   AREA = m1*wp*lp
                   else
                   if(inst~>cellName == "nmos2v"  then
                       w1 = cdfParseFloatString(dbGetq(inst "w"))
                       l1 = cdfParseFloatString(dbGetq(inst "l"))
                       m1 = cdfParseFloatString(dbGetq(inst "m"))
                       f1 = cdfParseFloatString(dbGetq(inst "fingers"))

                           wn = w1 + 0.6u
                           ln = f1*l1 + (f1-1)*0.36u + 1.2u
                                   AREA = m1*wn*ln

                  else
                  if((inst~>cellName == "mimcap" ) then
                       c1 = cdfParseFloatString(dbGetq(inst "c"))
                       m1 = cdfParseFloatString(dbGetq(inst "m"))

                                   areac = m1 * c1
                                   AREA = areac/AA

                   else
                   if(inst~>cellName == "resnsppoly"  then
                       w1 = cdfParseFloatString(dbGetq(inst "segW"))
                       l1 = cdfParseFloatString(dbGetq(inst "segL"))

                       m1 = dbGetq(inst "segments")

                           wr = m1*w1 + (m1-1)*0.6u + 0.56u
                           lr = l1 + 1.12u
                                   AREA = wr * lr


    ) ) ) )
    AREA
     );proc1

    **********************

      procedure( PKsumArea(@optional (cv geGetEditCellView()))
           foreach(inst cv~>instances
                   if(inst~>libName == "gpdk090" then

                      totalArea = totalArea + area(inst)

          else
                   when(inst~>purpose == "cell"
                   master = dbOpenCellViewByType(inst~>libName inst~>cellName "schematic")
                   ;;;;;;;;;;;;;;;;;;;;;for this particular 'master' --if it refers to toplevel schemaic --I need to get this area ;;;;;;;;;;;;;;;;;;;;;;;;;;;;
                   when(master
                   println(master~>cellName)
                   PKsumArea(master)
                   )
           )
    )
    )
    )
    totalArea
    )
    PKsumArea()
    println(totalArea)

    ************************************************

    If still unclear I will send some more trials where I faild ........

    thanks & regards

                              Prabhakar. K
     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 16 years ago

    OK. I've tidied up the code, removed the global variables (made them local, except for AA which I didn't know what it was), changed the nested if-then-else in the area function to be a case(), coped with unrecognized devices, and added something to print out the area of the top level blocks as it goes along.

    ; globals used in this code that I can't account for:
    ; AA
    procedure( PKinstArea(inst)
      let((w1 l1 m1 f1 wp lp wr lr wn ln c1 areac AREA)
        case(inst~>cellName
          ("pmos2v"
            w1 = cdfParseFloatString(inst~>w)
            l1 = cdfParseFloatString(inst~>l)
            m1 = cdfParseFloatString(inst~>m)
            f1 = cdfParseFloatString(inst~>fingers)
    
    	wp = w1 + 1.4u
    	lp = f1*l1 + (f1-1)*0.36u + 2u
    	AREA = m1*wp*lp
    	)
          ("nmos2v"
            w1 = cdfParseFloatString(inst~>w)
            l1 = cdfParseFloatString(inst~>l)
            m1 = cdfParseFloatString(inst~>m)
            f1 = cdfParseFloatString(inst~>fingers)
    
    	wn = w1 + 0.6u
    	ln = f1*l1 + (f1-1)*0.36u + 1.2u
    	AREA = m1*wn*ln
    	)
          ("mimcap"
    	c1 = cdfParseFloatString(inst~>c)
    	m1 = cdfParseFloatString(inst~>m)
    
    	areac = m1 * c1
    	AREA = areac/AA
    	)
          ("resnsppoly"
    	w1 = cdfParseFloatString(inst~>segW)
    	l1 = cdfParseFloatString(inst~>segL)
    	m1 = inst~>segments
    
    	wr = m1*w1 + (m1-1)*0.6u + 0.56u
    	lr = l1 + 1.12u
    	AREA = wr * lr
    	)
          (t
    	warn("Unrecognized device %L\n" inst~>cellName)
    	AREA = 0.0
            )
        ) ; case
        AREA
      ) ; let
    ) ; procedure PKinstArea
    
    procedure( PKsumArea(@optional (cv geGetEditCellView()) (topLevel t))
      let((master instArea (area 0.0))
        foreach(inst cv~>instances
          if(inst~>libName == "gpdk090" then
    	area=area+PKinstArea(inst)
          else
    	when(inst~>purpose == "cell"
    	  master = dbOpenCellViewByType(inst~>libName inst~>cellName 
    	    "schematic")
    	  when(master
    	    instArea=PKsumArea(master nil)
    	    when(topLevel
    	      printf("Instance %s of %s has area %g\n" inst~>name
    		inst~>cellName instArea)
    	    ) ; when topLevel
    	    area=area+instArea
    	  ) ; when master
    	) ; when purpose is cell
          ) ; if
        ) ; foreach
        area
      )
    ) ; procedure PKsumArea
    
    totalArea=PKsumArea()
    printf("Total area is %g\n" totalArea)
    

    Regards,

    Andrew.

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

     Thanks a lot.....Sir, This is what I suppose to have...

    Really, I inspired with your valuable suggestions......

                                 Prabhakar. K - Layout Design Engineer
     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
<

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