Global netlist object representing the result of a netlister run. More...
Public Member Functions | |
def | __init__ |
Create a netlist. More... | |
def | get_toplevel_attribute |
Return the value of a toplevel attribute. More... | |
def | error |
Print an error message and mark the netlist as failed. More... | |
def | warn |
Print a warning message. More... | |
Public Attributes | |
components | |
Aggregated list of all components in the netlist. More... | |
toplevel_sheets | |
List of sheets for the schematics named on the command line. More... | |
sheets | |
List of sheets. More... | |
failed | |
Whether an error has occurred. More... | |
nets | |
List of nets. More... | |
packages | |
List of packages. More... | |
packages_by_refdes | |
Convenience dictionary for looking up packages by their refdes. More... | |
nets_by_name | |
Convenience dictionary for looking up nets by their name. More... | |
schematics | |
List of schematic blueprints. More... | |
schematics_by_filename | |
Dictionary mapping filenames to schematic blueprints. More... | |
Global netlist object representing the result of a netlister run.
Definition at line 41 of file netlist.py.
def xorn.geda.netlist.netlist.Netlist.__init__ | ( | self, | |
toplevel_filenames, | |||
traverse_hierarchy, | |||
verbose_mode = False , |
|||
prefer_netname_attribute = False , |
|||
flat_package_namespace = False , |
|||
flat_netname_namespace = False , |
|||
flat_netattrib_namespace = False , |
|||
refdes_mangle_func = NotImplemented , |
|||
netname_mangle_func = NotImplemented , |
|||
default_net_name = 'unnamed_net' , |
|||
default_bus_name = 'unnamed_bus' |
|||
) |
Create a netlist.
This is the main function which creates a netlist. The most important argument is toplevel_filenames; it contains the filenames of the schematic pages which should be traversed. Other schematic pages are loaded as necessary if the traverse_hierarchy argument is set.
[in] | toplevel_filenames | list of filenames for the toplevel schematics, as given on the command line |
[in] | traverse_hierarchy | whether to descend into sub-schematics |
[in] | verbose_mode | whether to print "Loading schematic" and "Going to traverse source" messages |
[in] | prefer_netname_attribute | whether to prefer net names set via a net segment's netname= attribute over net names set via a pin's net= attribute |
[in] | flat_package_namespace | whether to use a common package namespace for all subsheets |
[in] | flat_netname_namespace | whether to use a common netname= namespace for all subsheets |
[in] | flat_netattrib_namespace | whether to use a common net= namespace for all subsheets |
[in] | refdes_mangle_func | function for mangling package/component refdes's |
[in] | netname_mangle_func | function for mangling net names |
[in] | default_net_name | naming template for unnamed nets |
[in] | default_bus_name | naming template for unnamed buses |
Definition at line 97 of file netlist.py.
def xorn.geda.netlist.netlist.Netlist.error | ( | self, | |
msg | |||
) |
Print an error message and mark the netlist as failed.
Definition at line 362 of file netlist.py.
def xorn.geda.netlist.netlist.Netlist.get_toplevel_attribute | ( | self, | |
name, | |||
default = KeyError |
|||
) |
Return the value of a toplevel attribute.
Searches for an floating attribute with the name name in the schematic files listed on the command line. Calls error if multiple attributes with different values are found.
Traditionally, this function returned 'not found'
when no such attribute existed in the toplevel schematic.
ValueError | if no matching attribute was found and no default was given |
Definition at line 336 of file netlist.py.
def xorn.geda.netlist.netlist.Netlist.warn | ( | self, | |
msg | |||
) |
Print a warning message.
Definition at line 368 of file netlist.py.
xorn.geda.netlist.netlist.Netlist.components |
Aggregated list of all components in the netlist.
Definition at line 99 of file netlist.py.
xorn.geda.netlist.netlist.Netlist.failed |
Whether an error has occurred.
Definition at line 106 of file netlist.py.
xorn.geda.netlist.netlist.Netlist.nets |
xorn.geda.netlist.netlist.Netlist.nets_by_name |
Convenience dictionary for looking up nets by their name.
Definition at line 122 of file netlist.py.
xorn.geda.netlist.netlist.Netlist.packages |
List of packages.
Populated by xorn.geda.netlist.package.
Definition at line 116 of file netlist.py.
xorn.geda.netlist.netlist.Netlist.packages_by_refdes |
Convenience dictionary for looking up packages by their refdes.
Definition at line 119 of file netlist.py.
xorn.geda.netlist.netlist.Netlist.schematics |
List of schematic blueprints.
Definition at line 125 of file netlist.py.
xorn.geda.netlist.netlist.Netlist.schematics_by_filename |
Dictionary mapping filenames to schematic blueprints.
Definition at line 127 of file netlist.py.
xorn.geda.netlist.netlist.Netlist.sheets |
List of sheets.
Definition at line 103 of file netlist.py.
xorn.geda.netlist.netlist.Netlist.toplevel_sheets |
List of sheets for the schematics named on the command line.
Definition at line 101 of file netlist.py.