Not signed in (Sign In)

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.

  1.  
    Is there a way to find (hierarchically) the min/max dimension of shapes in a design?
    • CommentAuthorMatthias
    • CommentTimeFeb 8th 2013 edited
     

    Hello,

    could you be somewhat more specific?

    Maybe you can explain what information you want to retrieve (i.e. what do you mean by "hierarchically"?) or what kind of functionality you look for (script/interactive etc.)

    Matthias

  2.  
    By "hierarchically," I mean that the minimum (maximum) shape may be in an instance of a cell that is used multiple levels below the top cell (an instance in multiple instances in another multiple instances, etc before reaching the top cell).

    As far as functionality, an RBM script would be fine; or whatever is the simplest and most effective. The returned information I'm looking for is the dimension of the shape, its location, and name of the cell where it's in.

    By extension, is it possible to find the minimum/maximum spacing between two shapes as well?
    • CommentAuthorMatthias
    • CommentTimeFeb 14th 2013 edited
     

    Hallo,

    below is some code that might serve as a starting point. To install that script, create a new macro in the Macro Development IDE ("Tools/Macro Development"). Paste the code below into the code window. You can assign some key shortcut using the "Edit Properties" button in the tool bar above the macro code. Or create a menu entry for this macro.

    The macro will take the first selected shape and show it's signature, the cell that this shape is in and the shape's bounding box as seen from the current cell (I assume that is what you mean by "hierarchical").

    There is no efficient way to determine minimum spacings currently. You could iterate over all shapes and check all shapes versus all others. But that will be pretty slow for usual layouts.

    Regards,

    Matthias

    mw = RBA::Application::instance.main_window
    lv = mw.current_view 
    lv || raise("No view open")
    
    msg = nil
    
    lv.each_object_selected do |sel|
      if !sel.is_cell_inst?
        cv = lv.cellview(sel.cv_index)
        bbox = sel.shape.bbox.transformed_cplx(sel.trans) * cv.layout.dbu
        msg = "Shape: " + sel.shape.to_s + "\n"
        msg += "In Cell: " + cv.layout.cell_name(sel.cell_index)
        msg += "Bounding box as seen from top level: " + bbox.to_s
        break
      end
    end
    
    if !msg
      raise("No shape selected")
    else
      RBA::MessageBox::info("Shape Info", msg, RBA::MessageBox::Ok)
    end
    
    • CommentAuthorMatthias
    • CommentTimeDec 4th 2017
     

    Edit:

    since version 0.25, "micrometer unit" properties are available. With these, the multiplication with the database unit is no longer required and the code simplifies to:

    mw = RBA::Application::instance.main_window
    lv = mw.current_view 
    lv || raise("No view open")
    
    msg = nil
    
    lv.each_object_selected do |sel|
      if !sel.is_cell_inst?
        cv = lv.cellview(sel.cv_index)
        bbox = sel.shape.dbbox.transformed(sel.dtrans)
        msg = "Shape: " + sel.shape.to_s + "\n"
        msg += "In Cell: " + cv.layout.cell_name(sel.cell_index)
        msg += "Bounding box as seen from top level: " + bbox.to_s
        break
      end
    end
    
    if !msg
      raise("No shape selected")
    else
      RBA::MessageBox::info("Shape Info", msg, RBA::MessageBox::Ok)
    end
    

    Matthias