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.

How to set TCP2 tail symbol registers?

I am using TCP2 in C6455. I don't know how to set the tail symbol registers (i.e. TCPIC6 to TCPIC11). The manual (pp. 50 to pp. 55 in SPRU973 May 2006) is not clear. It always talks about CDMA-2000. I have also looked at the code in the function TCP2_tailConfig3GPP(). I have tried using this code. The first canned Matlab testvector passes (i.e. TCP2 output bits match with Matlab generated bits). However the second test vector fails. I always use 161 as frame length. I am using TCP2 for 3GPP HSDPA decoding.

Below is my code of setting TCP2 tail symbol registers.
/* Set TCP2 tail registers in gst_tcp_config, i.e. TCPIC6 to TCPIC11. */
// pui_in = input array of uint32. packed input symbols. Refer to figure 5 in pp. 22 of SPRU973 May 2006. Rate 1/3.
// auc_tail = array of 12 uint8
// ui_fl = 161
// gst_tcp_config = structure. type = TCP2_ConfigIc.
   auc_tail[0]  = _extu(pui_in[ui_fl], 26, 26);
   auc_tail[1]  = _extu(pui_in[ui_fl], 20, 26);
   auc_tail[2]  = _extu(pui_in[ui_fl], 8, 26);
   auc_tail[3]  = _extu(pui_in[ui_fl + 1], 26, 26);
   auc_tail[4]  = _extu(pui_in[ui_fl + 1], 20, 26);
   auc_tail[5]  = _extu(pui_in[ui_fl + 1], 8, 26);   
   auc_tail[6]  = _extu(pui_in[ui_fl + 2], 26, 26);
   auc_tail[7]  = _extu(pui_in[ui_fl + 2], 20, 26);
   auc_tail[8]  = _extu(pui_in[ui_fl + 2], 8, 26);   
   auc_tail[9]  = _extu(pui_in[ui_fl + 3], 26, 26);
   auc_tail[10] = _extu(pui_in[ui_fl + 3], 20, 26);
   auc_tail[11] = _extu(pui_in[ui_fl + 3], 8, 26);      
   gst_tcp_config.ic6  = (auc_tail[4] << 12) | (auc_tail[2] << 6) | auc_tail[0];
   gst_tcp_config.ic7  = (auc_tail[5] << 12) | (auc_tail[3] << 6) | auc_tail[1];
   gst_tcp_config.ic8  = 0;
   gst_tcp_config.ic9  = (auc_tail[10] << 12) | (auc_tail[8] << 6) | auc_tail[6];
   gst_tcp_config.ic10 = (auc_tail[11] << 12) | (auc_tail[9] << 6) | auc_tail[7];
   gst_tcp_config.ic11 = 0;
  • The csl function that you looking at is the correct one.  I'm not sure which version of csl you have though, and I've been told that there was an error in some of the early versions (csl_tcp2Aux.h file).  Please make sure this file shows the following:

    /** ============================================================================
     *   @n@b TCP2_makeTailArgs
     *
     *   @b Description
     *   @n This function formats individual bytes into a 32-bit word, which is
     *          used to set the tail bits configuration registers.
     *
     *   @b Arguments
         @verbatim
                byte17_12   Byte to be placed in bits 17-12 of the 32-bit value
                byte11_6    Byte to be placed in bits 11-6 of the 32-bit value
                byte5_0     Byte to be placed in bits 5-0 of the 32-bit value
         @endverbatim
     *
     *   <b> Return Value </b>  Uint32
     *
     *   <b> Pre Condition </b>
     *   @n  None
     *
     *   <b> Post Condition </b>
     *   @n  None
     *
     *   @b Modifies
     *   @n None
     *
     *   @b Example
     *   @verbatim
            TCP2_Params configParams;
            TCP2_IcConfig   configIc

            configIc.ic6 = TCP2_makeTailArgs (xabData[10],

                                xabData[8], xabData[6]);
         @endverbatim
     * =============================================================================
     */
    CSL_IDEF_INLINE Uint32 TCP2_makeTailArgs (

        Uint8 byte17_12,
        Uint8 byte11_6, 
        Uint8 byte5_0
    )
    {

      Uint32 x = 0;


    //  x = (byte17_12 << 12) | (byte11_6 << 6) | byte5_0;
      x =   (((Uint32)byte17_12 & (Uint32)0x0000003F) << 12) \
          | (((Uint32)byte11_6 & (Uint32)0x0000003F) << 6) \
          | ((Uint32)byte5_0 & (Uint32)0x0000003F);
      return(x);

    }

     

    I will also check into getting you some example code which has the complete signal path from turbo encoder to using the TCP2 for the decode.  If I can locate this, it will definitely have the setup of the tail registers, though it may use custom function calls instead of the csl.

     

    Regards,

    Travis

  • Hi Travis,

    I have looked at your new code. The only difference is the masking of the low 6 bits in each input variable (this masking is only in the new code). I have done that in my code. 

  • We are working on the implementation of TCP2 based decoder for the 6455 processor.It seems that there is a problem with EDMA-ing the interleaver tables into the TCP2.

    The problem arises when example code from the TI web site is used (Tcp2_standalone_mode_example.c) . This example uses the CSL libraries. The example code correctly decodes the message irrespectively of the interleaver loaded into the TCP2. 

     

    Is there any other complete TCP2 example available where encoding is done in C and decoding using TCP2?

     

    Thanks a lot,

    Dejan Djonin

    Dyaptive Systems

  • I'm going to try and post the example here, I've been trying unsuccessfully for a few days to get it posted to the GForge site.  Hopefully it will be there soon too. 

    This code was written to perform BER testing on the TCP2, as well as VCP2, for the C6455/TCI6482 device.  It has the full signal path with software encoder functions and then uses the hardware co-processors for decode.

     

     

    Let me know if you have problems downloading the zip file.

    Regards,

    Travis

  • Thanks a lot!

    I had no problems downloading the ZIP file.

    Regards,

    Dejan 

  • Hi,

    I am still having problems with TCP2 and the usage of interleaver. If one changes the interleaver in the TI example code provided above, for both encoding and TCP2 based decode, the TCP2 can't correctly decode frames even with no noise.  

    Does the C6455 processor support the Turbo Interleavers used in the LTE?

    Thanks,

    Dejan

  • Dejan,


    Are you able to successfully load the example code I provided and correctly decode the frames without changing the interleaver table?  If your issue only shows when you change the interleaver, can you read the TCP2 memory and make sure that the interleaver values that you loaded in match the values in the DSP memory?  I'm not sure why you are seeing this, but something is not setup correctly.  What are the encode/decode parameters you are trying to use?

    The TCP2 on the C6455 can support LTE interleavers for all the defined block sizes.  However, the throughput is limited to the 17-18Mbps.

     

    Regards,

    Travis

  • PROBLEM: TCP2 for C6455 does not seem to operate correctly with interleavers that are not designed for the WCDMA. Loading other types of interleavers results in errors as demostrated below.

    EXAMPLE:

    The TI example for measuring BER performance HimBerCalculation of the TCP2 does not work correctly for non-WCDMA interleavers. To demostrate that, the following should be changed in the example:

    1)       In file HimBerCalcMainVcpTcp.c, below line 527 add:

              /* Zeroing Out Parity 1 Bits */
             
    for (j=0;j<(tcpParameters->frameLen);j++)  {
              UserDataRate5[j]
    = (UserDataRate5[j] & 0xFFFFF03F);
             
    }

               

                This code should zero out the first parity, rendering the first constituent MAP decoder of the turbo decoder useless.

    2)       Below line 241 in function turboInterleaverTableGenerator.c add:

    for (i=0;i<K; i++)
              T[i]
    =i;

                This sets the interleaver that is to be loaded in TCP2 to do no permutation at all.

    3)       In tcp2_frame_types.h set

    TCP2BERCurve TcpCurveParameters[TCP2_NUM_CURVES] = {
    /* # -------------------- ?????????????  ------------------ # */
    {
        
    0,            /* standard ............. */
        
    3,            /* rate ................. */
        
    352,          /* frameLen ............. */
        
    16,           /* prologSize ........... */
        
    8,            /* maxIter .............. */
        
    0,            /* snr threshold ........ */
        
    1,            /* intFlag .............. */
        
    1,            /* outParmFlag .......... */
        
    1,            /* tailBiting. .......... */
        
    352,     /* nbits thresh ......... */
        
    1000,         /* erroneous frame thresh */
        
    0.0,          /* sigma mininimum ...... */
        
    0.0,      /* sigma maximumum ...... */
       
    }                
    };

    This sets the noise to zero for frame length of 352 bits.

    If you compile and run this code there wil be errors and that should NOT happen. Effectively, the above change rendered the first constituent MAP decoder useless, while the second MAP decoder should behave as the first one since the interleaver is trivial case of no-permutation. This indicates that there is a problem with processing interleaved parity data or loading interleaver tables. Note, if the same code is used with the WCDMA interleaver, omitting step 2, there will be no errors.


    Is this a C6455 TCP2 coprocessor problem, or the interleaver loading code in the TI example is not correct?

  • Dejan,

    I found out that the example code we supplied was written for WCDMA only.  The LTE and WCDMA encoders are the same structure, but they have different interleavers.  So what I think is happening is that the encoder is using the WCDMA interleaver, and you are loading your LTE interleaver coefficients into the TCP2.  I'll do some more checking and get back with you tomorrow. 

    Regards,

    Travis

  • Dejan,

    Here is the BER example code adjusted for LTE interleavers.  It was tested with your 352b block size, so this should do the trick.  It is packaged with the C6474(TCI6488) csl and libs, but the code will work on the C6455 too.  Let me know if you have any issues.

    https://gforge.ti.com/gf/download/frsrelease/260/3132/TCI6488TCP2VCP2BER_1_0_0_TurboLTE.zip

     

    Regards,

    Travis

     

  • dear ,

    I try to download

    https://gforge.ti.com/gf/download/frsrelease/260/3132/TCI6488TCP2VCP2BER_1_0_0_TurboLTE.zip

    but it can't.

    could you send the code to my email:lihaiyonglhy@yahoo.com.cn.

    thanks.

  • I won't send this to a personal email address, but I can attach here.

    Regards,

    Travis

    TCI6488TCP2VCP2BER_1_0_0_TurboLTE.zip
  • You helped me out the problem.

    Thanks a lot.