?? rx_src.c
字號:
/***********************************************************************************/
/* IS54 Baseband Simulation Software */
/* */
/* File Description : IS54 Receive Filtering and Decimation */
/* File Name : rx_src.c */
/* Date : 12/30/93 */
/* : July, 20001 - Modified for TMS320C55x project */
/* */
/* This subroutine takes a PI/4 DQPSK encoded square-root raised cosine */
/* sequence of data at 4X symbol rate and produces raised cosine filtered */
/* I & Q streams at 1X symbol rate. The filtering is controlled by a */
/* synchronization process which passes an input parameter to this subroutine */
/* telling it the offset to use in the filtering process. */
/* */
/* This subroutine assumes it will generate 163 I,Q output pairs. Therefore, */
/* at least (samp_offset + 163*4) input I,Q pairs must be present at input */
/* buffer pointers I_SRC and Q_SRC. */
/* */
/* INPUTS */
/* I_SRC : Vector of in-phase components of PI/4 DQPSK encoded */
/* data at 4X symbol rate (basically the output */
/* of a differential encoder). Note that this array must */
/* contains at least (samp_offset + 163*4) samples. */
/* */
/* Q_SRC : Vector of quadrature components of PI/4 DQPSK encoded */
/* data at 4X symbol rate (again the output of */
/* a differential encoder). Note that this array must */
/* contains at least (samp_offset + 163*4) samples. */
/* */
/* samp_offset : An offset obtained from synchronization telling the */
/* subroutine which sample of the input array to begin */
/* filtering with. */
/* */
/* filt : A vector containing a 48 tap square-root raised */
/* cosine filter (12 symbols * 4 samples/symbol) */
/* */
/* OUTPUTS */
/* I : A vector of in-phase components of square-root raised */
/* cosine filtered PI/4 DQPSK data. Note that 163 samples */
/* will be written to this buffer. */
/* */
/* Q : A vector of quadrature components of square-root raised */
/* cosine filtered PI/4 DQPSK data. Note that 163 samples */
/* will be written to this buffer. */
/* */
/***********************************************************************************/
/* Include Files */
#include <intrindefs.h>
/* Defines */
/* Function Prototypes */
void rx_src( int*, int*, int, int*, int*, int* );
/* External Function Prototypes */
/* Data */
/* External Data */
/* Code */
void rx_src( int *I_SRC, int *Q_SRC, int samp_offset, int *filt, int *I, int *Q )
{
int i, j, *filt_ptr,*isrc_ptr, *qsrc_ptr;
long I_ltemp, Q_ltemp;
/* Update pointers to SRC data to start at sync point */
I_SRC += samp_offset;
Q_SRC += samp_offset;
/********************/
/* Filter Data Loop */
/********************/
for (i = 163 ; i > 0 ; i--)
{
/* Initialize pointers to input data */
isrc_ptr = I_SRC;
qsrc_ptr = Q_SRC;
/* Set filter pointer to filter */
filt_ptr = filt;
/* Perform 48-tap filter */
I_ltemp = _lsmpy( (*(isrc_ptr++)), (*filt_ptr) );
Q_ltemp = _lsmpy( (*(qsrc_ptr++)), (*(filt_ptr++)) );
for (j = 46 ; j > 0 ; j--)
{
I_ltemp = _smac(I_ltemp, (*(isrc_ptr++)), (*filt_ptr) );
Q_ltemp = _smac(Q_ltemp, (*(qsrc_ptr++)), (*(filt_ptr++)) );
}
I_ltemp = _smacr(I_ltemp, (*isrc_ptr), (*filt_ptr) );
Q_ltemp = _smacr(Q_ltemp, (*qsrc_ptr), (*filt_ptr) );
/* Store output samples */
*(I++) = (I_ltemp>>16);
*(Q++) = (Q_ltemp>>16);
/* Update start sample pointers */
I_SRC += 4;
Q_SRC += 4;
}
return;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -