Skip to Main Content Skip to Search
Product Documentation

C64x Weighted Vector Sum - Weighted sum of input vectors

Library

Embedded Coder/ Embedded Targets/ Processors/ Texas Instruments C6000/ Optimization/ C64x DSP Library

Description

The C64x Weighted Vector Sum block computes the weighted sum of two inputs, X and Y, according to (W*X)+Y. Inputs may be vectors or frame-based matrices. The number of samples per channel must be a multiple of eight. Inputs, weights, and output are Q.15 data types, and weights must be in the range -1 < W < 1.

The Weighted Vector Sum block supports both continuous and discrete sample times. This block supports little-endian code generation only.

Dialog Box

Weight source

Specify the source of the weights:

  • Specify via dialog — Enter the weights in the Weights (W) parameter in the dialog box

  • Input port — Accept the weights from port W

Weights (W)

This parameter is visible only when Specify via dialog is specified for the Weight source parameter. This parameter is tunable in simulation. When the weights are

  • All the same, you need only enter a scalar.

  • Different within channels but the same across channels, enter a vector containing the initial conditions for one channel. The length of this vector must be a multiple of four.

  • Different across channels, enter a matrix containing all initial conditions. The number of rows of this matrix must be a multiple of four, and the number of columns of this matrix must be equal to the number of channels.

    Weights must be in the range -1 < W < 1.

Algorithm

In simulation, the Weighted Vector Sum block is equivalent to the TMS320C64x DSP Library assembly code function DSP_w_vec. During code generation, this block calls the DSP_w_vec routine to produce optimized code.

  


Related Products & Applications

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

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