Products & Services Solutions Academia Support User Community Company

Version 1.4 (R2008b) Simulink HDL Coder Software

This table summarizes what's new in Version 1.4 (R2008b):

New Features and ChangesVersion Compatibility ConsiderationsFixed Bugs and Known ProblemsRelated Documentation at Web Site
Yes
Details below
Yes—Details labeled as Compatibility Considerations, below. See also Summary.
Bug Reports
No

New features and changes introduced in this version are:

New hdldemolib Blocks Support FFT, HDL Counter, and Bitwise Operators

The hdldemolib library now includes HDL-specific block implementations supporting simulation and code generation for:

The following figure shows the hdldemolib library window. See The hdldemolib Block Library in the Simulink HDL Coder documentation for more information about the library.

Additional Simulink Blocks Supported for HDL Code Generation

The coder now supports the following blocks for HDL code generation:

In addition, several HDL-specific block implementations have been added to the hdldemolib library. See New hdldemolib Blocks Support FFT, HDL Counter, and Bitwise Operators.

See the Simulink HDL Coder documentation for a complete listing of blocks that are currently supported for HDL code generation.

Complex Signals Supported for Additional Blocks

In the previous release, the coder introduced support for use of complex signals with a limited set of blocks. In R2008b, the coder supports complex signals for these additional blocks:

See Blocks That Support Complex Data in the Simulink HDL Coder documentation for a complete listing of blocks that support complex signals.

Code Annotation Support

The coder now lets you add text annotations to generated code, in the form of comments. There are two ways to add annotations to your code:

See Annotating Generated Code with Comments and Requirements in the Simulink HDL Coder documentation for further information.

New Constant Block Implementation Indicates Hi-Z or Unknown States

The coder now supports an implementation for the built-in/Constant block (hdldefaults.ConstantSpecialHDLEmission), which you can use to indicate when a constant signal is in high-impedance ('Z') or unknown ('X') state. The implementation provides the {Value} parameter to indicate the state, as follows:

hdldefaults.ConstantSpecialHDLEmission does not support the double data type.

See also Blocks with Multiple Implementations in the Simulink HDL Coder documentation.

New Test Bench Reference Postfix Option

The new Test bench reference postfix option (shown in the following figure) lets you customize the names of reference signals generated in test bench code by specifying a string to be appended to reference signal names. The default string is'_ref'.

If you generate test bench code via the makehdltb function, use the Testbenchreferencepostfix property (see TestBenchReferencePostFix in the in the Simulink HDL Coder documentation) to specify the postfix string.

New Default HDL Implementations for Selected Blocks

The default HDL implementations for certain blocks has been changed. The following table lists these blocks, as well as their new default implementations and previous default implementations. All listed implementation classes belong to the package hdldefaults.

BlockDefault Implementation
Before Release R2008b
New Default Implementation

simulink/Commonly Used Blocks/Data Type Conversion

DataTypeConversionHDLEmission

DataTypeConversionRTW

simulink/Commonly Used Blocks/Product

ProductLinearHDLEmission

ProductRTW

simulink/Math Operations/Divide

ProductLinearHDLEmission

ProductRTW

simulink/Math Operations/Product of Elements

ProductLinearHDLEmission

ProductRTW

simulink/Commonly Used Blocks/Sum

SumLinearHDLEmission

SumRTW

simulink/Math Operations/Add

SumLinearHDLEmission

SumRTW

simulink/Math Operations/Sum of Elements

SumLinearHDLEmission

SumRTW

simulink/Math Operations/Subtract

SumLinearHDLEmission

SumRTW

simulink/Commonly Used Blocks/Unit Delay

UnitDelayHDLEmission

UnitDelayRTW

simulink/Math Operations/MinMax

MinMaxTreeHDLEmission

MinMaxTree

dspstat3/Maximum

MinMaxTreeHDLEmission

MinMaxTree

dspstat3/Minimum

MinMaxTreeHDLEmission

MinMaxTree

Compatibility Considerations

If your models use default HDL block implementations for the affected blocks, the coder will now default to the new implementations. The new implementations are compatible with the previous implementations and will produce identical results.

