TI中文支持网
TI专业的中文技术问题搜集分享网站

TCP3d K_1 例程提问

Andy,

       您好!感谢您在这个帖子为我重新推荐这个K-1的例程。

http://www.deyisupport.com/question_answer/dsp_arm/c6000_multicore/f/53/t/67635.aspx

但是目前这个例程并没像您说的那样重新申请两次TCP的handle就可以运行两片TCP3d,目前遇到的问题如下:

1. 这个例程中如下代码:

	tTcp3dResInfo.ucTCPId = ucUsedTcpId;
	tTcp3dResInfo.ucInEdmaTpcc = gtTcp3dInstInfo[ucUsedTcpId].ucEdmaCCInst;/* set the same EDMACC with the TCP3D output channel */
	tTcp3dResInfo.ucInEdmaTc[0] = 0;  /* TC for input channel, set different TC for ping-pong channel */
	tTcp3dResInfo.ucInEdmaTc[1] = 0;
	tTcp3dResInfo.ucOutEdmaTc[0] = 0; /* set the same TC for the in/out channel pair */
	tTcp3dResInfo.ucOutEdmaTc[1] = 0;

为什么输入也要用和输出一样的isntance,为什么注释写的pingpong要不同实际上却给了相同的值,为什么用TC=3就会错?我看了代码确实不能理解,但是我感觉是6670没有tc=3,但是cslr_device.h文件里说有啊。

2. 如下代码:

/*****************************************************************************
 Prototype: Keystone_TCP3D_PollFree
 Description  : Poll the input EDMA channel IPR bit to check whether the TCP3D is free or busyInput: pTcp3dHdlucLastProcBlockNum:
 Output: None
 Return Value : return the free TcpIDHistory:1.Date: 2013/10/17Author: AndyModification : Created function

*****************************************************************************/
Int16 Keystone_TCP3D_PollFree(void* restrict pTcp3dHdl,Uint8ucLastProcBlockNum)

为什么是检查input channel而不是output channel,这里我理解为link的原因对么?

如果一个core控制一个tcp3d,两个一起运行的时候:

在core1上跑的时候输出的第六个block会全为0,core0工作正常;

core 1我修改了input的channel号过后,中断置位bit仍然是10 和11,除了下述代码还需修改其他地方么?

	tTcp3dResInfo.ucInEdmaCh[0] = 10;
	tTcp3dResInfo.ucInEdmaCh[1] = 11; (core 0 工作正常)

3. 也就是我最希望能够解决的一个core控制多片TCP3d,使用这个例程多次初始化申请handle依然无法正常工作。

希望TI的工程师团队能帮忙重新检查一下这个代码是不是有上述我的问题,还是我哪里没做对?希望得到帮助。

谢谢Andy!

Xie Chen

八月十二日

Andy Yin1:

1. ping pong可以给不同的TC也可以给相同的TC;如C6670 table4-1 switch fabirc connection所述,只有EDMCC TC0~2可以对TCP3D内部数据进行访问,TC3是不能访问;

2. 函数内部检查的是TCP3D output channel数据是否搬移,只是例程中将TCP3D OUTPUT channel 完成IPR TCC设置为input channel ID,所以你可以注意到代码中在获取ping pong input channel后,根据给ID去check output channel IPR bit,来查询每个通道译码输出是否完成;

在申请使用多个TCP3D时,注意输入资源配置使用不同的TCP ID,输入EDMA channel使用不同的channel,EDMA PaRAM set资源也要不同,每个core配置的set start index不同,即下面的几个参数必须每个TCP使用不同数值。

 tTcp3dResInfo.ucTCPId = ucUsedTcpId; tTcp3dResInfo.ucInEdmaTpcc = gtTcp3dInstInfo[ucUsedTcpId].ucEdmaCCInst;   /* set the same EDMACC with the TCP3D output channel */ tTcp3dResInfo.ucInEdmaCh[0] = 10; tTcp3dResInfo.ucInEdmaCh[1] = 11; tTcp3dResInfo.uwInPaRAMSetStartIdx = 10; tTcp3dResInfo.uwOutPaRAMSetStartIdx = 50;

