Bases: decida.ItclObjectx.ItclObjectx
circuit simulator netlist parsing.
synopsis:
SimulatorNetlist reads a circuit-simulator netlist and extracts some limited information about the circuit, such as lists or devices, and total capacitance on each node.
constructor arguments:
- netlist_file (string)
simulator netlist file
- **kwargs (dict)
configuration-options
configuration options:
- verbose (bool) (optional, default=False)
enable/disable verbose mode
- simulator (string) (optional, default="sspice")
circuit simulator associated with the netlist file, one of :
simulator: format: spice spice hspice spice sspice spice eldo spice adit spice nanosim spice finesim spice ngspice spice spectre spectre spectrerf spectre ncverilog verilog ncsim verilog vsim verilog vcs verilog
example (from test_SimulatorNetlist):
from decida.SimulatorNetlist import SimulatorNetlist
s = SimulatorNetlist("sar_seq_dig.net", simulator="ngspice")
print "subcircuits :"
print s.get("subckts")
print "instances :"
print s.get("insts")
print "capacitors:"
print s.get("caps")
print "resistors:"
print s.get("ress")
public methods:
- public methods from ItclObjectx
access method for several parameters.
arguments:
- what (string)
specify what to retrieve:
- netlist-file: return netlist file path
- netlist-format: netlist format (circuit simulator)
- original-netlist: unmodified netlist text
- filtered-netlist: netlist after line-continuations and other preprocessing has been done
- subckts: list of subcircuits defined in the netlist
- insts: list of subcircuit instances in the netlist
- caps: list of capacitors in the netlist
- ress: list of resistors in the netlist
- **kwargs (dict)
unused
get capacitor information.
arguments:
- cap (string)
name of capacitor instance
- detail (string)
one of:
- ports: return list of capacitor ports
- value: return capacitance value
get subcircuit instance information.
arguments:
- inst (string)
name of subcircuit instance
- detail (string)
one of:
- ports: return list of instance ports
- params: return list of instance parameters
- subckt: return subcircuit name
get resistor information.
arguments:
- res (string)
name of resistor instance
- detail (string)
one of:
- ports: return list of resistor ports
- value: return resistor value
get subcircuit information.
arguments:
- subckt (string)
name of subcircuit
- detail (string)
one of:
- ports: return list of subcircuit ports