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.

TDA4VM: Question about Csitx Lane Speed Configuration

Part Number: TDA4VM

Hi TI's expert,

     I try to use tivxCsitxNode to transfer  the image (2560*2560 UYVY), the verion of SDK is 7.03. And I also have patched  the file 0001-CSITX-DRV-Bug-Fix-PDK-9694-CSITX-CSITX-supports-only.patch in SDK.

    The configuration of tivxCsitxNode is as follows,  

    tivx_csitx_params_init(&local_csitx_config);
    local_csitx_config.numInst                          = 1U;
    local_csitx_config.numCh                            = 1U;
    local_csitx_config.instId[0U]                       = 0U;
    local_csitx_config.instCfg[0U].rxCompEnable         = (uint32_t)vx_true_e;
    local_csitx_config.instCfg[0U].rxv1p3MapEnable    = (uint32_t)vx_true_e;
    local_csitx_config.instCfg[0U].laneBandSpeed        = TIVX_CSITX_LANE_BAND_SPEED_770_TO_870_MBPS; 
    local_csitx_config.instCfg[0U].numDataLanes         = 4U;
    for (loopCnt = 0U; loopCnt < local_csitx_config.instCfg[0U].numDataLanes; loopCnt++)
    {
        local_csitx_config.instCfg[0U].lanePolarityCtrl[loopCnt] = 0u;
    }
    for (loopCnt = 0U; loopCnt < 1; loopCnt++)
    {
        local_csitx_config.chVcNum[loopCnt]   = loopCnt;
        local_csitx_config.chInstMap[loopCnt] = 0;
    }
    and data not received at csitx output interface.

    

    Then I try to slow down the laneBandSpeed, In these cases, data can be received normally,

     a) CSITX_LANE_BAND_SPEED_560_TO_640_MBPS      ------->              2560*2560*30fps UYVY

     b) CSITX_LANE_BAND_SPEED_510_TO_560_MBPS      ------->              2560*2560*25fps UYVY

    I tried to check the previous E2E questions and found that the calculation formula of lane speed is as follows,

     w * h * fps * bpp * blanking / (1024 * 1024 * lane_num) or  w * h * fps * bpp * blanking / (1000 * 1000 * lane_num)

     According to the formula, the Lane Speed should be the following values

     2560 * 2560 * 30 * 16 * 1.2 / (1024 * 1024 * 4) = 900 MBPS  and   2560 * 2560 * 25 * 16 * 1.2 / (1024 * 1024 * 4) = 750 MBPS

     or

     2560 * 2560 * 30 * 16 * 1.2 / (1000 * 1000 * 4) = 943.72 MBPS  and  2560 * 2560 * 25 * 16 * 1.2 / (1000 * 1000 * 4) = 786.43 MBPS

     

     So is the above formula correct? If it is wrong, how should it be calculated?

     

Best Regards!

  • Hi,

    Above formula is correct. 560 to 640Mbps seems very less for 2560x2560 resolution.. It might output, but not at the correct fps. Could you please check if you are getting correct fps? 

    Regards,

    Brijesh

  • Hi Brijesh,

        Thanks  for your reply! 

        Our hardware interfaces are as follows,

                  tda4                                                                                                            Other Board

        CSI ---->   UB953 (Synchronous)                 ===>            UB960(Non-synchronous, REFCLOCK = 25Mhz)  ------> Other CPU ------> display

               

        I tried to test all the rates as follows,   fps of recving by reading the register 0x91 for UB960 and fps of sending by the function 

    appPerfPointPrintFPS() in tda4.
        
        Formula 1 =  w * h * fps * bpp * blanking / (1024 * 1024 * lane_num)
        Formula 2 =  w * h * fps * bpp * blanking / (1000 * 1000 * lane_num)
    No. DefaultInfo List Mbps Fps 2 By Formula 1 Fps By Formula 2 Fps For UB960 Recv  Fps For UB953 Send
    1 CSITX_LANE_BAND_SPEED_80_TO_100_MBPS 100 3.33 3.18 5 4.73
    2 CSITX_LANE_BAND_SPEED_100_TO_120_MBPS 120 4.00 3.81 6 5.64
    3 CSITX_LANE_BAND_SPEED_120_TO_160_MBPS 150 5.00 4.77 8 7
    4 CSITX_LANE_BAND_SPEED_160_TO_200_MBPS 200 6.67 6.36 10 9.16
    5 CSITX_LANE_BAND_SPEED_200_TO_240_MBPS 220 7.33 6.99 11 10.2
    6 CSITX_LANE_BAND_SPEED_240_TO_320_MBPS 300 10.00 9.54 15 13.4
    7 CSITX_LANE_BAND_SPEED_320_TO_390_MBPS 350 11.67 11.13 17 15.36
    8 CSITX_LANE_BAND_SPEED_390_TO_450_MBPS 400 13.33 12.72 19 17.29
    9 CSITX_LANE_BAND_SPEED_450_TO_510_MBPS 500 16.67 15.89 23 21.2
    10 CSITX_LANE_BAND_SPEED_510_TO_560_MBPS 550 18.33 17.48 25 22.9
    11 CSITX_LANE_BAND_SPEED_560_TO_640_MBPS 600 20.00 19.07 28 24.65
    12 CSITX_LANE_BAND_SPEED_640_TO_690_MBPS 650 21.67 20.66 29 26.5
    13 CSITX_LANE_BAND_SPEED_690_TO_770_MBPS 700 23.33 22.25 31 27.91
    14 CSITX_LANE_BAND_SPEED_770_TO_870_MBPS 800 26.67 25.43 35 31.13
    15 CSITX_LANE_BAND_SPEED_870_TO_950_MBPS 900 30.00 28.61 38 34.21
    16 CSITX_LANE_BAND_SPEED_950_TO_1000_MBPS 1000 33.33 31.79 41 36.28
    17 CSITX_LANE_BAND_SPEED_1000_TO_1200_MBPS 1188 39.60 37.77 41 36.9
    18 CSITX_LANE_BAND_SPEED_1200_TO_1400_MBPS 1300 43.33 41.33 40 36.1
    19 CSITX_LANE_BAND_SPEED_1400_TO_1600_MBPS 1500 50.00 47.68 41 36.39
    20 CSITX_LANE_BAND_SPEED_1600_TO_1800_MBPS 1600 53.33 50.86 40 36.11
    21 CSITX_LANE_BAND_SPEED_1800_TO_2000_MBPS 1800 60.00 57.22 40 36.32
    22

    CSITX_LANE_BAND_SPEED_2000_TO_2200_MBPS

    2000 66.67 63.58 40 36.18
    23 CSITX_LANE_BAND_SPEED_2200_TO_2500_MBPS 2500 83.33 79.47 40 36

    The green background indicates that it can be displayed normally, and the others not. 

    The red background indicates that the fps can not increase, I guess it may exceed the maximum  serializer speed for 4.16Gbps.

    The yellow background Unable to display normally which I am confused!

    Can you help me that why do the speed of  yellow background Unable to display normally?

    Looking for your reply!

    Best regards!

  • Hi Zheng,

    How do you calculate fps at ub953? Is it what you are sending out in OpenVX? 

    I think fps in ub960 cannot be float number, so there could be difference of 1fps in ub960..

    I think we can ignore lane speed marked as red, because they most likely exceed max speed.. 

    When you say speed marked with yellow does not display properly, what does it mean? Do you get correct frame captured on ub960? When you use these speeds, is it this within the limit of 1.5Gbps CSI output of ub960 (depending on the reference clock used)? 

    Can you please check if ub960 reporting any error status? 

    Regards,

    Brijesh