天天看點

Davinci軟體架構——servers

再看servers:

        [email protected]:~/dvsdk_3_00_01_42/codec_engine_2_24/examples/ti/sdo/ce/examples/servers/all_codecs$ ls

all.cfg          all_evm3530.tci   all_evmDM6446.tci all_evmOMAPL137.tci all.tcf link.cmd makefile package.bld package.xdc

all_evm2530.tci all_evmDM357.tci all_evmDM6467.tci all_sdp3430.tci    bin      main.c    package

❏makefile package.bld,package.xdc和上面沒有本質差別。

        var serverName = "my_server";

//這個要比對.xdc中定義的package name

         Pkg.attrs.profile = "release";

❏Link.cmd是連結配置問價。

❏Bin是編譯後的程式所在的目錄.

❏Package也是編譯過程中的中間中間,比如根據配置生成的all_x64p.c,all_x64p.js

❏main.c是算法執行前要執行的程式.

❏各個平台的DSP/BIOS記憶體配置檔案x.tci.

在這裡大家可以配置DDR,SHRMM,resetvec等記憶體區域的位址和大小:

比如

          all_evm3530.tci 中

     var mem_ext = [

{

    comment:    "DDRALGHEAP: off-chip memory for dynamic algmem allocation",

    name:       "DDRALGHEAP",

    base:       0x86000000,

    len:        0x01800000, // 24 MB

    space:      "code/data"

},

{

    comment:    "DDR2: off-chip memory for application code and data",

    name:       "DDR2",

    base:       0x87800000,

    len:        0x00600000, // 6 MB

    space:      "code/data"

},

{

    comment:    "DSPLINK: off-chip memory reserved for DSPLINK code and data",

    name:       "DSPLINKMEM",

    base:       0x87E00000,

    len:        0x00100000, // 1 MB

    space:      "code/data"

},

{

    comment:    "RESET_VECTOR: off-chip memory for the reset vector table",

    name:       "RESET_VECTOR",

    base:       0x87F00000,

    len:        0x00001000, // 4 KB

    space:      "code/data"

},

{

    comment:    "L4CORE: L4-Core Interconnect Address Space",

    name:       "L4CORE",

    base:       0x48000000,

    len:        0x01000000, // 16 MB

    space:      "data"

},

{

    comment:    "L4PER: L4-Peripheral Interconnect Address Space",

    name:       "L4PER",

    base:       0x49000000,

    len:        0x00100000, // 1 MB

    space:      "data"

},

{

    comment:    "IVA Memory Management Unit",

    name:       "IVAMMU",

    base:       0x5D000000,

    len:        0x00001000, // 4 KB

    space:      "data"

}

];

❏ servername.cfg. The Codec Server configuration script.

這個是伺服器的配置檔案,比如這個算法伺服器會包含哪些算法,其算法線程的堆棧,優先級等屬性.

Server.threadAttrs.stackSize = 4096;

//堆棧

Server.threadAttrs.priority = Server.MINPRI;

//優先級

Server.algs = [

    {name: "viddec_copy", mod: VIDDEC_COPY, threadAttrs: {

        stackMemId: 0, priority: Server.MINPRI + 2}, groupId : 0,

    },

    {name: "videnc_copy", mod: VIDENC_COPY, threadAttrs: {

        stackMemId: 0, priority: Server.MINPRI + 2}, groupId : 0,

    },

    {name: "imgdec_copy", mod: IMGDEC_COPY, threadAttrs: {

        stackMemId: 0, priority: Server.MINPRI + 3}

    },

}

   //包含的算法.         

❏ servername.tcf. The DSP/BIOS configuration script.

上面的all.cfg檔案,

       DSP/BIOS配置檔案,它配置dsp端的作業系統,時鐘頻率,核心,動态堆配置,記憶體塊配置(大小,位置).

主要靜态配置如下方面

❏ The base DSP/BIOS kernel

❏ Memory section names, sizes, and locations

    這個由其包含的一個平台的tci檔案配置,.tci會建立mem_ext變量。

❏ Platform-specific attributes such as clock rates

       平台屬性

時鐘頻率

❏ Enables the task manager and dynamic heap allocation

這個編譯後會在bin檔案夾下生成兩個檔案:

[email protected]:~/dvsdk_3_00_01_42/codec_engine_2_24/examples/ti/sdo/ce/examples/servers/all_codecs$ ls bin/ti_platforms_evm3530/

all_pm.x64P all.x64P

繼續閱讀