Embedded Target for Texas Instruments C6000 DSPs | ![]() ![]() |
In most cases, DAC blocks inherit attributes from the ADC block in the model, or from the previous nonvirtual block. You must select Codec data format, Scaling, and Overflow mode when you use a C6701 EVM DAC block in your model. In addition, you can choose to use the overrun indicator function provided in the Embedded Target for TI C6000 DSP.
Two of the configuration options for the block affect the codec. The remaining options relate to the model you are using in Simulink and the signal processor on the board. In the following table, you find each option listed with the hardware affected.
Option |
Affected Hardware |
Codec data format (C6701 EVM DAC only) |
Codec |
DAC attenuation |
Codec |
Overflow mode |
Digital Signal Processor |
Scaling |
Digital Signal Processor |
When you double-click the C6701 EVM DAC block, you see the dialog shown here.
Choosing the Codec Data Format (C6701 EVM DAC Block Only)
The Codec data format for the C6701 EVM DAC block must be the same as the Codec data format for the C6701 EVM ADC block, if you use one in your model. C6711 DSK codec blocks do not offer the Codec Data Format option.
Selecting the Scaling
Select the scaling that best suits your model and your output device. For most applications, choose the scaling to match the setting of the ADC block if your model uses it.
Scaling defines the range of the input values from the codec. Independent of your setting for Scaling, signal values are stored as floating-point data. In Normalize mode, the signal ranges from -1 to 1 at the output of the ADC block. When you select Integer value for the scaling, the signal ranges between the minimum and maximum values representable by the number of bits specified by Codec data format.
Selecting the Overflow Mode
Models running on the target can encounter situations where calculations exceed the range represented by the data type. The Overflow mode option on the DAC dialog lets you select how the block responds to overflow conditions. Select one of the following settings:
Saturate
--arithmetic results that fall outside the representable range of the selected data type are limited to the largest or smallest values. Saturated values are set to the nearest value that the data type can represent, either the largest representable value in the case of arithmetic overflow or the smallest representable value in the case of arithmetic underflow.
Wrap
--arithmetic results that fall outside the numeric range of the selected data type are wrapped into the range of the data type. The wrapping algorithm uses modular arithmetic relative to the largest or smallest representable number to determine the value of the result after wrapping.
![]() | Configuring ADC Blocks | Configuring LED Blocks | ![]() |