The older implementations for the listed blocks will be supported for a limited number of future releases. If your control files explicitly reference the previous default implementation for any of the affected blocks, the coder will continue to use the referenced implementation. You should consider removing or changing such references in your control files to use the new implementations.

Default Entity Conflict Postfix Changed

The default value for the Entity conflict postfix property (and the corresponding CLI property, EntityConflictPostfix) has been changed from '_entity' to '_block'.

Compatibility Considerations

If your models or scripts rely on the previous default value ('_entity') for the Entity conflict postfix property, you will need to explicitly set the property value to '_entity'.

New DistributedPipelining Implementation Parameter for Embedded MATLAB Function Blocks and Stateflow Charts

In the previous release, the coder introduced automatic pipeline insertion, a special optimization for HDL code generated from Embedded MATLAB Function blocks or Stateflow charts. This optimization was enabled implicitly by specifying the {'OutputPipeline', nStages} parameter in a control file for these blocks.

In the current release, the new DistributedPipelining parameter lets you explicitly enable or disable pipeline insertion, independently from the OutputPipeline parameter. The control file listed in the following example specifies two pipeline registers, with DistributedPipelining enabled.

function c = pipeline_control

c = hdlnewcontrol(mfilename);

c.forEach('*',...
    'eml_lib/Embedded MATLAB Function', {},...
 'hdlstateflow.StateflowHDLInstantiation', {'OutputPipeline', 2, 'DistributedPipelining', 'on'});

The DistributedPipelining property applies only to Embedded MATLAB Function blocks or Stateflow charts within a subsystem.

For detailed information, see Distributed Pipeline Insertion for Embedded MATLAB Function Blocks in the Simulink HDL Coder documentation.

Compatibility Considerations

If your existing control files specified automatic pipelining implicitly using the OutputPipeline parameter, you should change your control files to specify automatic pipelining explicitly as in the following code excerpt:

c.forEach('*',...
    'eml_lib/Embedded MATLAB Function', {},...
 'hdlstateflow.StateflowHDLInstantiation', {'OutputPipeline', 2, 'DistributedPipelining', 'on'});

Coefficient Multiplier Optimization for Digital Filter, FIR Decimation, and FIR Interpolation Filters

The CoeffMultipliers implementation parameter lets you specify use of canonic signed digit (CSD) or factored CSD optimizations for processing coefficient multiplier operations in code generated for certain filter blocks. Specify the CoeffMultipliers parameter in a control file using the following syntax:

The coder supports CoeffMultipliers for the filter block implementations shown in the following table.

BlockImplementation
dsparch4/Digital Filterhdldefaults.DigitalFilterHDLInstantiation
dspmlti4/FIR Decimationhdldefaults.FIRDecimationHDLInstantiation
dspmlti4/FIR Interpolationhdldefaults.FIRInterpolationHDLInstantiation

See also Block Implementation Parameters in the Simulink HDL Coder documentation.

hdlnewblackbox Function Generates Black Box Control Statements

The hdlnewblackbox function provides a simple way to create the control file statements that are required to generate black box interfaces for one or more subsystems.

Given a selection of one or more subsystems from your model, hdlnewblackbox returns the following as string data in the MATLAB workspace for each selected subsystem:

For further information, see in the Simulink HDL Coder documentation.

hdlnewcontrolfile Function Optionally Returns Result to String

The hdlnewcontrolfile function (optionally) now can return control statements to a string variable.

To return control statements as text in the string variable t, instead of returning a control file, use the following syntax:

t = hdlnewcontrolfile(...)

See also hdlnewcontrolfile in the Simulink HDL Coder documentation.

-novopt Flag Added to Default Simulation Command in Generated Compilation Scripts

For improved operation with the ModelSim (version 6.2 and later) simulator, the default values of the HDLSimCmd property string (and the Simulation Command GUI option) now includes the -novopt flag, as follows:

'vsim -novopt work.%s\n'

The -novopt flag directs the ModelSim simulator not to perform optimizations that remove signals from the simulation view.

Compatibility Considerations

If you are using ModelSim 6.0 or an earlier version, you should set the HDLSimCmd property string (or the Simulation Command GUI option) to omit the -novopt option, as follows:

'vsim work.%s\n'
  


Related Products & Applications

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

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