blockLogicToReal

Logic to Real converter

Information

Conversion of a digital input into a Real output without any delay according to:

input                 output
'U'  (coded by 1)     val_U
'X'  (coded by 2)     val_X
'0'  (coded by 3)     val_0
'1'  (coded by 4)     val_1
'Z'  (coded by 5)     val_Z
'W'  (coded by 6)     val_W
'L'  (coded by 7)     val_L
'H'  (coded by 8)     val_H
'-'  (coded by 9)     val_m

The values val... are given by parameters.

If the signal width is greater than 1 this conversion is done for each signal.

Parameters

TypeNameDefaultDescription
IntegernSignal width
Realvalue_UValue for digital U (uninitialized)
Realvalue_XValue for digital X (Forcing Unknown)
Realvalue_0Value for digital 0 (Forcing 0)
Realvalue_1Value for digital 1 (Forcing 1)
Realvalue_ZValue for digital Z (High Impedance)
Realvalue_WValue for digital W (Weak Unknown)
Realvalue_LValue for digital L (Weak 0)
Realvalue_HValue for digital H (Weak 1)
Realvalue_mValue for digital m (Do not care)

Connectors

TypeNameDefaultDescription
Modelica.Electrical.Digital.Interfaces.DigitalInput[n]x
Modelica.Blocks.Interfaces.RealOutput[n]y

Revisions

  • September 15, 2004 by Christoph Clauss colors changed
  • November 5, 2003 by Christoph Clauss
    initially modelled.