EMCRuleCheckerSettings#

class pyedb.misc.siw_feature_config.emc_rule_checker_settings.EMCRuleCheckerSettings#

Manages EMI scanner settings.

Examples

>>> from pyedb.misc.siw_feature_config.emc_rule_checker_settings import EMCRuleCheckerSettings
>>> settings = EMCRuleCheckerSettings()
>>> settings.add_net("net1", is_clock=True)

Overview#

read_xml

Read settings from an XML file.

write_xml

Write settings to a file in XML format.

write_json

Write settings to a file in JSON format.

read_json

Read settings from a JSON file.

add_net

Assign tags to a net.

add_component

Assign tags to a component.

Import detail#

from pyedb.misc.siw_feature_config.emc_rule_checker_settings import EMCRuleCheckerSettings

Attribute detail#

EMCRuleCheckerSettings.version = '1.0'#
EMCRuleCheckerSettings.encoding = 'UTF-8'#
EMCRuleCheckerSettings.standalone = 'no'#
EMCRuleCheckerSettings.tag_library#
EMCRuleCheckerSettings.net_tags#
EMCRuleCheckerSettings.component_tags#

Method detail#

EMCRuleCheckerSettings.read_xml(fpath: str) None#

Read settings from an XML file.

Parameters:
fpathstr

Path to file.

Examples

>>> settings = EMCRuleCheckerSettings()
>>> settings.read_xml("config.xml")
EMCRuleCheckerSettings.write_xml(fpath: str) None#

Write settings to a file in XML format.

Parameters:
fpathstr

Path to file.

Examples

>>> settings = EMCRuleCheckerSettings()
>>> settings.write_xml("config.xml")
EMCRuleCheckerSettings.write_json(fpath: str) None#

Write settings to a file in JSON format.

Parameters:
fpathstr

Path to file.

Examples

>>> settings = EMCRuleCheckerSettings()
>>> settings.write_json("config.json")
EMCRuleCheckerSettings.read_json(fpath: str) None#

Read settings from a JSON file.

Parameters:
fpathstr

Path to file.

Examples

>>> settings = EMCRuleCheckerSettings()
>>> settings.read_json("config.json")
EMCRuleCheckerSettings.add_net(name: str, is_bus: bool | str | int = False, is_clock: bool | str | int = False, is_critical: bool | str = False, net_type: str = 'Single-Ended', diff_mate_name: str = '') None#

Assign tags to a net.

Parameters:
namestr

Name of the net.

is_busbool, str or int, optional

Whether the net is a bus. The default is False.

is_clockbool, str or int, optional

Whether the net is a clock. The default is False.

is_criticalbool or str, optional

Whether the net is critical. The default is False.

net_typestr, optional

Type of the net. The default is "Single-Ended".

diff_mate_namestr, optional

Differential mate name. The default is "".

Examples

>>> settings = EMCRuleCheckerSettings()
>>> settings.add_net("CLK_100M", is_clock=True, is_critical=True)
>>> settings.add_net("USB_DP", net_type="Differential", diff_mate_name="USB_DN")
EMCRuleCheckerSettings.add_component(comp_name: str, comp_value: str, device_name: str, is_clock_driver: bool | str, is_high_speed: bool | str, is_ic: bool | str, is_oscillator: bool | str, x_loc: str | float, y_loc: str | float, cap_type: str | None = None) None#

Assign tags to a component.

Parameters:
comp_namestr

Name of the component.

comp_valuestr

Value of the component.

device_namestr

Name of the device.

is_clock_driverbool or str

Whether the component is a clock driver.

is_high_speedbool or str

Whether the component is high speed.

is_icbool or str

Whether the component is an IC.

is_oscillatorbool or str

Whether the component is an oscillator.

x_locstr or float

X coordinate.

y_locstr or float

Y coordinate.

cap_typestr or None, optional

Type of the capacitor. Options are "Decoupling" and "Stitching". The default is None.

Examples

>>> settings = EMCRuleCheckerSettings()
>>> settings.add_component(
...     comp_name="U1",
...     comp_value="FPGA",
...     device_name="XC7A35T",
...     is_clock_driver=False,
...     is_high_speed=True,
...     is_ic=True,
...     is_oscillator=False,
...     x_loc="10.5",
...     y_loc="20.3",
... )