Modelica.Electrical.Digital.Converters

Converters between 2-,3-,4- and 9-valued logic

Information


The Converter BooleanToLogic, LogicToBoolean, RealToLogic, and LogicTo Real components are not standard logic components. They were designed to easily convert from or to Boolean or Real valued signals. The LogicToX01, LogicToX01Z and LogicTo UX01 converters correspond to standard logic functions. They transform 9-valued logic to 3- or 4-valued logic.

Extends from Modelica.Icons.Package (Icon for standard packages).

Package Content

NameDescription
Modelica.Electrical.Digital.Converters.LogicToX01 LogicToX01 Conversion to X01
Modelica.Electrical.Digital.Converters.LogicToX01Z LogicToX01Z Conversion to X01Z
Modelica.Electrical.Digital.Converters.LogicToUX01 LogicToUX01 Conversion to UX01
Modelica.Electrical.Digital.Converters.BooleanToLogic BooleanToLogic Boolean to Logic converter
Modelica.Electrical.Digital.Converters.LogicToBoolean LogicToBoolean Logic to Boolean converter
Modelica.Electrical.Digital.Converters.RealToLogic RealToLogic Real to Logic converter
Modelica.Electrical.Digital.Converters.LogicToReal LogicToReal Logic to Real converter
Modelica.Electrical.Digital.Converters.LogicToXO1 LogicToXO1 This model will be removed in future Modelica versions, use 'LogicToX01' instead!
Modelica.Electrical.Digital.Converters.LogicToXO1Z LogicToXO1Z This model will be removed in future Modelica versions, use 'LogicToX01Z' instead!

Modelica.Electrical.Digital.Converters.LogicToX01 Modelica.Electrical.Digital.Converters.LogicToX01

Conversion to X01

Information


Conversion of a nine valued digital input into a X01 digital output without any delay according to IEEE 1164 To_X01 function.

Conversion Table:

  input                  output
  'U' (coded by 1)       'X'  (coded by 2)
  'X' (coded by 2)       'X'  (coded by 2)
  '0' (coded by 3)       '0'  (coded by 3)
  '1' (coded by 4)       '1'  (coded by 4)
  'Z' (coded by 5)       'X'  (coded by 2)
  'W' (coded by 6)       'X'  (coded by 2)
  'L' (coded by 7)       '0'  (coded by 3)
  'H' (coded by 8)       '1'  (coded by 4)
  '-' (coded by 9)       'X'  (coded by 2)

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

Parameters

NameDescription
nsignal width

Connectors

NameDescription
x[n] 
y[n] 

Modelica.Electrical.Digital.Converters.LogicToX01Z Modelica.Electrical.Digital.Converters.LogicToX01Z

Conversion to X01Z

Information


Conversion of a nine valued digital input into a X01Z digital output without any delay according to IEEE 1164 To_X01Z function.

Conversion Table:

 input                  output
 'U' (coded by 1)       'X'  (coded by 2)
 'X' (coded by 2)       'X'  (coded by 2)
 '0' (coded by 3)       '0'  (coded by 3)
 '1' (coded by 4)       '1'  (coded by 4)
 'Z' (coded by 5)       'Z'  (coded by 5)
 'W' (coded by 6)       'X'  (coded by 2)
 'L' (coded by 7)       '0'  (coded by 3)
 'H' (coded by 8)       '1'  (coded by 4)
 '-' (coded by 9)       'X'  (coded by 2)

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

Parameters

NameDescription
nsignal width

Connectors

NameDescription
x[n] 
y[n] 

Modelica.Electrical.Digital.Converters.LogicToUX01 Modelica.Electrical.Digital.Converters.LogicToUX01

Conversion to UX01

Information


Conversion of a nine valued digital input into a UX01 digital output without any delay according to IEEE 1164 To_UX01 function.

Conversion Table:

 input                  output
 'U' (coded by 1)       'U'  (coded by 1)
 'X' (coded by 2)       'X'  (coded by 2)
 '0' (coded by 3)       '0'  (coded by 3)
 '1' (coded by 4)       '1'  (coded by 4)
 'Z' (coded by 5)       'X'  (coded by 2)
 'W' (coded by 6)       'X'  (coded by 2)
 'L' (coded by 7)       '0'  (coded by 3)
 'H' (coded by 8)       '1'  (coded by 4)
 '-' (coded by 9)       'X'  (coded by 2)

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

Parameters

NameDescription
nsignal width

Connectors

NameDescription
x[n] 
y[n] 

