Main Content

samplecontrolbus

Create sample-streaming control bus

Description

samplecontrolbus declares a samplecontrol type bus instance in the workspace. This instance is required for HDL code generation. Call this function before you generate HDL code from Wireless HDL Toolbox™ blocks.

Examples

Declare Bus in Base Workspace

In the InitFcn callback function of your Simulink® model, or at the MATLAB® command line, use this command to declare a samplecontrol type bus instance in the base workspace. If you create your model with the Wireless HDL Toolbox model template, this step is done for you.

evalin('base','samplecontrolbus')

If you do not declare an instance of samplecontrolbus in the base workspace, you might encounter this error when you generate HDL code in Simulink.

Cannot resolve variable 'samplecontrol'

Introduced in R2017b