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:

  • Circuit

  • 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_dirstr

This is the directory were the DUT will create its database.

namestr

Prefix for the database

dut_typeDutType

Type of the DUT.

nodesstr

Strings with comma separated node names of DUT. If nodes is None, nodes will be requested from Dut_type class.

inp_headerstr, list[str] or Circuit

Depending of the used simulator, here different options are possible.

simulator_optionsOrderedDict
Attributes:
sim_commandstr

Command to start the correct circuit simulator

sim_argslist[str]

List of arguments for the simulator command, will be added one by one before the input file.

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_contentdict

Readed dictionary from a saved json DutCircuit.

classes_technologyList[Type[Technology]]

All possible technologies this loaded DutCircuit can have. One will be choosen according to the serialized technology loaded from the file.

subclass_kwargsDict, optional

Additional kwargs necessary to create the concrete subclassed DutView.

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!

Returns:
str or False

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

property inp_header[source]

Getter method for the input header of the simulation input file

property modelcard[source]

Returns the saved modelcard

scale_modelcard()[source]

Scales the given modelcard to the actual size of the dut.