Products & Services Solutions Academia Support User Community Company

hdlnewblackbox - Generate customizable control file from selected subsystem or blocks

Syntax

hdlnewblackbox
hdlnewblackbox('blockpath')
hdlnewblackbox({'blockpath1','blockpath2',...'blockpathN'})
[cmd, impl] = hdlnewblackbox
[cmd, impl] = hdlnewblackbox('blockpath')
[cmd, impl] = hdlnewblackbox({'blockpath1','blockpath2',...'blockpathN'})
[cmd, impl, params] = hdlnewblackbox
[cmd, impl, params] = hdlnewblackbox('blockpath')
[cmd, impl, params] = hdlnewblackbox({'blockpath1','blockpath2',...'blockpathN'})

Description

The hdlnewblackbox utility helps you construct forEach calls for use in code generation control files when generating black box interfaces. Given a selection of one or more blocks from your model, hdlnewblackbox returns the following as string data in the MATLAB workspace for each selected block:

hdlnewblackbox returns a forEach call for each selected block in the model.

hdlnewblackbox('blockpath') returns a forEach call for the block specified by the 'blockpath' argument. The 'blockpath' argument is a string specifying the full Simulink path to the desired block.

hdlnewblackbox({'blockpath1','blockpath2',...'blockpathN'}) returns a forEach call for the blocks specified by the {'blockpath1','blockpath2',...'blockpathN'} arguments. The {'blockpath1','blockpath2',...'blockpathN'} arguments are passed as a cell array of strings, each string specifying the full Simulink path to a desired block.

[cmd, impl] = hdlnewblackbox returns a forEach call for each selected block in the model to the string variable cmd. The call also returns impl, a cell array of cell arrays of strings enumerating the available implementations for the block.

[cmd, impl] = hdlnewblackbox('blockpath') returns a forEach call for the block specified by the 'blockpath' argument to the string variable cmd. The call also returns impl, a cell array of cell arrays of strings enumerating the available implementations for the block. The 'blockpath' argument is a string specifying the full Simulink path to the desired block.

[cmd, impl] = hdlnewblackbox({'blockpath1','blockpath2',...'blockpathN'}) returns a forEach call for the blocks specified by the {'blockpath1','blockpath2',...'blockpathN'} arguments to the string variable cmd. The call also returns impl, a cell array of cell arrays of strings enumerating the available implementations for the block. The {'blockpath1','blockpath2',...'blockpathN'} arguments are passed as a cell array of strings, each string specifying the full Simulink path to a desired block.

[cmd, impl, params] = hdlnewblackbox returns a forEach call for each selected block in the model to the string variable cmd. The call also returns:

[cmd, impl, params] = hdlnewblackbox('blockpath') returns a forEach call for the block specified by the 'blockpath' argument to the string variable cmd. The call also returns:

The 'blockpath' argument is a string specifying the full Simulink path to the desired block.

[cmd, impl, params] = hdlnewblackbox({'blockpath1','blockpath2',...'blockpathN'}) returns a forEach call for the blocks specified by the {'blockpath1','blockpath2',...'blockpathN'} arguments to the string variable cmd. The call also returns:

The {'blockpath1','blockpath2',...'blockpathN'} arguments are passed as a cell array of strings, each string specifying the full Simulink path to a desired block.

Usage Notes

Before invoking hdlnewblackbox, you must run checkhdl or makehdl to build in-memory information about the model. If you do not run checkhdl or makehdl, hdlnewblackbox will display an error message indicating that you should run checkhdl or makehdl.

After invoking hdlnewblackbox, you will generally want to insert the forEach calls returned by the function into a control file, and use the implementation information returned to specify a nondefault block implementation.

Examples

% Return a forEach call for a specific subsystem to the MATLAB workspace
hdlnewblackbox('sfir_fixed/symmetric_fir');
%
% Return forEach calls for all currently selected blocks to the MATLAB workspace
hdlnewblackbox;
%
% Return forEach calls, implementation names, and implementation parameter names
% for all currently selected blocks to string variables
[cmd,impl,parms] = hdlnewblackbox;
  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS