This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320C6657: 在c6657上运行VCP2的时候出现尾部bit出错。

Part Number: TMS320C6657


vcpBaseParams.rate = VCP2_RATE_1_2;
vcpBaseParams.constLen = CONSTRAINT_LEN;
vcpBaseParams.frameLen = 504;
vcpBaseParams.yamTh = 0;
vcpBaseParams.stateNum = 0;
vcpBaseParams.tbConvrgMode = FALSE;
vcpBaseParams.decision = VCP2_DECISION_HARD;
vcpBaseParams.readFlag = 1;
vcpBaseParams.tailBitEnable = TRUE;
vcpBaseParams.traceBackIndex = 0;
vcpBaseParams.outOrder = 0;

我是这样配置我的VCP2的,但是在信噪比为20左右的时候,循环运行8组数据之后输出的结果就会出错,但是一组一组的设断点运行就不会错,不知道为啥。

//量化

void Quantify_8bit (float *datain,signed char *dataout,int lenth)
{
int i,j=0,k=0;
int bitLimit;
float tmp;
float t0;

tmp = DSPF_sp_maxval(datain,lenth);
tmp = _fabsf(tmp);

bitLimit = 63;
t0 = 1/tmp*bitLimit;

#pragma UNROLL(4);
#pragma MUST_ITERATE(504,504,4);
for(i = 0;i<lenth;i++)
{

dataout[j++] = _spint(_mpysp2dp(datain[k++],t0));
dataout[j++] = _spint(_mpysp2dp(datain[k++],t0));

}

//计算分支度量

void ComputeBranchMetrics2(const signed char *softinput,signed char *branchMetric,int rate ,int len)
{
int i,j,bmIndex;
bmIndex = 0;
#pragma UNROLL(2);
#pragma MUST_ITERATE(504,504,2);
for(i=0;i<len;i++)
{
j=2*i;
branchMetric[bmIndex++] = softinput[j] + softinput[j+1];
branchMetric[bmIndex++] = softinput[j] - softinput[j+1];
}
}

上面是我对输入float数据进行的处理,希望各位前辈指点一下,为什么我的译码会出错。谢谢