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.

Linux/DRA745: porting TIDL to DRA75x

Part Number: DRA745
Other Parts Discussed in Thread: SYSBIOS

Tool/software: Linux

hardware: VAYU EVM XC5777X REV H
software: ti-processor-sdk-linux-automotive-dra7xx-evm-03_04_00_03
PDK: pdk_dra7xx_1_0_10

I am porting TIDL to DRA7xx on Linux Automotive SDK.
I aleray update opencl to 1.1.17.1
but TIDL is no work.

root@dra7xx-evm:/usr/share/ti/tidl/examples/test# /usr/share/ti/examples/opencl/platforms/platforms
PLATFORM: TI AM57x
Version: OpenCL 1.1 TI product version 01.01.17.01 (Mar 21 2019 14:12:41)
Vendor : Texas Instruments, Inc.
Profile: FULL_PROFILE
DEVICE: TI Multicore C66 DSP
Type : ACCELERATOR
CompUnits : 2
Frequency : 0.75 GHz
Glb Mem : 163840 KB
GlbExt1 Mem: 0 KB
GlbExt2 Mem: 0 KB
Msmc Mem : 1024 KB
Loc Mem : 128 KB
Max Alloc : 147456 KB

root@dra7xx-evm:/usr/share/ti/examples/opencl/vecadd# ./vecadd
DEVICE: TI Multicore C66 DSP

Offloading vector addition of 8192K elements...

Kernel Exec : Queue to Submit: 11 us
Kernel Exec : Submit to Start : 63 us
Kernel Exec : Start to End : 25051 us

Success!

root@dra7xx-evm:/proc# cat cmem

Block 0: Pool 0: 1 bufs size 0xc000000 (0xc000000 requested)

Pool 0 busy bufs:
id 0: phys addr 0xa0000000 (cached)

Pool 0 free bufs:


root@dra7xx-evm:/usr/share/ti/tidl/examples/test# ./test_tidl
[ 1522.327450] omap_hwmod: mmu0_dsp2: _wait_target_disable failed
[ 1522.333351] omap-iommu 41501000.mmu: 41501000.mmu: version 3.0
[ 1522.358976] omap_hwmod: mmu0_dsp1: _wait_target_disable failed
[ 1522.364869] omap-iommu 40d01000.mmu: 40d01000.mmu: version 3.0
[ 1522.370894] omap-iommu 40d02000.mmu: 40d02000.mmu: version 3.0
Running dense_1x1 on 2 devices, type DSP
[ 1533.000910] omap_hwmod: mmu1_dsp2: _wait_target_disable failed
[ 1533.014979] omap_hwmod: mmu0_dsp2: _wait_target_disable failed

Test application test_tidl block here! dsp aleardy crash!!!!!!


