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.

HEVC encoder calls mailbox API on not existing mailbox

Hi,

I am trying to run HEVC encoder on multiple DSPs (2 and 3 DSPs mode).


Please see the logs: https://drive.google.com/file/d/0Byw88ezNrM71VjJKanVoLUJ5Rlk/view?usp=sharing

I log keyCreate, shm and mailbox callbacks.

Encoder tries to run mailbox API on non-existing mailbox on slave cores (particularly core 3 of DSP 0 in my logs):

[2015-01-16 14:38:20] Slave encoder #56 initialized
[2015-01-16 14:38:20] shmSync @0c044900 SL2 L @0c045480 LOC_INVALIDATE
[2015-01-16 14:38:20] mailBoxWrite @00848800 s=8 c=1646092981
[2015-01-16 14:38:20] Assertion failed, (mailbox->isSender == 1), file ../Mailbox.c, line 66

Problem is that core 3 was never requested to create\attach mailboxes. Mailboxes are created only on chip masters (i.e. core 0 of each involved DSP).

In single DSP mode HEVC encoder has no this issue.

Regards,

Andrey Lisnevich

  • Hi Andrey,

    Andrey Lisnevich said:

    Problem is that core 3 was never requested to create\attach mailboxes. Mailboxes are created only on chip masters (i.e. core 0 of each involved DSP).

    The mailboxes are created in each chip master and the handle for the mailbox is placed in a shared memory region which is visible to all the cores. Hence there is no need to create additional mailboxes for each core.

    After each mail write into this handle, an interrupt is generated to the chip for which the mail was meant. The recipient chip reads  the mail in an ISR.

    Thanks and Regards,

    Shashikantha 

  • Hi Shashikantha,

    There is no need to create mailboxes on all the cores. They need to connect to this mailbox. Like it is done with other keys:
    shms, swbarrs and locks - keys that also use shared memory for various purposes.

    Why the API treats mailboxes differently?

    I definitely see via API calls that mailbox is used only by userids = [0,8]. userid=3 is not in the list.

    On any core I expect to get only handles in callbacks that were returned by keyCreate callbaks on that core. Also handle is not always address in shared memory and can be even not an address at all.

    Regards,
    Andrey Lisnevich

  • Andrey Lisnevich said:
    Why the API treats mailboxes differently?

    The current TI implementation of the mailbox is a point to point mailbox, ie between two cores. Hence the mailbox is created between two master cores of the chips and is being used by all the cores. 

    Thanks and Regards,

    Shashikantha

  • But on any core I expect to get only handles in callbacks that were returned by keyCreate callbaks on that core - it is limitation of the API.
    It gives ability to optimize callbacks.
    Also handle is not always address in shared memory and it can be even not an address at all.

    As I see in this particular case with mailbox you treat API not as expected.

    Andrey Lisnevich
  • Yes. In this case the handle is shared which treats this mailbox keyCreate differently than other keyCreate APIs. Please use siuVidMC3keys.c in TI MCSDK as reference for mailbox API.

    Thanks and Regards,
    Shashikantha