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.

TDA4VH-Q1: How to enable C7x L1D SRAM for use with scalar data

Part Number: TDA4VH-Q1
Other Parts Discussed in Thread: TDA4VH

Tool/software:

The TDA4VH TRM suggests that there is a 16KB L1D partition available as SRAM and separate from L1D cache that can be used for LUT and histogram. Is this correct and can this SRAM be used local for storage of scalar operands.? Assuming YES, we would like to know how to configure the MMU to enable this C7x L1D SRAM if it exists. We are writing C7x code using DSPLIB environment as a starting point.

  1. We are using J784S4 RTOS SDK 10.01.00.04 on Ubuntu 22.04.1 host
  2. We have followed the DSPLIB build instructions at this link: https://software-dl.ti.com/jacinto7/esd/processor-sdk-rtos-j784s4/10_01_00_04/exports/docs/dsplib/docs/user_guide/build_instructions_linux.html 
  3. We have followed the CCS baremetal instructions at this link: https://software-dl.ti.com/jacinto7/esd/processor-sdk-rtos-j784s4/latest/exports/docs/psdk_rtos/docs/user_guide/ccs_setup_j784s4.html#debugging-without-hlos-running-on-a72-rtos-only-baremetal 
  4. We are using a J784S4XG01EVM rev PROC141E5(001) for our testing

