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.

6678多核编程问题

Other Parts Discussed in Thread: SYSBIOS

大家好!

我打算用6678的EVM做多核编程,看了TI提供的image processing的例程,但是没有太搞清楚它是怎么运作的。相关文件夹里有好几个.C文件,我主要看了mcip_master_main.C和mcip_slave_main.C文件,因为我觉得这两个main应该是主程序入口。但是二者里面的main函数都很简单,并没有sending or receiving message,也没有调用image processing的函数。mcip_master_main.C中的main函数如下:

/*
 *Main Entry Point
 */
int main(void)
{
    /*
     *  Ipc_start() calls Ipc_attach() to synchronize all remote processors
     *  because 'Ipc.procSync' is set to 'Ipc.ProcSync_ALL' in *.cfg
     */
    Ipc_start();

    /* Start the BIOS 6 Scheduler */
    BIOS_start ();
    return 1;
}

mcip_slave_main.C中的main函数如下:

/*
 *Main Entry Point
 */
int main()
{
    UInt16 core_id = (UInt16) DNUM;

    MultiProc_setLocalId(core_id);
    /* 
     *  Ipc_start() calls Ipc_attach() to synchronize all remote processors
     *  because 'Ipc.procSync' is set to 'Ipc.ProcSync_ALL' in *.cfg
     */
    Ipc_start();
    /* Start the BIOS 6 Scheduler */  
 BIOS_start ();
}

两个main函数里都只有ipc_start()函数和BIOS_start()函数。我想知道master core控制slave core,它们之间的通讯是在程序的哪部分体现的,还有是如何调用image processing函数的。

在下编程方面比较弱,恳请大牛们指点,不胜感谢!

  • 您好,

    image process demo是基于sysbios,在cfg文件中静态创建了task,master程序load到core0,slave程序load到其他7个core,运行起来后,core0会自动运行到任务master_main,而其他core则会进入任务slave_main,然后才是真正的处理。关于该demo的具体细节可以参考下述链接。

    processors.wiki.ti.com/.../MCSDK_Image_Processing_Demonstration_Guide

  • 您好,

    请问是否有讲sysbios的文档?另外是否一定需要按照demo的方式做主从模式的多核编程?是否有比较简单的例程说明多核编程的问题?

    谢谢!

  • 您好,

    请问在用master-slave模式时,各核要load的程序是放在一个project中吗?

    另外,demo中的image_processing例程是只并行运行一次,而我的application是一个迭代计算问题,需要并行执行多次,这样要保证每次执行都能同步,是不是就需要我自己设计同步措施,比如用flag标志?还有一个想法,就是每次执行都重新建立Message_Q,这样保证每一次都是同步的,但是这会不会很耗时间?

    谢谢!

  • sysBios手册及多核编程等手册在下述链接下载。

    www.ti.com/.../tms320c6678

    关于多核编程,没有一个固定的模式,例子中的模式只是一个demo,可以根据特定的应用设计相应的多核模式。

  • 你好,

    我开始仿照image processing的例程编程,编译出现如下错误:

    #10251: ("xdc.meta:multi_master_pe66.oe66") INTERNAL ERROR: C:\Program Files\Texas Instruments\ccsv5\tools\compiler\c6000\bin\lnk6x.exe aborted This is a serious problem.  Please contact Customer Support with this message and a copy of the input file and help us to continue to make the tools more robust.

    Linking failed. Check the Console window for details.

    no valid memory range(NULL) available for placement of ".cinit"

    no valid memory range(NULL) available for placement of ".const"

    no valid memory range(NULL) available for placement of ".far:NDK_OBJMEM"

    no valid memory range(NULL) available for placement of ".far:NDK_PACKETMEM"

    no valid memory range(NULL) available for placement of ".switch"

    no valid memory range(NULL) available for placement of ".text"

    no valid memory range(NULL) available for placement of ".vecs"

    placement fails for object ".cinit", size 0x21a6 (page 0) res_mgr_init_qmss       ./master.obj slave_main              C:\Documents and Settings\Administrator\workspace\multi_master\Debug\configPkg\package\cfg\multi_master_pe66.oe66

    placement fails for object ".const", size 0x633c (page 0)

    placement fails for object ".switch", size 0x230 (page 0)

    placement fails for object ".text", size 0x5fb40 (page 0)

    placement fails for object ".vecs", size 0x200 (page 0)

    placement fails for object "xdc.meta", size 0x128 (page 0)

    run placement fails for object ".far:NDK_OBJMEM", size 0x600 (page 0)

    run placement fails for object ".far:NDK_PACKETMEM", size 0x52b00 (page 0)

    unresolved symbol Osal_platformFree, first referenced in C:\Program

    unresolved symbol Osal_platformMalloc, first referenced in C:\Program

    unresolved symbol Osal_platformSpiCsEnter, first referenced in C:\Program

    unresolved symbol Osal_platformSpiCsExit, first referenced in C:\Program

    unresolved symbol Please, first referenced in contact

    unresolved symbol res_mgr_init_cppi, first referenced in ./master.obj

    unresolved symbol res_mgr_init_pass, first referenced in ./master.obj

    unresolved symbol This, first referenced in application

    请问出现上述问题是什么原因?是否都是CFG文件的问题?谢谢!