LogicToReal

Logic to Real converter

    LogicToReal

Library

Modelica/Electrical/Digital/Converters

Description

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

LogicToReal_0

NameLabelDescriptionData TypeValid Values

mo_n

n

signal width

Scalar

mo_value_U

value_U

value for digital U (uninitialized)

Scalar

mo_value_X

value_X

value for digital X (Forcing Unknown)

Scalar

mo_value_0

value_0

value for digital 0 (Forcing 0)

Scalar

mo_value_1

value_1

value for digital 1 (Forcing 1)

Scalar

mo_value_Z

value_Z

value for digital Z (High Impedance)

Scalar

mo_value_W

value_W

value for digital W (Weak Unknown)

Scalar

mo_value_L

value_L

value for digital L (Weak 0)

Scalar

mo_value_H

value_H

value for digital H (Weak 1)

Scalar

mo_value_m

value_m

value for digital m (Do not care)

Scalar

LogicToReal_1

NameLabelDescriptionData TypeValid Values

mo_x

x

x

Structure

mo_x/fixed

fixed

Cell of vectors

true
false

mo_x/start

start

Cell of vectors

mo_y

y

y

Structure

mo_y/fixed

fixed

Cell of vectors

true
false

mo_y/start

start

Cell of vectors

Ports

NameTypeDescriptionIO TypeNumber

x

implicit

input

1

y

implicit

output

1