CfgSources#
- class pyedb.configuration.cfg_ports_sources.CfgSources(pedb=None, sources_data=None)#
Collect current-source and voltage-source entries.
Overview#
Add a current source to this configuration. |
|
Add a voltage source to this configuration. |
|
Write all configured sources into the open EDB design. |
|
Read existing sources from the open EDB design. |
|
Serialize all sources to plain dictionaries. |
Import detail#
from pyedb.configuration.cfg_ports_sources import CfgSources
Attribute detail#
- CfgSources.sources#
Method detail#
- CfgSources.get_pin_group_name(src)#
- CfgSources.add_current_source(name: str, positive_terminal: dict, negative_terminal: dict, magnitude=0.001, impedance=None, reference_designator=None, distributed=False)#
Add a current source to this configuration.
- Parameters:
- name
str Unique source name.
- positive_terminal
dict Terminal-selector dictionary for the positive pole. Use
TerminalInfofactory methods to build it.- negative_terminal
dict Terminal-selector dictionary for the negative (reference) pole.
- magnitude
float,optional Source current magnitude in amperes. Default is
0.001A.- impedance
floatorstr,optional Source impedance. When None the solver default of
5e7 Ωis used.- reference_designator
str,optional Component reference designator to associate with this source.
- distributedbool,
optional When
Trueone source element is created per pin. Default isFalse.
- name
- Returns:
CfgSourceThe newly created source object.
Examples
>>> cfg.sources.add_current_source( ... "isrc1", ... positive_terminal=TerminalInfo.pin_group("pg_VDD"), ... negative_terminal=TerminalInfo.pin_group("pg_GND"), ... magnitude=0.5, ... )
- CfgSources.add_voltage_source(name: str, positive_terminal: dict, negative_terminal: dict, magnitude=1.0, impedance=None, reference_designator=None, distributed=False)#
Add a voltage source to this configuration.
- Parameters:
- name
str Unique source name.
- positive_terminal
dict Terminal-selector dictionary for the positive pole.
- negative_terminal
dict Terminal-selector dictionary for the negative (reference) pole.
- magnitude
float,optional Source voltage in volts. Default is
1.0V.- impedance
floatorstr,optional Source impedance. When None the solver default of
1e-6 Ωis used.- reference_designator
str,optional Component reference designator.
- distributedbool,
optional Create one source per pin when
True. Default isFalse.
- name
- Returns:
CfgSourceThe newly created source object.
Examples
>>> cfg.sources.add_voltage_source( ... "vsrc1", ... positive_terminal=TerminalInfo.net("VDD"), ... negative_terminal=TerminalInfo.net("GND"), ... magnitude=1.8, ... )
- CfgSources.apply()#
Write all configured sources into the open EDB design.
- CfgSources.get_data_from_db()#
Read existing sources from the open EDB design.
- CfgSources.export_properties()#
Serialize all sources to plain dictionaries.