Engee documentation

Constant

Constant value.

blockType: Constant

Path in the library:

/Basic/Sources/Constant

Description

The Constant unit generates a real or complex constant value signal.

The unit generates the output signal as a scalar, vector, matrix or bus depending on the dimensionality of the parameters Constant value.

For more information about bus types, see User-defined bus types.

The block output has the same dimensions and elements as the parameters Constant value.

Ports

Output

# OUT_1 — constant value
scalar | vector | matrix | bus

Details

A constant value in the form of a real or complex scalar, vector, matrix or bus. By default, block Constant outputs a signal whose dimension and data type are the same as the parameters Constant value.

Data types

Float16, Float32, Float64, Int8, Int16, Int32, Int64, Int128, UInt8, UInt16, UInt32, UInt64, UInt128, Bool, Fixed point, BusSignal

Complex numbers support

Yes

Parameters

Main

# Constant value — constant value

Details

Set the output of the constant value of the block.

You can enter any value, including the logical keywords true and false.

Default value

1.0

Program usage name

Value

Tunable

Yes

Evaluatable

Yes

# Sample time — interval between calculation steps
SampleTime (real number / vector of two real numbers)

Details

Sets the time interval during which the output signal of the Constant block may change during simulation (e.g. due to the setting of the parameter Constant value).

The by default value inf indicates that the block output can never change. This value speeds up the simulation and the generated code by avoiding the need to recalculate the block output.

Default value

Inf

Program usage name

SampleTime

Tunable

No

Evaluatable

Yes

Signal Attributes

# Output data type — output data type
Inherit: auto | Float64 | Float32 | Float16 | Int8 | UInt8 | Int16 | UInt16 | Int32 | UInt32 | Int64 | UInt64 | Int128 | UInt128 | Bool | Fixed-point | BusSignal

Details

Specify the type of output data. The type can be inherited or specified directly.

Values

Inherit: auto | Float64 | Float32 | Float16 | Int8 | UInt8 | Int16 | UInt16 | Int32 | UInt32 | Int64 | UInt64 | Int128 | UInt128 | Bool | Fixed-point | BusSignal

Default value

Inherit: auto

Program usage name

OutDataTypeStr

Tunable

No

Evaluatable

No

# Output fixed-point type — fixed-point output data type
Data type

Details

Specify the fixed-point output type.

Dependencies

To use this parameter, set the Output data type parameters to Fixed-point.

Default value

fixdt(1, 16, 0)

Program usage name

OutDataTypeStrFixed

Tunable

No

Evaluatable

Yes

# Output bus type — output bus type
Data type

Details

Describes the type of bus that the unit outputs.

You can set the type yourself or enter the name of a variable that stores the type already created in vorkspace.

Dependencies

To use this parameter, set the Output data type parameter to BusSignal.

Default value

BusSignal{(), Tuple{}, ()}

Program usage name

OutDataTypeStrBus

Tunable

No

Evaluatable

Yes

Additional options

C code generation: Yes

Verilog generation: Yes

Examples