Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Regarding getting properties of macros

Status
Not open for further replies.

vijji.sami

Newbie level 6
Joined
Mar 7, 2012
Messages
11
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,348
guys can any body tell me how i can get the properties height & width of macro in the design so that i can use it in TCL program.I just want to get it through a command in encounter console whenever i select it ,so that i can use it in TCL script.

Thank u in advance.
I
 

Select the cell/macro, right click on it and choose Attributes/Attribute Editor and it will give the details . Hope this helps.
 

The following script will report the area of a specified cell. It can be used on standard cells, pads and hard macros. Replace "cellName" will the cell you want to report the area for. If the cell has any obstructions on the overlap layer it will sum the area of the obstructions and report that as the area. Otherwise, it reports the area based on the SIZE statement in the LEF. You can modify this script according to your requirements.

Code:
set cellName "cellName"
set cellPtr [dbGet -p head.allCells.name $cellName]
if {$cellPtr == 0x0} {
  Puts "ERROR: Cannot find a cell of name $cellName."
} else {
  if {[dbGet selected.cell.allObstructions.layer.type overlap] == 0x0} {
    #
    # If the cell does not contain an obstruction on the overlap layer
    # then calculate the area using the SIZE statement in the LEF.
    #
    set size [lindex [dbGet $cellPtr.size] 0]
    set width [lindex $size 0]
    set height [lindex $size 1]
    set area [expr $width * $height]
    Puts "Area of cell $cellName is $area."
  } else {
    #
    # Else the cell contains obstructions on the overlap layer. Combine the obstructions
    # and calculate their resulting area.
    #
    set overlapLayerObsPtr [dbGet -p2 selected.cell.allObstructions.layer.type overlap]
    set totalShape {0 0 0 0}
    foreach shape [dbGet $overlapLayerObsPtr.shapes.rect] {
      Puts "rect: $shape"
      set totalShape [dbShape $shape OR $totalShape -output rect]
    }
    set area 0
    foreach rect $totalShape {
      set area [expr $area + (([lindex $rect 2] - [lindex $rect 0]) * ([lindex $rect 3] - [lindex $rect 1]))]
    }
    Puts "Area of cell $cellName is $area based on overlap layer obstructions."
  }
}
 

thank u very much dude.it helps me a lot
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top