另外注意其中使用到的全局变量必须是私有的,如gtTcp3dIcCfg必须是私有的。

chen xie:

回复 Andy Yin1:

谢谢Andy,上述说的都对了,我自己没注意到para set,给您添麻烦了。

但是仍然麻烦请测试一下:TCP3d_C.目前这个片只要使用,头两个块肯定就是错的 ,即使头两个块是 TCP3d_A做的。

比如:TCP3d_A做#1-# 9  TCP3d_C做#10-# 17   TCP3d_C做#18 -# 25    这时候#1 和#2 肯定错;

单独让A、B、A&B跑都没问题,单独跑C、A&C都会出现问题。

(电源打开了的)

/* hardware resource init */ucUsedTcpId_A = 0;tTcp3dResInfo.ucTCPId = ucUsedTcpId_A;tTcp3dResInfo.ucInEdmaTpcc = gtTcp3dInstInfo[ucUsedTcpId_A].ucEdmaCCInst;/* set the same EDMACC with the TCP3D output channel */tTcp3dResInfo.ucInEdmaTc[0] = 0;/* TC for input channel, set different TC for ping-pong channel */tTcp3dResInfo.ucInEdmaTc[1] = 0;tTcp3dResInfo.ucOutEdmaTc[0] = 0; /* set the same TC for the in/out channel pair */tTcp3dResInfo.ucOutEdmaTc[1] = 0;tTcp3dResInfo.ucInEdmaCh[0] = 10;tTcp3dResInfo.ucInEdmaCh[1] = 11;tTcp3dResInfo.uwInPaRAMSetStartIdx = 10;tTcp3dResInfo.uwOutPaRAMSetStartIdx = 50;/* common application parameters */tTcp3dComAppInfo.ucModeSel = TEST_MODE; /* 1-LTE mode, 3-WCDMA split mode, 2-Wimax double buffer mode */tTcp3dComAppInfo.ucStopSel = STOP_SEL; /* 1-CRC stop, 0-max iteration */tTcp3dComAppInfo.ucMaxItr = 8;tTcp3dComAppInfo.ucSNRVal = 14;/* called after cell setup */Keystone_TCP3D_Init((void *)&gtTcp3dHdl[ucUsedTcpId_A],&tTcp3dResInfo,&tTcp3dComAppInfo,gtTcp3dIcCfg_A,TCP3d_A_BLOCK_NUM);/* hardware resource init */ucUsedTcpId_B = 1;tTcp3dResInfo.ucTCPId = ucUsedTcpId_B;tTcp3dResInfo.ucInEdmaTpcc = gtTcp3dInstInfo[ucUsedTcpId_B].ucEdmaCCInst;/* set the same EDMACC with the TCP3D output channel */tTcp3dResInfo.ucInEdmaTc[0] = 1;/* TC for input channel, set different TC for ping-pong channel */tTcp3dResInfo.ucInEdmaTc[1] = 1;tTcp3dResInfo.ucOutEdmaTc[0] = 1; /* set the same TC for the in/out channel pair */tTcp3dResInfo.ucOutEdmaTc[1] = 1;tTcp3dResInfo.ucInEdmaCh[0] = 12;tTcp3dResInfo.ucInEdmaCh[1] = 13;tTcp3dResInfo.uwInPaRAMSetStartIdx = 110;tTcp3dResInfo.uwOutPaRAMSetStartIdx = 150;/* common application parameters */tTcp3dComAppInfo.ucModeSel = TEST_MODE; /* 1-LTE mode, 3-WCDMA split mode, 2-Wimax double buffer mode */tTcp3dComAppInfo.ucStopSel = STOP_SEL; /* 1-CRC stop, 0-max iteration */tTcp3dComAppInfo.ucMaxItr = 8;tTcp3dComAppInfo.ucSNRVal = 14;/* called after cell setup */Keystone_TCP3D_Init((void *)&gtTcp3dHdl[ucUsedTcpId_B],&tTcp3dResInfo,&tTcp3dComAppInfo,gtTcp3dIcCfg_B,TCP3d_B_BLOCK_NUM);/* hardware resource init */ucUsedTcpId_C = 2;tTcp3dResInfo.ucTCPId = ucUsedTcpId_C;tTcp3dResInfo.ucInEdmaTpcc = gtTcp3dInstInfo[ucUsedTcpId_C].ucEdmaCCInst;/* set the same EDMACC with the TCP3D output channel */tTcp3dResInfo.ucInEdmaTc[0] = 2;/* TC for input channel, set different TC for ping-pong channel */tTcp3dResInfo.ucInEdmaTc[1] = 2;tTcp3dResInfo.ucOutEdmaTc[0] = 2; /* set the same TC for the in/out channel pair */tTcp3dResInfo.ucOutEdmaTc[1] = 2;tTcp3dResInfo.ucInEdmaCh[0] = 14;tTcp3dResInfo.ucInEdmaCh[1] = 15;tTcp3dResInfo.uwInPaRAMSetStartIdx = 210;tTcp3dResInfo.uwOutPaRAMSetStartIdx = 250;/* common application parameters */tTcp3dComAppInfo.ucModeSel = TEST_MODE; /* 1-LTE mode, 3-WCDMA split mode, 2-Wimax double buffer mode */tTcp3dComAppInfo.ucStopSel = STOP_SEL; /* 1-CRC stop, 0-max iteration */tTcp3dComAppInfo.ucMaxItr = 8;tTcp3dComAppInfo.ucSNRVal = 14;/* called after cell setup */Keystone_TCP3D_Init((void *)&gtTcp3dHdl[ucUsedTcpId_C],&tTcp3dResInfo,&tTcp3dComAppInfo,gtTcp3dIcCfg_C,TCP3d_C_BLOCK_NUM);
Keystone_TCP3D_TTICfg((void *)&gtTcp3dHdl[ucUsedTcpId_A],gtTcp3dBlockInfo_A,TCP3d_A_BLOCK_NUM,1);//Keystone_TCP3D_TTICfg((void *)&gtTcp3dHdl[ucUsedTcpId_B],
//gtTcp3dBlockInfo_B,
//TCP3d_B_BLOCK_NUM,
//1);Keystone_TCP3D_TTICfg((void *)&gtTcp3dHdl[ucUsedTcpId_C],gtTcp3dBlockInfo_C,TCP3d_C_BLOCK_NUM,1);/* get the TCP3D handle according to ucFreeTcpId */Keystone_TCP3D_Submit((void *)&gtTcp3dHdl[ucUsedTcpId_A],TCP3d_A_BLOCK_NUM);/* get the TCP3D handle according to ucFreeTcpId */
//Keystone_TCP3D_Submit((void *)&gtTcp3dHdl[ucUsedTcpId_B],TCP3d_B_BLOCK_NUM);/* get the TCP3D handle according to ucFreeTcpId */Keystone_TCP3D_Submit((void *)&gtTcp3dHdl[ucUsedTcpId_C],TCP3d_C_BLOCK_NUM);/* check all UE's decoder status */
//Keystone_TCP3D_PollFree((void *)&gtTcp3dHdl[ucUsedTcpId_B], TCP3d_B_BLOCK_NUM);/* check all UE's decoder status */Keystone_TCP3D_PollFree((void *)&gtTcp3dHdl[ucUsedTcpId_C], TCP3d_C_BLOCK_NUM);/* check all UE's decoder status */Keystone_TCP3D_PollFree((void *)&gtTcp3dHdl[ucUsedTcpId_A], TCP3d_A_BLOCK_NUM);

 

Xie

赞(0)
未经允许不得转载:TI中文支持网 » TCP3d K_1 例程提问
分享到: 更多 (0)