Post Go back to editing

adsp-21565 insufficient memory is indicated when integrating third-party algorithms

Category: Software
Product Number: ADSP-21565

Hi,I use the ad21565 chip ,I added a third-party algorithm component in sigmastudio. After adding it, I saw ss buffer 5 increased to 113kb in the compilation information of sigmastudio. At this time, I exported uc data, added it to the CCES project, and recompiled schematic. It is found that sigmastudio compilation information indicates that “Allocation failed! Insufficient memory”.
A lookup shows that the SMAP Block corresponding to ss buffer 5 is Block2_L1_space, and a check of app.ldf confirms that Block2_L1 is 128kb in size, so there are a few questions
1.The size of Block2_L1 is larger than ss buffer 5, why does it prompt out of memory? How to solve this problem
2. I tried to change the Block2_L1 size in app.ldf file, "Invalid memory range and/or width for memory 'mem_block2_bw' Block outside defined memory regions", Block2_L1 is fixed to 128kb and cannot be changed?
3. Similar to the second question, can I freely allocate the memory size of each Block in L1? Are there any restrictions on allocation?

Thread Notes

Parents
  • Hi, could you please confirm are you using SigmaStudio or SigmaStudio+?

  • Thank you. The SigmaStudio for SHARC memory block allocations are taking place in the file "adi_ss_app.ldf" which is included in "app.ldf". You can change the SS4G_block2 with other physical memory block to "mem_block0_bw" or "mem_block1_bw" for adjusting the memory block to fit for your parameter memory requirement. For example,

    /*
    ** SigmaStudio for Griffin application linker description file for GMAP
    */


    /* Default for SSn code */
    SS4G_block0
    {
    RESERVE(_Block0_L1_space, _Block0_L1_space_length = 2, 2)
    RESERVE_EXPAND(_Block0_L1_space, _Block0_L1_space_length, 0, 2)
    } > mem_block0_bw

    /* Default for SSn data */
    SS4G_block1
    {
    RESERVE(_Block1_L1_space, _Block1_L1_space_length = 2, 2)
    RESERVE_EXPAND(_Block1_L1_space, _Block1_L1_space_length, 0, 2)
    } > mem_block2_bw

    /* Default for SSn parameter */
    SS4G_block2
    {
    RESERVE(_Block2_L1_space, _Block2_L1_space_length = 8, 8)
    RESERVE_EXPAND(_Block2_L1_space, _Block2_L1_space_length, 0, 8)
    } > mem_block1_bw

    SigmaStudio internal framework also will reserve some additional memory which wont shown in the Memory information of SigmaStudio project compilation. So try changing the memory blocks as shown. If parameters not fit with any other memory blocks, then you need change the 3 rd party algorithm to use application allocated memory in the algorithm(applicabale if algorithm have read only data like coefficients), since the parameter data can't be split to different memory blocks. 

    Thanks.

Reply
  • Thank you. The SigmaStudio for SHARC memory block allocations are taking place in the file "adi_ss_app.ldf" which is included in "app.ldf". You can change the SS4G_block2 with other physical memory block to "mem_block0_bw" or "mem_block1_bw" for adjusting the memory block to fit for your parameter memory requirement. For example,

    /*
    ** SigmaStudio for Griffin application linker description file for GMAP
    */


    /* Default for SSn code */
    SS4G_block0
    {
    RESERVE(_Block0_L1_space, _Block0_L1_space_length = 2, 2)
    RESERVE_EXPAND(_Block0_L1_space, _Block0_L1_space_length, 0, 2)
    } > mem_block0_bw

    /* Default for SSn data */
    SS4G_block1
    {
    RESERVE(_Block1_L1_space, _Block1_L1_space_length = 2, 2)
    RESERVE_EXPAND(_Block1_L1_space, _Block1_L1_space_length, 0, 2)
    } > mem_block2_bw

    /* Default for SSn parameter */
    SS4G_block2
    {
    RESERVE(_Block2_L1_space, _Block2_L1_space_length = 8, 8)
    RESERVE_EXPAND(_Block2_L1_space, _Block2_L1_space_length, 0, 8)
    } > mem_block1_bw

    SigmaStudio internal framework also will reserve some additional memory which wont shown in the Memory information of SigmaStudio project compilation. So try changing the memory blocks as shown. If parameters not fit with any other memory blocks, then you need change the 3 rd party algorithm to use application allocated memory in the algorithm(applicabale if algorithm have read only data like coefficients), since the parameter data can't be split to different memory blocks. 

    Thanks.

Children