Netlist Device terminal creation

Hi Matthias,

First of all, thank for your great work on Klayout. I am working on some netlist extraction from some layout, I found some difficulties in defining and create the Device's terminal and parameters. I notice there are classes of DeviceTerminalDefinition and DeviceParameterDefinition, but did not find any methods to create or link to the given DeviceClass/Device class. I am thinking to achieve something like the following:

iter=pya.RecursiveShapeIterator(ly,cell,layer[])
iter.max_depth=0

while not iter.at_end():
  if iter.shape().is_path():
    plist=[]
    for point in iter.shape().dpath.each_point():
      plist.append(point+iter.trans().disp*ly.dbu)
    Dev=TOP_circuits.create_device(Deviceclass,"simpledevice")
    Dev.create_terminal("t1")
    Dev.create_terminal("t2")
    Dev.create_terminal("t3")

Comments

  • Thanks.

    But your code doesn't seem to be quite complete. What are you trying to achieve?

    Matthias

  • I am looking forward to a robust discussion of methods.

    Especially methods which allow to "assert" a connectivity
    by some placed information rather than by mask layer
    Booleans alone ("derived" connectivity).

  • Hi Jim,

    you mean inside LVS? There basically is the "connect_implicit" feature which will tie together nets with the same labels.

    Matthias

  • Hi, Matthias,

    No, I was thinking of the low level devices and ways
    to declare that such-and-such feature is such-and-such
    pin, in the extraction phase. Also, how to assert that a
    particular "TANK" is a specific device type using texts
    rather than a plethora of device-name-specific recognition
    layers, as this runs out of road when you have more
    than a few "legit" device types or would like to drive
    a model-per-device-name rather than just using AREA=
    to scale a couple of models to "fit" a number of device
    sizes, collector-stretches and so on.

    I see things like multi-collector lateral PNPs with the
    collectors apportioned non-equally, there I'd like to be
    sure that (say) if C1 and C2 are each 1/4 and C3 is 1/2
    the circumference, that C3 really gets picked up as C3,
    and not C1 - even though they have no layer-nest
    difference to recognize other than perhaps area.

    I favor explicit over implicit*logic, I guess.

  • But your code doesn't seem to be quite complete. What are you trying to achieve?

    Hi Matthias,
    I am going to extract a netlist from a given Layout. The layout will be built from static cells, Pcell and paths, and all the pins will be label using pya.Text shape. so the basic idea is:

    1. iterate all 0 hierarchy path shape and register as different devices in one device class
    2. iterate all child instance and register as different devices (if leafcell) or subcircuits
    3. iterate all the Text shape and register as pins
    4. pins with same Point location register as Net
    5. add all the devices, subcircuits, Net into the circuits
    6. Those unconnected pins is the PINS for the circuits
    7. repeat all steps to all subcircuits

    the above code is actually for step one, I am facing the problem I cannot create terminals and parameter for a new device class.

  • Hi,

    KLayout provides netlist extraction from a layout as the basis for the LVS feature. So I understand you want to reimplement the same by other means.

    I'd seriously consider whether you really want to reimplement something which is there already. Regarding the netlist API I'm not sure whether all write features are available to build a full netlist by means of an external script. The API is essentially provided for analysing a netlist generated by KLayouts netlist extractor.

    Matthias

Sign In or Register to comment.