DSP Blockset    
Contiguous Copy

Create a discontiguous input in a contiguous block of memory (for RTW code generation from blocks linked to versions of the DSP Blockset prior to 4.0).

Library

Signal Management / Signal Attributes

Description

The Contiguous Copy block copies the input to a contiguous block of memory, and passes this new copy to the output. The output is identical to the input, but is guaranteed to reside in a contiguous section of memory.

Because Simulink employs an efficient copy-by-reference method for propagating data in a model, some operations produce outputs with discontiguous memory locations. An example of such an operation is shown below with the Simulink Selector block.

Although this does not present a problem during simulation, blocks linked to versions of the DSP Blockset prior to 4.0 may require contiguous inputs for code-generation with the Real-Time Workshop (RTW). When such blocks are used in a model intended for code generation, they should be preceded by the Contiguous Copy block to ensure that their inputs are contiguous. The DSP Blockset version 3.1 Autocorrelation block shown below is an example of one that requires contiguous inputs for code generation.

Dialog Box


 Constant Ramp Convert 1-D to 2-D