Circuit simulation DuTs
DutCircuit Submodules
DutCircuit class
Provdes a class for cirtuit DuTs
Provides a interface superclass. Here all methods which must be implemented by all circuit simulator interfaces are collected.
A DuT can be supplied using the input_circuit parameter. This parameter can be:
String with path to a netlist of a circuit
String with the netlist of a circuit
List with paths to netlists or strings with netlists, these will be combined into the netlist to simulate.
Author: Mario Krattenmacher | Mario.Krattenmacher@semimod.de
- class DMT.core.dut_circuit.DutCircuit(database_dir: str, name: str, dut_type: DutType, input_circuit, simulator_options: dict | None = None, get_circuit_arguments: dict | None = None, **kwargs)[source]
Bases:
DutView
Superclass for common methods and attributes of cirtuit DuTs
Makes a circuit simulator like ADS or XYCE useable by DMT
- Parameters:
- database_dir
str
This is the directory were the DUT will create its database.
- name
str
Prefix for the database
- dut_type
DutType
Type of the DUT.
- nodes
str
Strings with comma separated node names of DUT. If nodes is None, nodes will be requested from Dut_type class.
- inp_header
str
,list
[str
]or
Circuit
Depending of the used simulator, here different options are possible.
- simulator_options
OrderedDict
- database_dir
- Attributes:
- create_inp_header(inp_circuit)[source]
Creates the inp_header from the given circuit.
- Parameters:
- inp_circuit
Type and content depends on implementation of inheriting class!
- Returns:
str
input header
- classmethod from_json(json_content: Dict, classes_technology: List[Type[Technology]], subclass_kwargs: Dict | None = None) DutCircuit [source]
Static class method. Loads a DutCircuit object from a pickle file with full path save_dir.
Calls the from_json method of DutView with all dictionary inside the “parent” keyword. Afterwards the additional parameters are set correctly.
- Parameters:
- json_content
dict
Readed dictionary from a saved json DutCircuit.
- classes_technology
List
[Type
[Technology
]] All possible technologies this loaded DutCircuit can have. One will be choosen according to the serialized technology loaded from the file.
- subclass_kwargs
Dict
,optional
Additional kwargs necessary to create the concrete subclassed DutView.
- json_content
- Returns:
DutTcad
Loaded object.
- get_hash() bool | str [source]
Returns a md5 hash generated from self.inp_header, if it is not set, this will return False!
Is overwritten here, to include the imported and appended files!
Notes
Also account for dut.name?
- info_json(**_kwargs) Dict [source]
Returns a dict with serializeable content for the json file to create.
The topmost dict MUST have only one key: The string casted class name. Inside the parameters are:
A version key,
all extra parameters of DutCircuit compared to DutView and
the info_json of DutView.
- Returns:
dict
str(DutCircuit): serialized content