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. 10 months ago
doc Add link to html doc. 10 months ago
python Create dummy net name if net is None. 10 months ago
.gitignore Initial commit. 10 months ago
LICENSE Add license. 10 months ago
README.md Comment on model names. 10 months ago
grain.xml Add example to README. 10 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)