The TransistoriZed logo should be here! But... curses! Your browser does not support SVG!

homelist of postsdocsγ ~> e-about & FAQ


A few useful functions for Virtuoso layout

I am waiting for a simulation to finish and am a bit bored having done layout whole day. Let me post some very simple but useful SKILL finctions for the layout editor of Cadence's tools.

The first one I use regularly adds a specific layout instance when invoked. I have binded it to various keys and thus can add cells from my own common library, e.g. VIA_M1_M2_min, VIA_M2_M3_min, M1_PO_min, M1_PO_minx2, M1_AA_min etc...

Now you might argue that there are normally provided p-cells for thus purpose, which is true. However, for the image sensor processes I use, this "feature" normally is not provided by the foundries. Or at least, the ones I've used so far haven't got any p-cells. A quick solution is thus having own cell library and adding layout views from it.

I also kind of like that freestyle layout drawing as it gives you the freedom to do "virtuoso stuff", which you normally can't do with p-cells, or it is tedious to set. Besides, p-cells rely on SKILL and Virtuoso's ROD engine, if that setup somehow fails, then the whole design can not be "compiled" / "viewed". Anyway, here is how I instantiate my cells:

;A function to add specified layout instances

procedure(placeInstance(lib cell view "t")
 leSetEnv("instLibName" lib)
 leSetEnv("instCellName" cell)
 leSetEnv("instViewName" view)
 hiRegTimer("hiToggleEnterForm()" 1)
 leHiCreateInst()
)

;Binding it to a key:
hiSetBindKey("Layout" "Ctrl Alt1" "placeInstance(\"commonLib\" \"M1_M2_min\" \"layout\")")

You can set hiRegTimer("hiToggleEnterForm()" 1) to 0 if you want the enter form to appear and not be auto-minimized, or on the other way around '1' would auto-minimize the window and you are good to go.

Another quick and handy layout bindkey function is the toggle layout: Here is how we can toggle layer visibility, I know there's tons of resources on that, but still may be useful to have a yet another source.

;Toggle layer selectability procedure for metal layers

procedure( toggleMetal(num "x")
  let(((metlay list(sprintf(nil "M%d" num) "drawing")) )
    if(leIsLayerSelectable(metlay) then
      leSetLayerSelectable(metlay nil)
    else
      leSetLayerSelectable(metlay t)
    )
    hiRedraw()
  )
)

We can set it to an arbitraty layer defined in our techlib by minor corrections. We can even choose to toggle schematic editor layers.

Alternatively, we can also toggle visibility which is one of my favorite functions:

;Toggle layer visibility procedure

procedure( CCStoggleNW(num "x")
  let(((metlay list(sprintf(nil "NW" num) "drawing")) )
    if(leIsLayerVisible(metlay) then
      leSetLayerVisible(metlay nil)
    else
      leSetLayerVisible(metlay t)
    )
    hiRedraw()
  )
)

I guess the most important stress in this post, and in doing fast and efficient layout (bar good floorplanning and thinking in advance), is the good set of bindkey functions. Try to use the mouse as less frequent as possible, i.e. only for drawing or zooming-in-out.

Date:Tue Apr 28 17:45:49 CET 2015

Comments

No comments yet
*Name:
Email:
Notify me about new comments on this page
Hide my email
*Text: