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.

questions about SRIO doorbell interrupt routing

Expert 2985 points


Hi all,

I met a question about SRIO doorbell interrupt routing.

Firstly, my code is below

CSL_SRIO_SetDoorbellRoute(hSrio, 1);
for (i = 0; i < 16; i++)
{
CSL_SRIO_RouteDoorbellInterrupts(hSrio, 0, i, 14);
CSL_SRIO_RouteDoorbellInterrupts(hSrio, 1, i, 15);
CSL_SRIO_RouteDoorbellInterrupts(hSrio, 2, i, 13);
CSL_SRIO_RouteDoorbellInterrupts(hSrio, 3, i, 12);
}

So all the Reg=0 doorbell info will route to INTDST14.

Then

CSL_SRIO_DisableInterruptPacing (hSrioCSL, 14);
CpIntc_dispatchPlug(CSL_INTC0_INTDST14, (CpIntc_FuncPtr)myDoorbellCompletionIsr, (UArg)hDrvManagedSrioDrv, TRUE);
CpIntc_mapSysIntToHostInt(0, CSL_INTC0_INTDST14, 9);
CpIntc_enableHostInt(0, 9);
CpIntc_enableSysInt(0, CSL_INTC0_INTDST14);
eventId = CpIntc_getEventId(9);
EventCombiner_dispatchPlug (eventId, CpIntc_dispatch, 9, TRUE);

means that I plug the myDoorbellCompletionIsr with INTDST14 and then route the INTDST14 to CIC0OUT_9.

And plug the eventID 75(corresponding with CIC0OUT_9) with Cpintc_dispatch.

With this code above, when I send the doorbell info with reg=0 to DSP through FPGA , the myDoorbellCompletionIsr can raise.

2. Then I change the code like this

CSL_SRIO_SetDoorbellRoute(hSrio, 0);
for (i = 0; i < 16; i++)
{
CSL_SRIO_RouteDoorbellInterrupts(hSrio, 0, i, 0);
CSL_SRIO_RouteDoorbellInterrupts(hSrio, 1, i, 1);
CSL_SRIO_RouteDoorbellInterrupts(hSrio, 2, i, 2);
CSL_SRIO_RouteDoorbellInterrupts(hSrio, 3, i, 3);
}

means doorbell info with reg=0 goes into INTDST16.

And then

EventCombiner_dispatchPlug (20, (CpIntc_FuncPtr)myDoorbellCompletionIsr, (UArg)hDrvManagedSrioDrv, TRUE);

I plug the eventID20 with myDoorbellCompletionIsr.

Because the INTDST16 is the eventID20 of Core0, I think the myDoorbellCompletionIsr will raise.

But when I send the doorbell info with reg=0, the myDoorbellCompletionIsr can not raise.

Are there  any misunderstandings in the routing path of SRIO doorbell?

Thanks for any replies!

Feng

  • Hi Feng,

    The INTDST 16-23 are the doorbell interrupts in SRIO and they are mapped to the same input event #20 in the CorePac interrupt controller as you can see in the Table 7-38: event #20 --> INTDST(n+16) --> SRIO interrupt.

    If you refer to the footnoot [6] at the end of Table 7-38: 6 CorePac[n] will receive INTDST(n+16), it means that CorePac 0 will receive INTDST(0+16), CorePac 1 will receive INTDST (1+16=17) ... CorePac 7 will receive INTDST (7+16=23).

    I think you could generate the INTDST 16 in Core_0 successfully. For example, you can just do the same setup of interrupt controller in the Core_1 as you want have done in Core0 and generate different INTDST #17 in the source (SRIO), then the Core_1 will receive the corresponding SRIO interrupt INTDST (17).

    The Figure 2-27 also shows similar things in SRIO user guide for the doorbell interrupt mapping. But it is shown in the 4-cores scenario, which is C6670. So INTDST20~23 are remapped to Core_0~3 again. In C6678, INTDST16~23 are mapped to Core_0~7 individually.

    Refer below link for Configuring Interrupts.

    http://processors.wiki.ti.com/index.php/Configuring_Interrupts_on_Keystone_Devices

    Thanks,

  • Hi Ganapathi,

     

    Thank you firstly!

     

    Exactly I use the DSP chip C6670 in my board.

    I know that the INTDST16 and INTDST20 are mapped into Core0. And INTDST16 corresponds with event #20 and INTDST20 corresponds with event #21 with regard to Core0.

    My problem is that in these codes below

    CSL_SRIO_SetDoorbellRoute(hSrio, 0);
    for (i = 0; i < 16; i++)
    {
    CSL_SRIO_RouteDoorbellInterrupts(hSrio, 0, i, 0);
    CSL_SRIO_RouteDoorbellInterrupts(hSrio, 1, i, 1);
    CSL_SRIO_RouteDoorbellInterrupts(hSrio, 2, i, 2);
    CSL_SRIO_RouteDoorbellInterrupts(hSrio, 3, i, 3);
    }
    
    EventCombiner_dispatchPlug (20, (CpIntc_FuncPtr)myDoorbellCompletionIsr, (UArg)hDrvManagedSrioDrv, TRUE);

    I plug the myDoorbellCompletionIsr with event #20 in Core0. 

    But when I send a doorbell with reg=0 in info field to C6670, the my DoorbellCompletionIsr can not raise!!

    As I know when I send the doorbell with reg=0, it will raise the INTDST16 and the event #20 will trigger the Core0.

    Because I had plugged the myDoorbellCompletionIsr with event #20, I think that the myDoorbellCompletionIsr will raise.

    But it can not in fact!

    So what are my problems in my codes and understanding with the interrupt routing path?

    Thank you again!

    Feng

  • Hi Feng,

    Your understanding is correct, In code you enable the host interrupt (event#20)  "EventCombiner_enableEvent(20);" after "EventCombiner_dispatchPlug" function. 

    Can you post your code here so that I can take a look at the changes that you have made while trying to route the doorbell interrupt.

    Thanks,

  • Hi Ganapathi,

    My fault is that the event #0 are not mapped to any of the INTC4~INTC15. So after combining, the event #20 can not be send to any of INTC4~INTC15.

    Thank you for helping me to clear my thoughts about the interrupt routing path.

    Feng