Davinci软件架构——servers

来源:互联网 发布:出库软件 编辑:程序博客网 时间:2024/05/16 00:58

 

再看servers:

        jerry@jerry-laptop:~/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文件夹下生成两个文件:

jerry@jerry-laptop:~/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

原创粉丝点击