Skip to Main Content Skip to Search
Product Documentation

C62x Bit Reverse - Bit-reverse elements of each complex input signal channel

Library

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

Description

The Bit Reverse block bit-reverses the elements of each channel of a complex input signal, X. The Bit Reverse block is primarily used to provide ordered inputs and outputs to or from blocks that perform FFTs. Inputs to this block must be 16-bit fixed-point data types.

The Bit Reverse block supports discrete sample times and little-endian code generation only.

Dialog Box

Algorithm

In simulation, the Bit Reverse block is equivalent to the TMS320C62x DSP Library assembly code function DSP_bitrev_cplx. During code generation, this block calls the DSP_bitrev_cplx routine to produce optimized code.

Examples

The Bit Reverse block reorders the output of the C62xRadix-2 FFT in the model below to natural order.

The following code calculates the same FFT in the workspace. The output from this calculation, y2, is displayed side-by-side with the output from the model, c. The outputs match, showing that the Bit Reverse block reorders the Radix-2 FFT output to natural order:

k = 4;
n = 2^k;
xr = zeros(n, 1);
xr(2) = 0.5;
xi = zeros(n, 1);
x2 = complex(xr, xi);
y2 = fft(x2);

[y2, c]
   0.5000             0.5000          
   0.4619 - 0.1913i   0.4619 - 0.1913i
   0.3536 - 0.3536i   0.3535 - 0.3535i
   0.1913 - 0.4619i   0.1913 - 0.4619i
        0 - 0.5000i        0 - 0.5000i
  -0.1913 - 0.4619i  -0.1913 - 0.4619i
  -0.3536 - 0.3536i  -0.3535 - 0.3535i
  -0.4619 - 0.1913i  -0.4619 - 0.1913i
  -0.5000            -0.5000          
  -0.4619 + 0.1913i  -0.4619 + 0.1913i
  -0.3536 + 0.3536i  -0.3535 + 0.3535i
  -0.1913 + 0.4619i  -0.1913 + 0.4619i
        0 + 0.5000i        0 + 0.5000i
   0.1913 + 0.4619i   0.1913 + 0.4619i
   0.3536 + 0.3536i   0.3535 + 0.3535i
   0.4619 + 0.1913i   0.4619 + 0.1913i

See Also

C62xRadix-2 FFT, C62xRadix-2 IFFT

  


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