root@dra7xx-evm:/usr/share/ti/tidl/examples/test#
root@dra7xx-evm:/usr/share/ti/tidl/examples/test# cat /sys/kernel/debug/remoteproc/remoteproc2/trace0
[ 0.000] 20 Resource entries at 0xfeb00000
[ 0.000] registering rpmsg-proto:rpmsg-proto service on 61 with HOST
[ 61.600] A0=0x28 A1=0x0
[ 61.600] A2=0xa2a74620 A3=0x17
[ 61.600] A4=0x0 A5=0x7d3
[ 61.600] A6=0xa2174580 A7=0x0
[ 61.600] A8=0x7d3 A9=0xfffffff8
[ 61.600] A10=0x802ab0 A11=0x0
[ 61.600] A12=0x0 A13=0x0
[ 61.600] A14=0x28 A15=0x8050a8
[ 61.600] A16=0x7d2 A17=0x802715
[ 61.600] A18=0x2e A19=0xfef0cce8
[ 61.600] A20=0x0 A21=0xfef0cce8
[ 61.600] A22=0xfef00000 A23=0xfef0cce8
[ 61.600] A24=0xfef0cce8 A25=0xd89c873c
[ 61.600] A26=0xc0800000 A27=0xc0800000
[ 61.600] A28=0x27796f41 A29=0x70
[ 61.600] A30=0x58 A31=0x0
[ 61.600] B0=0x0 B1=0x0
[ 61.600] B2=0x0 B3=0xfed67204
[ 61.600] B4=0xa2076080 B5=0x0
[ 61.600] B6=0xa2174500 B7=0x0
[ 61.600] B8=0xfee95557 B9=0x7eb
[ 61.600] B10=0x1 B11=0x802a90
[ 61.600] B12=0x800044 B13=0xfeefe368
[ 61.600] B14=0x0 B15=0x802780
[ 61.600] B16=0xa B17=0xfef0cce8
[ 61.600] B18=0xfef00000 B19=0xfef0cce8
[ 61.600] B20=0x20 B21=0x0
[ 61.600] B22=0x30 B23=0x0
[ 61.600] B24=0x75e7e9f4 B25=0x54b30310
[ 61.600] B26=0xe31e4504 B27=0x10000
[ 61.600] B28=0x2010 B29=0x0
[ 61.600] B30=0x0 B31=0xfeb0df08
[ 61.600] NTSR=0x1020f
[ 61.600] ITSR=0xf
[ 61.600] IRP=0x805f30
[ 61.600] SSR=0x0
[ 61.600] AMR=0x0
[ 61.600] RILC=0x0
[ 61.600] ILC=0x0
[ 61.600] Exception at 0xfeb0df34
[ 61.600] EFR=0x2 NRP=0xfeb0df34
[ 61.600] Internal exception: IERR=0x88
[ 61.600] Opcode exception
[ 61.600] Loop buffer exception
[ 61.600] [t=0x0014fd16] ti.sysbios.family.c64p.Exception: ERROR: line 256: E_exceptionMax: pc = 0xfeb0df34, sp = 0x00802780.
[ 61.600] ti.sysbios.family.c64p.Exception: line 256: E_exceptionMax: pc = 0xfeb0df34, sp = 0x00802780.
[ 61.600] xdc.runtime.Error.raise: terminating execution
root@dra7xx-evm:/usr/share/ti/tidl/examples/test#

  • TIDL is supported in Vision SDk uses cases. Not integrated with openCL
  • Hi kumar.desappan

    It's a long time that we develop on linux automotive SDK . We want to power up with TIDL on Linux SDK. Could you give me some suggestion?

    Ya Lin
  • Hi,

    We would be supporting TIDL in Procssor SDK Vision (Vision SDK + Linux) case from the next release onwards.

    If you have ccs connectivity, you may want to look at where the DSP has crashed. The PC address is given in the logs along with SP information.

    Thanks and Regards,
    Piyali
  • Hi Ya Lin,

       If you have updated OpenCL on your system, you need to recompile the TIDL-API library and examples (this restriction will be removed in later OpenCL/TIDL-API releases).

    - Yuan

    root@am57xx-evm:~# cd /usr/share/ti/tidl/tidl_api/
    root@am57xx-evm:/usr/share/ti/tidl/tidl_api# make clean; make
    ... ...
    root@am57xx-evm:/usr/share/ti/tidl/tidl_api# cd ../examples/
    root@am57xx-evm:/usr/share/ti/tidl/examples# make clean; make
    ... ...
    

  • Hi Piyali

    Will the new version be released in the first half of this year?
    I have been recompile the TIDL Library and example.

    Bellow is the PC and SP information:
    pc = 0xfeb0df34, sp = 0x00802780.

    It's crash in function dsp_rpc() on monitor.c
    This function is in ocl_tidl_dsp.lib
    , but I am not able to find the source code.

    Ya Lin
  • Hi Ya Lin,

        There are two possible causes for the OpenCL monitor crash in your case:

    Cause 1: Installed firmware and installed OpenCL DSP library get out of sync.  Since you updated OpenCL to 1.1.17.01 by yourself, please verify the updated OpenCL on your system.  Check that VER/SHA symbols match up.  Make sure all shipped OpenCL examples run correctly.

    oot@am57xx-evm:~# readelf -s /lib/firmware/dra7-dsp1-fw.xe66 | grep OCL_BUILD
    123692: 01011701     0 NOTYPE  GLOBAL PROTECTED  ABS __OCL_BUILD_VER
    123693: 61d9dbae     0 NOTYPE  GLOBAL PROTECTED  ABS __OCL_BUILD_SHA
    123694: 20181219     0 NOTYPE  GLOBAL PROTECTED  ABS __OCL_BUILD_DATE
    123695: 00032819     0 NOTYPE  GLOBAL PROTECTED  ABS __OCL_BUILD_TIME
    root@am57xx-evm:~# readelf -s /lib/firmware/dra7-dsp2-fw.xe66 | grep OCL_BUILD
    123692: 01011701     0 NOTYPE  GLOBAL PROTECTED  ABS __OCL_BUILD_VER
    123693: 61d9dbae     0 NOTYPE  GLOBAL PROTECTED  ABS __OCL_BUILD_SHA
    123694: 20181219     0 NOTYPE  GLOBAL PROTECTED  ABS __OCL_BUILD_DATE
    123695: 00032819     0 NOTYPE  GLOBAL PROTECTED  ABS __OCL_BUILD_TIME
    root@am57xx-evm:~# readelf -s /usr/share/ti/opencl/dsp_syms.obj | grep OCL_BUILD
      3522: 61d9dbae     0 NOTYPE  WEAK   HIDDEN   ABS __OCL_BUILD_SHA
      5262: 00032819     0 NOTYPE  WEAK   HIDDEN   ABS __OCL_BUILD_TIME
      7441: 20181219     0 NOTYPE  WEAK   HIDDEN   ABS __OCL_BUILD_DATE
      8297: 01011701     0 NOTYPE  WEAK   HIDDEN   ABS __OCL_BUILD_VER
    root@am57xx-evm:~# cd /usr/share/ti/examples/opencl
    root@am57xx-evm:/usr/share/ti/examples/opencl# make test EXAMPLE_SET=EXCLUDE_PERSISTENT
    ===============  platforms  =================
    Compiling main.cpp
    Running platforms
    ===============  ccode  =================
    Compiling main.cpp
    Compiling ccode.c
    Running ccode
    ===============  offline  =================
    ... ...

    Cause 2: TIDL-API and OpenCL get out of sync.  For OpenCL 1.1.17.01, the corrsponding TIDL-API version should be v1.2.2.  If you have different version, you can clone the repo and check out the corresponding tag.  Recompile TIDL-API library and examples.  Run the examples to verify that they work correctly.

    root@am57xx-evm:~# grep _VER /usr/share/ti/tidl/tidl_api/make.buildid
    
    http://downloads.ti.com/mctools/esd/docs/opencl/readme/index.html
    http://downloads.ti.com/mctools/esd/docs/tidl-api/changelog.html
    http://git.ti.com/tidl/tidl-api

        Hope this helps.

    - Yuan

  • Hi Yuan

    What is the minimum requirement for the ti-ipc version?
    My current version is 3.47.

    Ya lIn
  • Hi Ya Lin,

    I don't know the MINIMUM requirement. Usually, we use a specific Processor SDK version to keep various components in sync. For OpenCL 1.1.17.01 and TIDL-API 1.2.2, they were built and shipped with PSDK Linux 5.2.0.10. The ti-ipc version in PSDK 5.2.0.10 is 3.50.03.04-r0.2.0.
    software-dl.ti.com/.../index_FDS.html
    software-dl.ti.com/.../software_manifest.htm

    - Yuan