Engee documentation

Assertion

Check for zero signal value.

blockType: Assertion

Path in the library:

/Basic/Sinks/Assertion

Description

The block Assertion detects 0 values in the input signal. If all elements are non-zero, the statement true (1) is executed and the block does nothing. If not, the block stops the simulation and returns an error message by default.

Ports

Input

# IN — input signal
scalar | vector | matrix

Details

Input for checking statements.

Data types

| Float16 | Float32 | Float64 | Int8 | Int16 | Int32 | Int64 | Int128 | UInt8 | UInt16 | UInt32 | UInt64 | UInt128 | Bool | Fixed-point.

Complex numbers support

No

Parameters

Parameters

# Enable assertion — test inclusion
Logical

Details

Uncheck this box to disable the block.

Default value

true (switched on)

Program usage name

Enabled

Tunable

No

Evaluatable

No

# Simulation callback when assertion fails — expression for evaluating the calculation
String

Details

Specify an expression to evaluate the calculation.

Dependencies

To use this parameter, tick the checkbox of the parameter Enable assertion.

Default value

Program usage name

AssertionFailFcn

Tunable

No

Evaluatable

No

# Stop simulation when assertion fails — stopping the simulation if the test fails
Logical

Details

Select this check box to stop the simulation when a test fails.

Clear this check box to display a warning and continue the simulation.

Default value

true (switched on)

Program usage name

StopWhenAssertionFail

Tunable

No

Evaluatable

No