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.

  • Resolved

RTOS/66AK2H14: how to use both the hyperlink ports at once

Part Number: 66AK2H14

Tool/software: TI-RTOS

Hi,

In our board we have 3 processor ,out of which 1 is configured as Centralized Processor (Called CP henceforth) and 2 Distributing Processors (Called DP henceforth). we need to send data from DP to CP through hyperlink .

So I need both the hyperlink interfaces to be operated at a time, with full 10Gbps data-rate.

our hardware engineer confirmed about this with forum , i have attached the link here.e2e.ti.com/.../600664

My question is how to achieve this in software?

Whether I need to simply copy the code for PORT 0 and PORT 1 or there is any other way to do this?

Thank you,

Mahima Shanbag

  • We're looking into this.

     


     Please make sure you read the forum guidelines first.

  • Mahima,

    Yes, you can reuse the code from Hyperlink0 to Hyperlink1. You can work with below documents and links:

    www.ti.com/.../66ak2h14.pdf
    www.ti.com/.../sprugw8c.pdf

    processors.wiki.ti.com/.../Processor_SDK_RTOS_HYPLNK

    e2e.ti.com/.../694012


    Regards,
    Pavel



  • In reply to Pavel Botev:

    Hi Pavel,
    Thanks for your suggestion .
    My question was how to make both hyperlinks[PORT0 and PORT 1] works at a time.
    As I said we have 3 66ak2h14 processors ,out of which 1 is configured as Centralized Processor (Called CP henceforth) and 2 Distributing Processors (Called DP henceforth). we need to send data from DP to CP through hyperlink .
    DP1 and CP are connected through HYPLNK PORT0
    DP2 and CP are connected through HYPLNK PORT1.
    we need to send data from DP1 and DP2 to CP at a time .
    So we need both the ports work at a time.

    1.How to achieve this in software?
    2. Whether I need to copy the required function or there is any other way to do this?

    Regards,
    Mahima Shanbag
  • In reply to mahima shanbag:

    Mahima,

    mahima shanbag
    My question was how to make both hyperlinks[PORT0 and PORT 1] works at a time.

    mahima shanbag
    So we need both the ports work at a time.

    mahima shanbag
    1.How to achieve this in software?

    The hyplnk example that is coming with K2H PDK is using port 0 (hyperlink0) or port 1 (hyperlink1). You need to modify that example to use both ports.

    pdk_k2hk_4_0_9/packages/ti/drv/hyplnk/example/common/

    pdk_k2hk_4_0_9/packages/ti/drv/hyplnk/example/memoryMappedExample/

    mahima shanbag
    2. Whether I need to copy the required function

    Yes, you can dump hyperlink0 (port 0) settings (like registers values, pins configuration, interrupt configuration) and apply these to hyperlink1.

    mahima shanbag
    or there is any other way to do this?

    I am not aware of other way than reusing the PDK hyperlink example

    Regards,
    Pavel



  • In reply to Pavel Botev:

    Hi,

    I was trying to modify the PDK HYPLNK example to use both ports.
    I thought of creating two threads and configuring each ports.
    nt main(void)
    {
    // , *dataBufPtr_1;
    Board_initCfg boardCfg;
    int threadArg = 1;
    pthread_attr_t attr;
    boardCfg = BOARD_INIT_PINMUX_CONFIG |
    BOARD_INIT_MODULE_CLOCK |
    BOARD_INIT_UART_STDIO;
    Board_init(boardCfg);

    pthread_attr_init(&attr);
    pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
    if(pthread_create(&port0_thread, &attr , (ThreadFxn)hyplnk_port0, (void *)threadArg))
    {
    UART_printf("Error creating thread\n");
    return 1;

    }
    if(pthread_create(&port1_thread, &attr,(ThreadFxn) hyplnk_port1 ,(void *)threadArg))
    {
    UART_printf("Error creating thread\n");
    return 1;
    }


    pthread_join(port0_thread,NULL);
    pthread_join(port1_thread,NULL);
    return 0;


    }
    But
    1. one thread is created successfully but for second thread it was giving ENOMEM error.

    How to solve this error?

    2.I commented the second thread and tried with only one thread.
    But for pthread_join I was getting below assertion:
    ti.sysbios.knl.Semaphore: line 202: assertion failure: A_badContext: bad calling context. Must be called from a Task.

    Please help me to solve these errors.
    Regards,
    Mahima Shanbag
  • In reply to mahima shanbag:

    Hi
    I was trying to implement Hyperlink_PORT0 and Hyperlink_PORT1 in separate thread so that I can make both the ports works simultaneously.
    But creating multiple thread didn't make any difference . only one thread was running at a time.

    1.How to make both the threads work simultaneosly in 66AK2H14?

    2.whether I can run Hyperlink_Port0 in one DSP core and Hyperlink_Port1 in another DSP core?if so how to do that?
    Because I tested by flashing the Hyperlink_Port0 application into DSP core 0 and Hyperlink_Port1 application into DSP core 1 as
    MulticoreImageGen.exe LE 55 hyplnk_app 5 hyplnk0_rprc 6 hyplnk1_rprc .
    But when I change the boot mode to SPI It got stuked at
    jumping to user application......

    I think I missed something.

    Please help me with this.

    Thanks and Regards,
    Mahima Shanbag
  • In reply to mahima shanbag:

    Hi,

    Just wanted to let you know that Pavel is OoO, but your issue is being looked at.

    Best Regards,
    Yordan

     


     Please make sure you read the forum guidelines first.

  • In reply to Yordan Kovachev:

    Hi,

    For the DP, you can use one DSP core. For the CP, you have two Hyperlink ports each connected to a DP. If you only have one DSP core in use, and use two tasks, at any given time point, only one task is running. I'm not sure your real-time data move requirement. Do you have Hyperlink data flow continuously for each port, and you can't have any delay? Or you can have port 0 moving data, some delay, switching to port 1, back and forth?

    If you have determined that you must have two flows at the same time for time critical requirement. Then, you can use two DSP cores in CP, one for each Hyperlink port. Before you jump to bootloader, are you able to develop software loading via CCS/JTAG and proven working for two-core case?

    Regards, Eric
  • In reply to lding:

    Hi Eric,

    I was trying to run the Hyplnk_PORT0 example in CP using Jtag in DSP core 1 with DP1(flashed Hyplnk_PORT0 application to DSP core0).

    Link was up and it was about to read write but data transfer failed .

    I thought this was due to ,

    Hyplnk_PORT0  example  running in DP1 was flashed to  DSP core 0 and in CP it is in DSP core 1.

    So I tried flashing the Hyplnk_PORT0  example to DSP core 1 of DP1 instead of DSP core 0.

    MulticoreImageGen.exe LE 55 hyplnk_app 6 hyplnk1_rprc .

    But when I change the boot mode it got stucked at

    jumping to user application......


    Now my question is

    1. Whether my assumption about the data transfer failure ( due to Hyplnk_PORT0  example  running in DP1 was flashed to  DSP core 0 and in CP it was in DSP core 1.) is correct?

    2. How to flash the application into DSP core 1  instead of DSP core 0?

    Please help me with this.

    Thanks and Regards,

    Mahima Shanbag

  • In reply to mahima shanbag:

    Hi,

    All the Hyperlink driver examples are tested on core 0 of the DSP. If you both use Hyperlink port 0, but one side use DSP core 0 and the other side use DSP core 1, there may be some test buffer allocate issues, you need to check code. At least you have the link coming up so the initialization of hyperlink is working. Suggesting you first use JTAG to load the code to both core 1 to debug and make sure it working then moving to a bootable media.

    Regards, Eric

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.