Modelica.Electrical.Digital.Converters.BooleanToLogic Modelica.Electrical.Digital.Converters.BooleanToLogic

Boolean to Logic converter

Information


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

 input      output
 true       '1'  (coded by 4)
 false      '0'  (coded by 3)

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

Parameters

NameDescription
nsignal width

Connectors

NameDescription
x[n] 
y[n] 

Modelica.Electrical.Digital.Converters.LogicToBoolean Modelica.Electrical.Digital.Converters.LogicToBoolean

Logic to Boolean converter

Information


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

 input                 output
 'U'  (coded by 1)     false
 'X'  (coded by 2)     false
 '0'  (coded by 3)     false
 '1'  (coded by 4)     true
 'Z'  (coded by 5)     false
 'W'  (coded by 6)     false
 'L'  (coded by 7)     false
 'H'  (coded by 8)     true
 '-'  (coded by 9)     false

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

Parameters

NameDescription
nsignal width

Connectors

NameDescription
x[n] 
y[n] 

Modelica.Electrical.Digital.Converters.RealToLogic Modelica.Electrical.Digital.Converters.RealToLogic

Real to Logic converter

Information


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

                                 condition            output
      first check:               input greater upp    lupp
      second check:              input larger low     llow
                                 else                 lmid

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

Parameters

NameDescription
nsignal width
upper_limitupper limit
lower_limitlower limit
upper_valueoutput if input > upper_limit
lower_valueoutput if input < lower_limit
middle_valueoutput else

Connectors

NameDescription
x[n] 
y[n] 

Modelica.Electrical.Digital.Converters.LogicToReal Modelica.Electrical.Digital.Converters.LogicToReal

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

NameDescription
nsignal width
value_Uvalue for digital U (uninitialized)
value_Xvalue for digital X (Forcing Unknown)
value_0value for digital 0 (Forcing 0)
value_1value for digital 1 (Forcing 1)
value_Zvalue for digital Z (High Impedance)
value_Wvalue for digital W (Weak Unknown)
value_Lvalue for digital L (Weak 0)
value_Hvalue for digital H (Weak 1)
value_mvalue for digital m (Do not care)

Connectors

NameDescription
x[n] 
y[n] 

Modelica.Electrical.Digital.Converters.LogicToXO1 Modelica.Electrical.Digital.Converters.LogicToXO1

This model will be removed in future Modelica versions, use 'LogicToX01' instead!

Information


Obsoletion Note

This model will be removed in future versions of the Modelica Standard Library. Instead the model LogicToX01 shall be used.


Conversion of a nine valued digital input into a X01 digital output without any delay according to IEEE 1164 To_X01 function.

Conversion Table:

  input                  output
  'U' (coded by 1)       'X'  (coded by 2)
  'X' (coded by 2)       'X'  (coded by 2)
  '0' (coded by 3)       '0'  (coded by 3)
  '1' (coded by 4)       '1'  (coded by 4)
  'Z' (coded by 5)       'X'  (coded by 2)
  'W' (coded by 6)       'X'  (coded by 2)
  'L' (coded by 7)       '0'  (coded by 3)
  'H' (coded by 8)       '1'  (coded by 4)
  '-' (coded by 9)       'X'  (coded by 2)

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

Parameters

NameDescription
nsignal width

Connectors

NameDescription
x[n] 
y[n] 

Modelica.Electrical.Digital.Converters.LogicToXO1Z Modelica.Electrical.Digital.Converters.LogicToXO1Z

This model will be removed in future Modelica versions, use 'LogicToX01Z' instead!

Information


Obsoletion Note

This model will be removed in future versions of the Modelica Standard Library. Instead the model LogicToX01Z shall be used.


Conversion of a nine valued digital input into a X01Z digital output without any delay according to IEEE 1164 To_X01Z function.

Conversion Table:

 input                  output
 'U' (coded by 1)       'X'  (coded by 2)
 'X' (coded by 2)       'X'  (coded by 2)
 '0' (coded by 3)       '0'  (coded by 3)
 '1' (coded by 4)       '1'  (coded by 4)
 'Z' (coded by 5)       'Z'  (coded by 5)
 'W' (coded by 6)       'X'  (coded by 2)
 'L' (coded by 7)       '0'  (coded by 3)
 'H' (coded by 8)       '1'  (coded by 4)
 '-' (coded by 9)       'X'  (coded by 2)

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

Parameters

NameDescription
nsignal width

Connectors

NameDescription
x[n] 
y[n] 

Automatically generated Mon Sep 23 17:20:28 2013.