From the DSPLIB linker command file we guessed that the L1D SRAM is mapped at address 0x64800000, but when we link variables there, our application does not execute correctly and we are not able to modify those address ranges with CCS.

  • Hi,

    Assuming YES, we would like to know how to configure the MMU to enable this C7x L1D SRAM if it exists.

    For bare-metal MMU configuration is not required. If you need to check the MMU configurations you can check InitMmu from vision_apps\platform\j784s4\rtos\c7x_1\main.c

    From the DSPLIB linker command file we guessed that the L1D SRAM is mapped at address 0x64800000, but when we link variables there, our application does not execute correctly and we are not able to modify those address ranges with CCS.

    Also from default linker script available in DSPLIB (C7120) the mapping seems to be at 0x64E00000 instead if 0x64800000 where L2SRAM is mapped

     .


    I was able to read and write data from the same using the code snippet below : 

    #include<iostream>
    
    __attribute__((section(".l1dmemory"), aligned(64))) int32_t l1_data[1024];
    
    int main()
    {
         for (int i = 0; i < 1024; ++i)
            l1_data[i] = i;
        for (int i = 0; i < 1024; ++i)
            std::cout<< l1_data[i]<<",";
        return 0;
    }

    Regards,
    Sivadeep

  • Sivadeep thank you for this helpful reply. First, the L1D address I shared earlier was a typo and we are actually using 0x64E00000 as you stated.

    The example you provided works correctly as you stated. Thank you.

    However we are having trouble using this memory in our firmware, and it seems we are doing multiple things wrong. We started this work using DSPLIB and have since moved on to using intrinsics, but we have never been able to use the L1D SRAM, even with basic DSPLIB examples. For example I went back to this very basic DSPLIB example, that works correctly if we link the variables to .l2dmemory, but fails if we link them to .l1dmemory as shown. See the three DATA_SECTION pragma statements before main. If we change those to l2dmemory than things work correctly. Can you help us understand why this fails... Is it because vector arguments must remain in L2?

    Note, that this is not our current problem with L1D SRAM but I wanted to go back to before we were enabling cache. I believe we are introducing additional problems when we enable cache because we "borrowed" the function call enable_cache_mmu((uint64_t) pte_lvl0) and associated .c/.h files from DSPLIB test code. This function enables the cache and MMU, and you said MMU is not needed for bare-metal configuration. We agree with that but we were looking for a way to enable cache and we found this code in DSPLIB. Its possible/likely that we introduced more problems when we enabled MMU.

    #include "dsplib.h"
    #include <stdint.h>
    
       // Setup input and output buffers for single- and double-precision datatypes
    #pragma DATA_SECTION (".l1dmemory")
       float in0[] = {0.71649936, 0.13543484, 0.50923542, 0.54119591, 0.19242506, 0.38308575, 0.56363197, 0,0.71649936, 0.13543484, 0.50923542, 0.54119591, 0.19242506, 0.38308575, 0.56363197, 0, 0.99,
                      0.24567145, 0.05629663, 0.99152828, 0.4799542,  0.97309674, 0.79839982, 0.06691247, 1,0.24567145, 0.05629663, 0.99152828, 0.4799542,  0.97309674, 0.79839982, 0.06691247, 1, 0.1,
                      0.71649936, 0.13543484, 0.50923542, 0.54119591, 0.19242506, 0.38308575, 0.56363197, 0,0.71649936, 0.13543484, 0.50923542, 0.54119591, 0.19242506, 0.38308575, 0.56363197, 0, 0.99,
                      0.24567145, 0.05629663, 0.99152828, 0.4799542,  0.97309674, 0.79839982, 0.06691247, 1,0.24567145, 0.05629663, 0.99152828, 0.4799542,  0.97309674, 0.79839982, 0.06691247, 1, 0.1,
                      0.71649936, 0.13543484, 0.50923542, 0.54119591, 0.19242506, 0.38308575, 0.56363197, 0,0.71649936, 0.13543484, 0.50923542, 0.54119591, 0.19242506, 0.38308575, 0.56363197, 0, 0.99,
                      0.24567145, 0.05629663, 0.99152828, 0.4799542,  0.97309674, 0.79839982, 0.06691247, 1,0.24567145, 0.05629663, 0.99152828, 0.4799542,  0.97309674, 0.79839982, 0.06691247, 1, 0.1,
                      0.71649936, 0.13543484, 0.50923542, 0.54119591, 0.19242506, 0.38308575, 0.56363197, 0,0.71649936, 0.13543484, 0.50923542, 0.54119591, 0.19242506, 0.38308575, 0.56363197, 0, 0.99,
                      0.24567145, 0.05629663, 0.99152828, 0.4799542,  0.97309674, 0.79839982, 0.06691247, 1,0.24567145, 0.05629663, 0.99152828, 0.4799542,  0.97309674, 0.79839982, 0.06691247, 1, 0.1,
                      0.71649936, 0.13543484, 0.50923542, 0.54119591, 0.19242506, 0.38308575, 0.56363197, 0,0.71649936, 0.13543484, 0.50923542, 0.54119591, 0.19242506, 0.38308575, 0.56363197, 0, 0.99,
                      0.24567145, 0.05629663, 0.99152828, 0.4799542,  0.97309674, 0.79839982, 0.06691247, 1,0.24567145, 0.05629663, 0.99152828, 0.4799542,  0.97309674, 0.79839982, 0.06691247, 1, 0.1,
                      0.71649936, 0.13543484, 0.50923542, 0.54119591, 0.19242506, 0.38308575, 0.56363197, 0,0.71649936, 0.13543484, 0.50923542, 0.54119591, 0.19242506, 0.38308575, 0.56363197, 0, 0.99,
                      0.24567145, 0.05629663, 0.99152828, 0.4799542,  0.97309674, 0.79839982, 0.06691247, 1,0.24567145, 0.05629663, 0.99152828, 0.4799542,  0.97309674, 0.79839982, 0.06691247, 1, 0.1,
                      0.71649936, 0.13543484, 0.50923542, 0.54119591, 0.19242506, 0.38308575, 0.56363197, 0,0.71649936, 0.13543484, 0.50923542, 0.54119591, 0.19242506, 0.38308575, 0.56363197, 0, 0.99,
                      0.24567145, 0.05629663, 0.99152828, 0.4799542,  0.97309674, 0.79839982, 0.06691247, 1,0.24567145, 0.05629663, 0.99152828, 0.4799542,  0.97309674, 0.79839982, 0.06691247, 1, 0.1,
                      0.71649936, 0.13543484, 0.50923542, 0.54119591, 0.19242506, 0.38308575, 0.56363197, 0,0.71649936, 0.13543484, 0.50923542, 0.54119591, 0.19242506, 0.38308575, 0.56363197, 0, 0.99,
                      0.24567145, 0.05629663, 0.99152828, 0.4799542,  0.97309674, 0.79839982, 0.06691247, 1,0.24567145, 0.05629663, 0.99152828, 0.4799542,  0.97309674, 0.79839982, 0.06691247, 1, 0.1
       };
    #pragma DATA_SECTION (".l1dmemory")
       float in1[] = {0.,         0.78539816, 1.57079633, 2.35619449, 3.14159265, 3.92699082, 4.71238898, 1, 0.,         0.78539816, 1.57079633, 2.35619449, 3.14159265, 3.92699082, 4.71238898, 1,
                      5.49778714, 0.,         0.78539816, 1.57079633, 2.35619449, 3.14159265, 3.92699082, 0, 5.49778714, 0.,         0.78539816, 1.57079633, 2.35619449, 3.14159265, 3.92699082, 0,
                      0.,         0.78539816, 1.57079633, 2.35619449, 3.14159265, 3.92699082, 4.71238898, 1, 0.,         0.78539816, 1.57079633, 2.35619449, 3.14159265, 3.92699082, 4.71238898, 1,
                      5.49778714, 0.,         0.78539816, 1.57079633, 2.35619449, 3.14159265, 3.92699082, 0, 5.49778714, 0.,         0.78539816, 1.57079633, 2.35619449, 3.14159265, 3.92699082, 0,
                      0.,         0.78539816, 1.57079633, 2.35619449, 3.14159265, 3.92699082, 4.71238898, 1, 0.,         0.78539816, 1.57079633, 2.35619449, 3.14159265, 3.92699082, 4.71238898, 1,
                      5.49778714, 0.,         0.78539816, 1.57079633, 2.35619449, 3.14159265, 3.92699082, 0, 5.49778714, 0.,         0.78539816, 1.57079633, 2.35619449, 3.14159265, 3.92699082, 0,
                      0.,         0.78539816, 1.57079633, 2.35619449, 3.14159265, 3.92699082, 4.71238898, 1, 0.,         0.78539816, 1.57079633, 2.35619449, 3.14159265, 3.92699082, 4.71238898, 1,
                      5.49778714, 0.,         0.78539816, 1.57079633, 2.35619449, 3.14159265, 3.92699082, 0, 5.49778714, 0.,         0.78539816, 1.57079633, 2.35619449, 3.14159265, 3.92699082, 0,
                      0.,         0.78539816, 1.57079633, 2.35619449, 3.14159265, 3.92699082, 4.71238898, 1, 0.,         0.78539816, 1.57079633, 2.35619449, 3.14159265, 3.92699082, 4.71238898, 1,
                      5.49778714, 0.,         0.78539816, 1.57079633, 2.35619449, 3.14159265, 3.92699082, 0, 5.49778714, 0.,         0.78539816, 1.57079633, 2.35619449, 3.14159265, 3.92699082, 0,
                      0.,         0.78539816, 1.57079633, 2.35619449, 3.14159265, 3.92699082, 4.71238898, 1, 0.,         0.78539816, 1.57079633, 2.35619449, 3.14159265, 3.92699082, 4.71238898, 1,
                      5.49778714, 0.,         0.78539816, 1.57079633, 2.35619449, 3.14159265, 3.92699082, 0, 5.49778714, 0.,         0.78539816, 1.57079633, 2.35619449, 3.14159265, 3.92699082, 0,
                      0.,         0.78539816, 1.57079633, 2.35619449, 3.14159265, 3.92699082, 4.71238898, 1, 0.,         0.78539816, 1.57079633, 2.35619449, 3.14159265, 3.92699082, 4.71238898, 1,
                      5.49778714, 0.,         0.78539816, 1.57079633, 2.35619449, 3.14159265, 3.92699082, 0, 5.49778714, 0.,         0.78539816, 1.57079633, 2.35619449, 3.14159265, 3.92699082, 0,
                      0.,         0.78539816, 1.57079633, 2.35619449, 3.14159265, 3.92699082, 4.71238898, 1, 0.,         0.78539816, 1.57079633, 2.35619449, 3.14159265, 3.92699082, 4.71238898, 1,
                      5.49778714, 0.,         0.78539816, 1.57079633, 2.35619449, 3.14159265, 3.92699082, 0, 5.49778714, 0.,         0.78539816, 1.57079633, 2.35619449, 3.14159265, 3.92699082, 0
       };
    #pragma DATA_SECTION (".l1dmemory")
       float out[256] = {0.0};
    
    /******************************************************************************/
    /*                                                                            */
    /* main                                                                       */
    /*                                                                            */
    /******************************************************************************/
    
    int main(void)
    {
       uint32_t size = 256;
    
       // handles and struct for call to kernel
       DSPLIB_STATUS       status;
       DSPLIB_add_InitArgs kerInitArgs;
       int32_t             handleSize = DSPLIB_add_getHandleSize(&kerInitArgs);
       DSPLIB_kernelHandle handle     = malloc(handleSize);
    
       DSPLIB_bufParams1D_t bufParamsIn, bufParamsOut;
    
       // fill in input and output buffer parameters
       bufParamsIn.data_type = DSPLIB_FLOAT32;
       bufParamsIn.dim_x     = size;
    
       bufParamsOut.data_type = DSPLIB_FLOAT32;
       bufParamsOut.dim_x     = size;
    
       kerInitArgs.dataSize  = size;
       kerInitArgs.funcStyle = DSPLIB_FUNCTION_OPTIMIZED;
    
       status = DSPLIB_SUCCESS;
    
       // init
       if (status == DSPLIB_SUCCESS)
          status = DSPLIB_add_init(handle, &bufParamsIn, &bufParamsOut, &kerInitArgs);
    
    
       // exec checkparams
       DSPLIB_add_exec_checkParams(handle, in0, in1, out);
    
       unsigned long start_time, stop_time;
       // exec
       if (status == DSPLIB_SUCCESS) {
          start_time = __TSC;
          status = DSPLIB_add_exec(handle, in0, in1, out);
          stop_time = __TSC;
       }
       printf("\nNumber of clock cycles elapsed in %lu\n", stop_time - start_time);
    
       // print results
       for (size_t c = 0; c < size; c++) {
          printf("%10g + %10g = %10g\n", in0[c], in1[c], out[c]);
       }
    
       return 0;
    }
     

  • Hi Ruben,

    The optimized DSPLIB code uses the Streaming Engine (SE) for data transfer. The SE fetches data from L2 (and beyond) to the CPU (C7x) boundary.

    Therefore, allocating memory in L1 causes an error, as the SE cannot fetch data from L1, which is closer to the CPU.

    If you need to use data from the L1D cache, you can switch from DSPLIB_FUNCTION_OPTIMIZED to DSPLIB_FUNCTION_NATC. This version doesn't use the SE or any other intrinsics and fetches data directly.

    I verified this by modifying your code and was able to get the expected output.

    int main(void)
    {
       uint32_t size = 256;
    
       // handles and struct for call to kernel
       DSPLIB_STATUS       status;
       DSPLIB_add_InitArgs kerInitArgs;
       int32_t             handleSize = DSPLIB_add_getHandleSize(&kerInitArgs);
       DSPLIB_kernelHandle handle     = malloc(handleSize);
    
       DSPLIB_bufParams1D_t bufParamsIn, bufParamsOut;
    
       // fill in input and output buffer parameters
       bufParamsIn.data_type = DSPLIB_FLOAT32;
       bufParamsIn.dim_x     = size;
    
       bufParamsOut.data_type = DSPLIB_FLOAT32;
       bufParamsOut.dim_x     = size;
    
       kerInitArgs.dataSize  = size;
       kerInitArgs.funcStyle = DSPLIB_FUNCTION_NATC;
    
       status = DSPLIB_SUCCESS;
    
       // init
       if (status == DSPLIB_SUCCESS)
          status = DSPLIB_add_init(handle, &bufParamsIn, &bufParamsOut, &kerInitArgs);
    
    
       // exec checkparams
       DSPLIB_add_exec_checkParams(handle, in0, in1, out);
    
       unsigned long start_time, stop_time;
       // exec
       if (status == DSPLIB_SUCCESS) {
          start_time = __TSC;
          status = DSPLIB_add_exec(handle, in0, in1, out);
          stop_time = __TSC;
       }
       printf("\nNumber of clock cycles elapsed in %lu\n", stop_time - start_time);
    
       // print results
       size_t c =0;
       for (; c < size; c++) {
          printf("%10g + %10g = %10g\n", in0[c], in1[c], out[c]);
       }
    
       return 0;
    }

    Output : 

    [C71X_0] 
    Number of clock cycles elapsed in 231
      0.716499 +          0 =   0.716499
      0.135435 +   0.785398 =   0.920833
      0.509235 +     1.5708 =    2.08003
      0.541196 +    2.35619 =    2.89739
      0.192425 +    3.14159 =    3.33402
      0.383086 +    3.92699 =    4.31008
      0.563632 +    4.71239 =    5.27602
             0 +          1 =          1
      0.716499 +          0 =   0.716499
      0.135435 +   0.785398 =   0.920833
      0.509235 +     1.5708 =    2.08003
      0.541196 +    2.35619 =    2.89739
      0.192425 +    3.14159 =    3.33402
      0.383086 +    3.92699 =    4.31008
      0.563632 +    4.71239 =    5.27602
             0 +          1 =          1
          0.99 +    5.49779 =    6.48779
      0.245671 +          0 =   0.245671
     0.0562966 +   0.785398 =   0.841695
      0.991528 +     1.5708 =    2.56232
      0.479954 +    2.35619 =    2.83615
      0.973097 +    3.14159 =    4.11469
        0.7984 +    3.92699 =    4.72539
     0.0669125 +          0 =  0.0669125
             1 +    5.49779 =    6.49779
      0.245671 +          0 =   0.245671
     0.0562966 +   0.785398 =   0.841695
      0.991528 +     1.5708 =    2.56232
      0.479954 +    2.35619 =    2.83615
      0.973097 +    3.14159 =    4.11469
        0.7984 +    3.92699 =    4.72539
     0.0669125 +          0 =  0.0669125
             1 +          0 =          1
           0.1 +   0.785398 =   0.885398
      0.716499 +     1.5708 =     2.2873
      0.135435 +    2.35619 =    2.49163
      0.509235 +    3.14159 =    3.65083
      0.541196 +    3.92699 =    4.46819
      0.192425 +    4.71239 =    4.90481
      0.383086 +          1 =    1.38309
      0.563632 +          0 =   0.563632
             0 +   0.785398 =   0.785398
      0.716499 +     1.5708 =     2.2873
      0.135435 +    2.35619 =    2.49163
      0.509235 +    3.14159 =    3.65083
      0.541196 +    3.92699 =    4.46819
      0.192425 +    4.71239 =    4.90481
      0.383086 +          1 =    1.38309
      0.563632 +    5.49779 =    6.06142
             0 +          0 =          0
          0.99 +   0.785398 =     1.7754
      0.245671 +     1.5708 =    1.81647
     0.0562966 +    2.35619 =    2.41249
      0.991528 +    3.14159 =    4.13312
      0.479954 +    3.92699 =    4.40694
      0.973097 +          0 =   0.973097
        0.7984 +    5.49779 =    6.29619
     0.0669125 +          0 =  0.0669125
             1 +   0.785398 =     1.7854
      0.245671 +     1.5708 =    1.81647
     0.0562966 +    2.35619 =    2.41249
      0.991528 +    3.14159 =    4.13312
      0.479954 +    3.92699 =    4.40694
      0.973097 +          0 =   0.973097
        0.7984 +          0 =     0.7984
     0.0669125 +   0.785398 =   0.852311
             1 +     1.5708 =     2.5708
           0.1 +    2.35619 =    2.45619
      0.716499 +    3.14159 =    3.85809
      0.135435 +    3.92699 =    4.06243
      0.509235 +    4.71239 =    5.22162
      0.541196 +          1 =     1.5412
      0.192425 +          0 =   0.192425
      0.383086 +   0.785398 =    1.16848
      0.563632 +     1.5708 =    2.13443
             0 +    2.35619 =    2.35619
      0.716499 +    3.14159 =    3.85809
      0.135435 +    3.92699 =    4.06243
      0.509235 +    4.71239 =    5.22162
      0.541196 +          1 =     1.5412
      0.192425 +    5.49779 =    5.69021
      0.383086 +          0 =   0.383086
      0.563632 +   0.785398 =    1.34903
             0 +     1.5708 =     1.5708
          0.99 +    2.35619 =    3.34619
      0.245671 +    3.14159 =    3.38726
     0.0562966 +    3.92699 =    3.98329
      0.991528 +          0 =   0.991528
      0.479954 +    5.49779 =    5.97774
      0.973097 +          0 =   0.973097
        0.7984 +   0.785398 =     1.5838
     0.0669125 +     1.5708 =    1.63771
             1 +    2.35619 =    3.35619
      0.245671 +    3.14159 =    3.38726
     0.0562966 +    3.92699 =    3.98329
      0.991528 +          0 =   0.991528
      0.479954 +          0 =   0.479954
      0.973097 +   0.785398 =    1.75849
        0.7984 +     1.5708 =     2.3692
     0.0669125 +    2.35619 =    2.42311
             1 +    3.14159 =    4.14159
           0.1 +    3.92699 =    4.02699
      0.716499 +    4.71239 =    5.42889
      0.135435 +          1 =    1.13543
      0.509235 +          0 =   0.509235
      0.541196 +   0.785398 =    1.32659
      0.192425 +     1.5708 =    1.76322
      0.383086 +    2.35619 =    2.73928
      0.563632 +    3.14159 =    3.70522
             0 +    3.92699 =    3.92699
      0.716499 +    4.71239 =    5.42889
      0.135435 +          1 =    1.13543
      0.509235 +    5.49779 =    6.00702
      0.541196 +          0 =   0.541196
      0.192425 +   0.785398 =   0.977823
      0.383086 +     1.5708 =    1.95388
      0.563632 +    2.35619 =    2.91983
             0 +    3.14159 =    3.14159
          0.99 +    3.92699 =    4.91699
      0.245671 +          0 =   0.245671
     0.0562966 +    5.49779 =    5.55408
      0.991528 +          0 =   0.991528
      0.479954 +   0.785398 =    1.26535
      0.973097 +     1.5708 =    2.54389
        0.7984 +    2.35619 =    3.15459
     0.0669125 +    3.14159 =    3.20851
             1 +    3.92699 =    4.92699
      0.245671 +          0 =   0.245671
     0.0562966 +          0 =  0.0562966
      0.991528 +   0.785398 =    1.77693
      0.479954 +     1.5708 =    2.05075
      0.973097 +    2.35619 =    3.32929
        0.7984 +    3.14159 =    3.93999
     0.0669125 +    3.92699 =     3.9939
             1 +    4.71239 =    5.71239
           0.1 +          1 =        1.1
      0.716499 +          0 =   0.716499
      0.135435 +   0.785398 =   0.920833
      0.509235 +     1.5708 =    2.08003
      0.541196 +    2.35619 =    2.89739
      0.192425 +    3.14159 =    3.33402
      0.383086 +    3.92699 =    4.31008
      0.563632 +    4.71239 =    5.27602
             0 +          1 =          1
      0.716499 +    5.49779 =    6.21429
      0.135435 +          0 =   0.135435
      0.509235 +   0.785398 =    1.29463
      0.541196 +     1.5708 =    2.11199
      0.192425 +    2.35619 =    2.54862
      0.383086 +    3.14159 =    3.52468
      0.563632 +    3.92699 =    4.49062
             0 +          0 =          0
          0.99 +    5.49779 =    6.48779
      0.245671 +          0 =   0.245671
     0.0562966 +   0.785398 =   0.841695
      0.991528 +     1.5708 =    2.56232
      0.479954 +    2.35619 =    2.83615
      0.973097 +    3.14159 =    4.11469
        0.7984 +    3.92699 =    4.72539
     0.0669125 +          0 =  0.0669125
             1 +          0 =          1
      0.245671 +   0.785398 =    1.03107
     0.0562966 +     1.5708 =    1.62709
      0.991528 +    2.35619 =    3.34772
      0.479954 +    3.14159 =    3.62155
      0.973097 +    3.92699 =    4.90009
        0.7984 +    4.71239 =    5.51079
     0.0669125 +          1 =    1.06691
             1 +          0 =          1
           0.1 +   0.785398 =   0.885398
      0.716499 +     1.5708 =     2.2873
      0.135435 +    2.35619 =    2.49163
      0.509235 +    3.14159 =    3.65083
      0.541196 +    3.92699 =    4.46819
      0.192425 +    4.71239 =    4.90481
      0.383086 +          1 =    1.38309
      0.563632 +    5.49779 =    6.06142
             0 +          0 =          0
      0.716499 +   0.785398 =     1.5019
      0.135435 +     1.5708 =    1.70623
      0.509235 +    2.35619 =    2.86543
      0.541196 +    3.14159 =    3.68279
      0.192425 +    3.92699 =    4.11942
      0.383086 +          0 =   0.383086
      0.563632 +    5.49779 =    6.06142
             0 +          0 =          0
          0.99 +   0.785398 =     1.7754
      0.245671 +     1.5708 =    1.81647
     0.0562966 +    2.35619 =    2.41249
      0.991528 +    3.14159 =    4.13312
      0.479954 +    3.92699 =    4.40694
      0.973097 +          0 =   0.973097
        0.7984 +          0 =     0.7984
     0.0669125 +   0.785398 =   0.852311
             1 +     1.5708 =     2.5708
      0.245671 +    2.35619 =    2.60187
     0.0562966 +    3.14159 =    3.19789
      0.991528 +    3.92699 =    4.91852
      0.479954 +    4.71239 =    5.19234
      0.973097 +          1 =     1.9731
        0.7984 +          0 =     0.7984
     0.0669125 +   0.785398 =   0.852311
             1 +     1.5708 =     2.5708
           0.1 +    2.35619 =    2.45619
      0.716499 +    3.14159 =    3.85809
      0.135435 +    3.92699 =    4.06243
      0.509235 +    4.71239 =    5.22162
      0.541196 +          1 =     1.5412
      0.192425 +    5.49779 =    5.69021
      0.383086 +          0 =   0.383086
      0.563632 +   0.785398 =    1.34903
             0 +     1.5708 =     1.5708
      0.716499 +    2.35619 =    3.07269
      0.135435 +    3.14159 =    3.27703
      0.509235 +    3.92699 =    4.43623
      0.541196 +          0 =   0.541196
      0.192425 +    5.49779 =    5.69021
      0.383086 +          0 =   0.383086
      0.563632 +   0.785398 =    1.34903
             0 +     1.5708 =     1.5708
          0.99 +    2.35619 =    3.34619
      0.245671 +    3.14159 =    3.38726
     0.0562966 +    3.92699 =    3.98329
      0.991528 +          0 =   0.991528
      0.479954 +          0 =   0.479954
      0.973097 +   0.785398 =    1.75849
        0.7984 +     1.5708 =     2.3692
     0.0669125 +    2.35619 =    2.42311
             1 +    3.14159 =    4.14159
      0.245671 +    3.92699 =    4.17266
     0.0562966 +    4.71239 =    4.76869
      0.991528 +          1 =    1.99153
      0.479954 +          0 =   0.479954
      0.973097 +   0.785398 =    1.75849
        0.7984 +     1.5708 =     2.3692
     0.0669125 +    2.35619 =    2.42311
             1 +    3.14159 =    4.14159
           0.1 +    3.92699 =    4.02699
      0.716499 +    4.71239 =    5.42889
      0.135435 +          1 =    1.13543
      0.509235 +    5.49779 =    6.00702
      0.541196 +          0 =   0.541196
      0.192425 +   0.785398 =   0.977823
      0.383086 +     1.5708 =    1.95388
      0.563632 +    2.35619 =    2.91983
             0 +    3.14159 =    3.14159
      0.716499 +    3.92699 =    4.64349
      0.135435 +          0 =   0.135435
      0.509235 +    5.49779 =    6.00702
      0.541196 +          0 =   0.541196
      0.192425 +   0.785398 =   0.977823
      0.383086 +     1.5708 =    1.95388
      0.563632 +    2.35619 =    2.91983
             0 +    3.14159 =    3.14159
          0.99 +    3.92699 =    4.91699
      0.245671 +          0 =   0.245671
    

    I hope this resolves your query.

    Regards,
    Sivadeep