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: [TIDL] Meet an issue "TIDL_VISION_FXNS.ialg.algAlloc = -89"

Part Number: TDA4VM

Hello There,

Recently i am trying to integrated TIDL in my won project. During the unit test, i found error log "TIDL_VISION_FXNS.ialg.algAlloc = -89". My method is :

Method 1. Use the Net and IO file which generated with import tool run the TIDL test with "TI_DEVICE_dsp_test_dl_algo.out" in TDA4 EVM board. Test is OK.

Method 2. Use the Net and IO file in method 1. run the test with my won test binary. and found the error log;

i have compared both method's net-file, io-file, createParams in CCS. They are same.

Also i have set debugTraceLevel = 1, 2, 3,  but nothing displayed in CCS Console.

I believe there are something wrong in my project. Could you please provide the error definition of ".ialg.algAlloc" to quicken the debug progress.

Thanks a lot!

Best Regards,

Samuel

  • Another information is Method 2 is running in TI-RTOS.

    Best Regards,

    Samuel

  • TI supports only TI provided standalone application to run the generated .bin and .IO file. For running with TI-RTOS, please refer to SDK documentation on how to integrate TIDL models with vx_apps

    - Subhajit

  • Hi Subhajit,

    I generated .bin and .io file with TIDL import tool and passed validation with TIDL testVecs. For running C71x in TI-RTOS, you means TIDL model only can work with IT-OpenVX?

    Best Regards,

    Samuel  

  • Samuel,

    You can run your custom network as well but with slight changes in the memory map. Looks like your network needs more memory than what is partitioned in the system. We will be fixing this in the next release to allow customers run larger networks but if you are on 6.1.1 PSDKRA you will need to follow something like what is mentioned in this post.

    Download PSDKRA 6.1.1.12 and PSDKLA 6.1.1.2 from the below link,

    www.ti.com/.../PROCESSOR-SDK-DRA8X-TDA4X

    For changing the memory map and allocate more memory to C7x heap/scratch follow these NEW steps.

        Under ti-processor-sdk-linux-automotive-j7-evm-06_01_01_02/ make sure you have run setup.sh
        Navigate to ti-processor-sdk-linux-automotive-j7-evm-06_01_01_02/board-support/linux-4.19.73+gitAUTOINC+0cabba2b47-g0cabba2b47/arch/arm64/boot/dts/ti and open file k3-j721e-vision-apps.dtso
        Got reserved_memory section and modify as below,

    &reserved_memory {
        #address-cells = <2>;
        #size-cells = <2>;

        vision_apps_memory_region: vision_apps-dma-memory@b8000000 {
            compatible = "shared-dma-pool";
            reg = <0x00 0xb8000000 0x00 0x02000000>;
            no-map;
        };

        vision_apps_shared_region: vision_apps_shared-memories@bc000000 {
            compatible = "shared-dma-pool";
            reg = <0x00 0xbc000000 0x00 0x10000000>;
        };

        vision_apps_shared_region_1: vision_apps_shared-memories_1@cc000000 {
            compatible = "shared-dma-pool";
            reg = <0x00 0xcc000000 0x00 0x14000000>;
        };
    };
    This will effectively reduce vision_apps_shared-memories and carve out space for a new C7x heap/scratch. Effectively the shared-memories will be reduced to 256MB and 320MB will be set aside as C7x heap/scratch.

        Now navigate back to ti-processor-sdk-linux-automotive-j7-evm-06_01_01_02/ and build the new k3-j721e-vision-apps.dtbo by doing
        ti-processor-sdk-linux-automotive-j7-evm-06_01_01_02 > make linux-dtbs
        Upon successful build, copy the newly generated k3-j721e-vision-apps.dtbo and replace the existing one on SD card rootfs/boot/ folder
        Navigate to psdk_rtos_auto_j7_06_01_01_12/vision_apps/apps/basic_demos/app_tirtos/tirtos_linux/c7x_1 and update the linker_mem_map.cmd to add new C7X_SCRATCH_MEM section as shown below and reduce the DDR_SHARED_MEM as shown below

        /* Memory for shared memory buffers in DDR [ size 256.00 MB ] */
        DDR_SHARED_MEM                    : ORIGIN = 0xBC000000 , LENGTH = 0x10000000
        /* Memory for C7x heap/scratch buffers in DDR [ size 320.00 MB ] */
        C7X_SCRATCH_MEM                   : ORIGIN = 0xCC000000 , LENGTH = 0x14000000

        Update the linker.cmd in the same directory to point to the newly created section as shown below

        .bss:ddr_shared_mem     (NOLOAD) : {} > C7X_SCRATCH_MEM
        .bss:ddr_scratch_mem    (NOLOAD) : {} > C7X_SCRATCH_MEM

        Navigate to psdk_rtos_auto_j7_06_01_01_12/vision_apps/apps/basic_demos/app_tirtos/common and in the file app_cfg_c7x_1.h update the sized of the below macros

    #define DDR_HEAP_MEM_SIZE     ((256)*0x100000u) //earlier 80MB
    #define DDR_SCRATCH_SIZE      ((48)*0x100000u) // earlier 16MB
     
    Now build the vision_apps and transfer the binaries to SD card as per standard steps.
    To confirm the changes have taken effect, while linux boots the newly carved out section should appear in the beginning of boot log.
    [    0.000000] OF: reserved mem: initialized node vision_apps-dma-memory@b8000000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created DMA memory pool at 0x00000000bc000000, size 256 MiB
    [    0.000000] OF: reserved mem: initialized node vision_apps_shared-memories@bc000000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created DMA memory pool at 0x00000000cc000000, size 320 MiB
    [    0.000000] OF: reserved mem: initialized node vision_apps_shared-memories_1@cc000000, compatible id shared-dma-pool
     
    Login and run the vision_apps_init
    /opt/vision_apps> ./vision_apps_init.sh
     
    This should execute without any errors and all core IPC handshake is complete
    Run one of the existing AVP/TIDL demos to confirm the changes do not affect the existing demos.
    Next try with your custom model/custom application.


    Regards,
    Shyam

  • Hi Shyam,

    Thanks a lot for the reply! 

    Best Regards,

    Samuel