Nom

CONVERT — Data Type Conversion

Block Screenshot

Contents

Palette

Description

This block converts an input signal of any data type to a specified data type. The input can be real, complex or integer. When the output is an integer and when overflow occurs the block three different forms of results :

1- A normal non saturated result.

2- A saturated result.

3- An error message warning the user about the overflow..

The user can select one of these three forms by setting the "DO ON OVERFLOW" field to 0,1 or 2.

Dialog box

  • input type (1= double 3=int32 4=int16 5=int8 ...)

    It indicates the input data type, it can be a double or an integer.

    Properties : Type 'vec' of size 1.

  • output type (1= double 3=int32 4=int16 5=int8 ...)

    It indicates the output data type, it can be a double or an integer.

    Properties : Type 'vec' of size 1.

  • Do on Overflow(0=Nothing 1=Saturate 2=Error)

    When this parameter is set to zero the result is similar to a normal multiplication of two integer matrix. When it is set to 1, on overflow the block saturate the result. When it is set to 2, on overflow an error message box appears.

    Properties : Type 'vec' of size 1.

Default properties

  • always active: no

  • direct-feedthrough: yes

  • zero-crossing: no

  • mode: no

  • regular inputs:

    - port 1 : size [-1,-2] / type 1

  • regular outputs:

    - port 1 : size [-1,-2] / type 3

  • number/sizes of activation inputs: 0

  • number/sizes of activation outputs: 0

  • continuous-time state: no

  • discrete-time state: no

  • object discrete-time state: no

  • name of computational function: convert

Interfacing function

  • SCI/modules/scicos_blocks/macros/IntegerOp/CONVERT.sci

Computational function

  • SCI/modules/scicos_blocks/src/c/convert.c

Authors

Fady NASSIF - INRIA