Netlist extraction into SPICE format for KLayout.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Thomas Kramer 9b695e9e9e Create dummy net name if net is None. 8 months ago
doc Add link to html doc. 8 months ago
python Create dummy net name if net is None. 8 months ago
.gitignore Initial commit. 8 months ago
LICENSE Add license. 8 months ago
README.md Comment on model names. 8 months ago
grain.xml Add example to README. 8 months ago

README.md

SpiceX

Netlist extraction into SPICE format for KLayout.

Note: This code used KLayout on the dvb branch. It’s probably not stable.

Example

import pya
import spicex

"""

Netlist extraction is skipped here.
See KLayout documentation on how to extract a netlist.

https://github.com/KLayout/klayout/wiki/2019-01-07

"""

# Perform netlist extraction
l2n.extract_netlist()

netlist = l2n.netlist()
netlist.make_top_level_pins()
netlist.purge()
netlist.purge_nets()

# Convert KLayout netlist to a PySpice netlist.

# Provide the SPICE model names for the transistor types.
device_class_name_to_model_mapping = {
    'NMOS': 'NMOS_VTL',
    'PMOS': 'PMOS_VTL'
}

spice_netlist = spicex.netlist_to_spice(netlist, device_class_name_to_model_mapping)

# Dump SPICE to stdout.
print(spice_netlist)