Inverter tests class

Inverter

Inverter model template The System Development Kit Used as a template for all TheSyDeKick Entities.

Current docstring documentation style is Numpy https://numpydoc.readthedocs.io/en/latest/format.html

For reference of the markup syntax https://docutils.sourceforge.io/docs/user/rst/quickref.html

This text here is to remind you that documentation is important. However, youu may find it out the even the documentation of this entity may be outdated and incomplete. Regardless of that, every day and in every way we are getting better and better :).

Initially written by Marko Kosunen, marko.kosunen@aalto.fi, 2017.

Role of section ‘if __name__==”__main__”’

This section is for self testing and interfacing of this class. The content of it is fully up to designer. You may use it for example to test the functionality of the class by calling it as pyhon3 __init__.py or you may define how it handles the arguments passed during the invocation. In this example it is used as a complete self test script for all the simulation models defined for the inverter.

class inverter.inverter(*arg)[source]

Inverter parameters and attributes :param *arg: :param If any arguments are defined: :param the first one should be the parent instance:

proplist

List of strings containing the names of attributes whose values are to be copied from the parent

Type:

array_like

Rs

Sampling rate [Hz] of which the input values are assumed to change. Default: 100.0e6

Type:

float

vdd

Supply voltage [V] for inverter analog simulation. Default 1.0.

Type:

float

IOS

Members of this bundle are the IO’s of the entity. See documentation of thsdk package. Default members defined as

self.IOS.Members[‘A’]=IO() # Pointer for input data self.IOS.Members[‘Z’]= IO() # pointer for oputput data self.IOS.Members[‘control_write’]= IO() # Piter for control IO for rtl simulations

Type:

Bundle

model

Default ‘py’ for Python. See documentation of thsdk package for more details.

Type:

string

__init__(*arg)[source]

Inverter parameters and attributes :param *arg: :param If any arguments are defined: :param the first one should be the parent instance:

proplist

List of strings containing the names of attributes whose values are to be copied from the parent

Type:

array_like

Rs

Sampling rate [Hz] of which the input values are assumed to change. Default: 100.0e6

Type:

float

vdd

Supply voltage [V] for inverter analog simulation. Default 1.0.

Type:

float

IOS

Members of this bundle are the IO’s of the entity. See documentation of thsdk package. Default members defined as

self.IOS.Members[‘A’]=IO() # Pointer for input data self.IOS.Members[‘Z’]= IO() # pointer for oputput data self.IOS.Members[‘control_write’]= IO() # Piter for control IO for rtl simulations

Type:

Bundle

model

Default ‘py’ for Python. See documentation of thsdk package for more details.

Type:

string

define_io_conditions()[source]

This overloads the method called by run_rtl method. It defines the read/write conditions for the files

init()[source]

Method to re-initialize the structure if the attribute values are changed after creation.

main()[source]

The main python description of the operation. Contents fully up to designer, however, the IO’s should be handled bu following this guideline:

To isolate the internal processing from IO connection assigments, The procedure to follow is 1) Assign input data from input to local variable 2) Do the processing 3) Assign local variable to output

run(*arg)[source]

The default name of the method to be executed. This means: parameters and attributes control what is executed if run method is executed. By this we aim to avoid the need of documenting what is the execution method. It is always self.run.

Parameters:

*arg – The first argument is assumed to be the queue for the parallel processing defined in the parent, and it is assigned to self.queue and self.par is set to True.