Embedded Target for Texas Instruments C6000 DSPs Previous page   Next Page

Building Models

You can use C62x or C64x DSP Library blocks in models along with certain core Simulink, DSP Blockset, and Fixed-Point Blockset blocks. This section discusses issues you should consider when you build models with blocks from these libraries.

Converting Data Types

Any blocks you connect in a model have compatible input and output data types. In most cases, C62x or C64x DSP Library blocks handle only a limited number of specific data types. Refer to any block reference page in Block Reference for a discussion of the data types that each block accept sand produces.

When you connect C62x or C64x DSP Library blocks and Fixed-Point Blockset blocks, you often need to set the data type and scaling in the block parameters of the Fixed-Point Blockset block to match the data type of the C62x DSP Library block. Many Fixed-Point Blockset blocks allow you to set their data type and scaling by inheriting from the driving block, or by back propagating from the next block. This can be a good way to set the data type of a Fixed-Point Blockset block to match a connected C62x DSP Library block.

Some DSP Blockset blocks and core Simulink blocks also accept fixed-point data types. Make the appropriate settings in these blocks' parameters when you connect them to a C62x DSP Library block.

However, to use DSP Blockset or core Simulink blocks that do not handle fixed-point data types with C62x DSP Library blocks in your model, you must use an appropriate data type conversion block:

Refer to the reference pages for these blocks or invoke the Help system from their block dialogs for more information.

Using Sources and Sinks

The C62x DSP Library does not include source or sink blocks. Use source or sink blocks from the core Simulink library or DSP Blockset in your models with C62x DSP Library blocks. See Converting Data Types for more information on incorporating blocks from other libraries into your models.

Choosing Blocks to Optimize Code

In some cases, blocks that perform similar functions appear in more than one blockset. For example, the C62x DSP Library, the C64x DSP Library, and the DSP Blockset all have Autocorrelation blocks. How do you choose which to include in your model? If you are building a model to run on the C6711 DSK or C6701 EVM, or on C62x hardware, choosing the block from the C62x DSP Library always yields better optimized code. You can use a similar block from another library if it provides functionality that the C62x DSP Library block does not support, but you generate less well optimized code.

In the same manner, if you are building a model to run on the C6416 DSK or on C64x hardware, choosing the block from the C64x DSP Library always yields better optimized code. You can use a similar block from another library if it provides functionality that the C64x DSP Library block does not support, but you generate less well optimized code.


Previous page  Q Format Notation Using FDATool with the Embedded Target for TI C6000 DSP Next page

Learn more about the latest releases of MathWorks products:

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