Products & Services Solutions Academia Support User Community Company

hdlnewcontrolfile - Generate customizable control file from selected subsystem or blocks

Syntax

hdlnewcontrolfile
hdlnewcontrolfile('blockpath')
hdlnewcontrolfile({'blockpath1','blockpath2',...'blockpathN'})
t = hdlnewcontrolfile(...)

Description

The coder provides the hdlnewcontrolfile utility to help you construct code generation control files. Given a selection of one or more blocks from your model, hdlnewcontrolfile generates a control file containing:

Generated control files are automatically opened as untitled files in the MATLAB editor for further customization. The file naming sequence for successively generated control files is Untitled1, Untitled2,...UntitledN.

To use a generated control file in code generation, you must save it and attach it to a model. (See also Associating an Existing Control File with Your Model.)

hdlnewcontrolfile returns a control file containing a forEach statement and comments for each selected block in the model.

hdlnewcontrolfile('blockpath') returns a control file containing a forEach statement and comments for the block specified by the 'blockpath' argument. The 'blockpath' argument is a string specifying the full Simulink path to the desired block.

hdlnewcontrolfile({'blockpath1','blockpath2',...'blockpathN'}) returns a control file containing a forEach statement and comments 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.

t = hdlnewcontrolfile(...) returns control statements as text in the string variable t, instead of returning a control file.

Usage Notes

You can use the generated control file as:

Examples

% Generate control file for a specific block
hdlnewcontrolfile('sfir_fixed/symmetric_fir/Product1');
%
% Generate a control file for all currently selected blocks
hdlnewcontrolfile;
%
% Generate a control file for two specific blocks
hdlnewcontrolfile({'sfir_fixed/symmetric_fir/Add1',...
'sfir_fixed/symmetric_fir/Product2'});
  


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