Package Modelica.​Electrical.​Digital.​Sources
Time-dependent digital signal sources

Information

The sources are not taken from Standard Logic. They were added since they turned out to be quite useful, since such sources are often needed. For a better optical overview the colour green was chosen for the sources.

Extends from Modelica.​Icons.​SourcesPackage (Icon for packages containing sources).

Package Contents

NameDescription
ClockDigital Clock Source
PulseDigital Pulse Source
SetDigital Set Source
StepDigital Step Source
TableDigital Tabular Source

Block Modelica.​Electrical.​Digital.​Sources.​Set
Digital Set Source

Information

Sets a nine valued digital signal, which is specified by the setval parameter.

To specify setval, the integer code has to be used.

Code Table

Logic value Integer code Meaning
'U' 1 Uninitialized
'X' 2 Forcing Unknown
'0' 3 Forcing 0
'1' 4 Forcing 1
'Z' 5 High Impedance
'W' 6 Weak Unknown
'L' 7 Weak 0
'H' 8 Weak 1
'-' 9 Do not care

If the logic values are imported by
import L = Digital.Interfaces.Logic;
they can be used to specify the parameter, e.g., L.'0' for forcing 0.

Parameters

TypeNameDefaultDescription
Logicx Logic value to be set

Connectors

TypeNameDescription
output DigitalOutputy 

Block Modelica.​Electrical.​Digital.​Sources.​Step
Digital Step Source

Information

The step source output signal steps from the value before to the value after at the time stepTime.

To specify the logic value parameters, the integer code has to be used.

Code Table

Logic value Integer code Meaning
'U' 1 Uninitialized
'X' 2 Forcing Unknown
'0' 3 Forcing 0
'1' 4 Forcing 1
'Z' 5 High Impedance
'W' 6 Weak Unknown
'L' 7 Weak 0
'H' 8 Weak 1
'-' 9 Do not care

If the logic values are imported by
import L = Digital.Interfaces.Logic;
they can be used to specify the parameter, e.g., L.'0' for forcing 0.

Parameters

TypeNameDefaultDescription
Logicbefore Logic value before step
Logicafter Logic value after step
RealstepTime step time

Connectors

TypeNameDescription
output DigitalOutputy 

Block Modelica.​Electrical.​Digital.​Sources.​Table
Digital Tabular Source

Information

The table source output signal y steps to the values of the x table at the corresponding timepoints in the t table.
The initial value is specified by y0.

To specify the logic value parameters, the integer code has to be used.

Code Table

Logic value Integer code Meaning
'U' 1 Uninitialized
'X' 2 Forcing Unknown
'0' 3 Forcing 0
'1' 4 Forcing 1
'Z' 5 High Impedance
'W' 6 Weak Unknown
'L' 7 Weak 0
'H' 8 Weak 1
'-' 9 Do not care

If the logic values are imported by
import L = Digital.Interfaces.Logic;
they can be used to specify the parameter, e.g., L.'0' for forcing 0.

Parameters

TypeNameDefaultDescription
Logicx[:]{L.'1'}vector of values
Realt[size(x, 1)]{1}vector of corresponding time points
Logicy0L.​'U'initial output value
final Integernsize(x, 1)table size

Connectors

TypeNameDescription
output DigitalOutputy 

Model Modelica.​Electrical.​Digital.​Sources.​Pulse
Digital Pulse Source

Information

The pulse source forms pulses between the quiet value and the pulse value. The pulse length width is specified in percent of the period length period. The number of periods is specified by nperiod. If nperiod is less than zero, the number of periods is unlimited.

To specify the logic value parameters, the integer code has to be used.

Code Table

Logic value Integer code Meaning
'U' 1 Uninitialized
'X' 2 Forcing Unknown
'0' 3 Forcing 0
'1' 4 Forcing 1
'Z' 5 High Impedance
'W' 6 Weak Unknown
'L' 7 Weak 0
'H' 8 Weak 1
'-' 9 Do not care

If the logic values are imported by
import L = Digital.Interfaces.Logic;
they can be used to specify the parameter, e.g., L.'0' for forcing 0.

Parameters

TypeNameDefaultDescription
Realwidth Widths of pulses in % of periods
Timeperiod Time for one period
TimestartTime Output = quiet for time < startTime
Logicpulse pulsed value
Logicquiet quiet value
Integernperiod Number of periods (< 0 means infinite number of periods)

Connectors

TypeNameDescription
output DigitalOutputy 

Model Modelica.​Electrical.​Digital.​Sources.​Clock
Digital Clock Source

Information

The clock source forms pulses between the '0' value (forcing 0) and the '1' value (forcing 1). The pulse length width is specified in percent of the period length period. The number of periods is unlimited. The first pulse starts at startTime.

The clock source is a special but often used variant of the pulse source.

Parameters

TypeNameDefaultDescription
TimestartTime Output = offset for time < startTime
Timeperiod Time for one period
Realwidth Width of pulses in % of period

Connectors

TypeNameDescription
output DigitalOutputyConnector of Digital output signal