How can I get connectivity information from tech file?

tech = pya.NetTracerConnectivity()
tech.connection("1/0", "5/0")
tracer = pya.NetTracer()

To use the net trace function in the GUI, I have already saved the connectivity information in the tech file.
How can I get this information in a script and use it?


  • Hi @MooGyuBae,

    The key is the Technology object. If you have loaded the technology, use "technology_by_name", like this

    tech = pya.Technology.technology_by_name("sky130A")

    you can also construct a Technology object from a XML file:

    tech = pya.Technology()

    The technology information is organized into "components" (use "component_names" to get a list of them). The one you're looking for is "connectivity":

    tech_comp = tech.component("connectivity")

    (returns None if the technology does not have connectivity information). This will give you NetTracerTechnologyComponent object and this is the key to getting the NetTracerConnectivity object. As there can be multiple stacks (a feature introduced in version 0.28), you have to iterate the connectivity objects:

    for conn in tech_comp.each():

    Pick the one with the name you are looking for and "conn" will be the object you need for the net tracer.

    Note that pre-0.28, the technology component itself was the NetTracerConnectivity object, but that meant there was only one stack per technology.


Sign In or Register to comment.