Main Content

Deserializer1D

Convert scalar stream or smaller vectors to vector signal

  • Deserializer1D block

Libraries:
HDL Coder / HDL Operations

Description

The Deserializer1D block buffers a faster, scalar stream or vector signals into a larger, slower vector signal. The faster input signal is converted to a slower signal based on the Ratio and Idle Cycle values, the conversion changes sample time. Also, the output signal is delayed one slow signal cycle because the serialized data needs to be collected before it can be output as a vector. See the examples below for more details.

You can configure the deserialization to depend on a valid input signal ValidIn and a start signal StartIn. If the ValidIn and StartIn block parameters are both selected, data collection starts only if both ValidIn and StartIn signals are true. Consider this example:

  • Ratio is 2 and Idle Cycles is 0, so each output cycle is two input signals long with all data points considered.

  • ValidIn and StartIn are selected, so data collection can begin only when both StartIn and ValidIn signals are true.

  • ValidOut is selected.

In the first cycle, ValidIn and StartIn are true, so data collection begins for A and B. The block outputs the deserialized vector in the next valid cycle, so the AB vector is output in the next cycle. This is also true in the second cycle for C and D.

In the third cycle, starting at E, StartIn is true, but ValidIn is not. E is dropped. At F, ValidIn is true, but StartIn is not, so F is also dropped. Since it cannot collect data for E or F, Deserializer1D outputs the previous cycle vector, CD, but ValidOut changes to false.

Another scenario to consider is when the StartIn signal arrives too early. If the length between two StartIn signals is not long enough to collect a full ratio cycle, the insufficient signal data is dropped. Consider this example:

  • Ratio is 3, so each cycle is two sections long.

  • Idle Cycles is 0, so all data inputs are considered.

  • ValidIn and StartIn are selected, so data collection can begin only when both StartIn and ValidIn signals are true.

  • ValidOut is selected.

In the first cycle, ValidIn and StartIn are true, so data collection can begin for A and B. However, at C another StartIn signal arrives before three signals can be collected. Because the StartIn arrived early, A and B are dropped and no valid vector is collected during the first cycle. Therefore, the output of the second cycle is still zero. Deserialization begins at the StartIn at C, for C, D, and E. This vector is output at the next valid cycle, which is cycle 3. Similarly, deserialization starts again at the StartIn at F, and outputs the FGH vector in the fourth cycle.

You specify the block output for the first sampling period with the value of the Initial condition parameter.

Ports

Input

expand all

Input signal to deserialize. Bus data types are not supported.

Data Types: single | double | half | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | Boolean | fixed point | enumerated

Indicates valid input signal. Use with the Serializer1D block. This port is available when you select the ValidIn check box.

Data Types: Boolean

Input control signal indicates when to start deserialization. Use with the Serializer1D block. Data collection begins at the rising edge of the StartIn signal.

This port is available when you select the StartIn check box.

Data Types: Boolean

Output

expand all

Deserialized output signal. Bus data types are not supported.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | Boolean | fixed point | enumerated

Indicates valid output signal. This port is available when you select the ValidOut check box.

Data Types: Boolean

Parameters

expand all

Enter the deserialization ratio, specified as positive scalar

The ratio is the output vector size, divided by the input vector size. The ratio must be divisible by the input vector size.

Enter the number of idle cycles added to the end of each serialized input.

The value of Idle Cycles affects the deserialized output rate. For example, if Ratio is 2 and the input signal is A, B, B, C, D, D, ..., without idle cycles the output would be AB, BC, DD.... However for the same input and ratio with Idle Cycles set to 1, the output is AB, CD.... The idle cycles, B and D, are dropped.

The Deserializer1D behavior changes if Idle Cycles is not zero, and ValidIn or StartIn are on. The idle cycles value affects only the output rate, while ValidIn and StartIn control what input data is deserialized.

Specify the initial output of the simulation.

Select to activate the StartIn port.

Select to activate the ValidIn port.

Select to activate ValidOut port.

Enter the size of the input data signal. The input size must be divisible by the ratio plus the number of idle cycles. By default, the block inherits size based on context within the model.

Enter the time interval between sample time hits or specify another appropriate sample time such as continuous. By default, the block inherits its sample time based on context within the model. For more information, see Sample Time.

Specify the input signal type of the block as auto, real, or complex.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Version History

Introduced in R2014b

expand all

See Also