Main Content

Samples per cycle

Specify the size of the signals after the frame-to-sample conversion streams them

Since R2022b

Model Configuration Pane: Optimization / Frame to Sample Conversion

Description

Use this parameter to specify the size of the signals after the frame-to-sample conversion streams them. The streamed input signal is either a scalar (one sample per cycle) or 1-D vectors with N elements (N samples per cycle).

Dependencies

To enable this parameter, select Enable frame to sample conversion.

Settings

1 (default)

Enter an integer with a value greater than or equal to one. When you use the default value, the streamed input signal is one sample per cycle or a scalar signal. When you use an integer N, where N is an integer greater than one, the streamed input signal is N samples per cycle or a 1-D vector with N elements.

Tips

To set this property, use the functions hdlset_param or makehdl. To view the property value, use the function hdlget_param.

For example, you can use the SamplesPerCycle setting when you generate HDL code for a DUT subsystem in a model using either of these methods:

  • Pass the property as an argument to the makehdl function.

    makehdl('<model_name/DUT_name>', ... 
            'SamplesPerCycle',2)
  • When you use hdlset_param, set the parameter on the model and then generate HDL code by using the makehdl function.

    hdlset_param('<model_name>','SamplesPerCycle',2)
    makehdl('<model_name/DUT_name>')

Recommended Settings

No recommendations.

Programmatic Use

Parameter: SamplesPerCycle
Type: integer
Value: integer greater than or equal to 1
Default: 1

Version History

Introduced in R2022b

See Also