| Embedded Target for Texas Instruments C2000 DSPs | ![]() |
Building Models
You can use IQmath Library blocks in models along with certain core Simulink, Fixed-Point Blockset, and other blockset blocks. This section discusses issues you should consider when building a model with blocks from these different libraries.
Converting Data Types
As always, it is vital to make sure that any blocks you connect in a model have compatible input and output data types. In most cases, IQmath Library blocks handle only a limited number of specific data types. You can refer to any block reference page in Block Reference for a discussion of the data types that the block accepts and produces.
When you connect IQmath 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 IQmath Library block. Many Fixed-Point Blockset blocks allow you to set their data type and scaling through inheritance from the driving block, or through backpropagation 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 IQmath 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 an IQmath Library block.
Using Sources and Sinks
The IQmath Library does not include source or sink blocks. Use source or sink blocks from the core Simulink library or Fixed-Point Blockset in your models with IQmath Library blocks.
Choosing Blocks to Optimize Code
In some cases, blocks that perform similar functions appear in more than one blockset. For example, both the IQmath Library and the Fixed-Point Blockset have a Multiply block. When you are building a model to run on C2000 DSP, choosing the block from the IQmath Library always yields better optimized code. You can use a similar block from another library if it gives you functionality that the IQmath Library block does not support, but you will generate code that is less optimized.
| Q Format Notation | Block Reference | ![]() |
| © 1994-2010 The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |