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 SRIO interrupt configure in “SRIO_TputBenchmarkingTestProject”

  hello, I have read the code in file benchmarking.c which reside in "E:\Program Files_xp\ti\pdk_C6678_1_1_2_6\packages\ti\drv\srio\test\tput_benchmarking" ,and I'm confused with the interrupt configuration for SRIO, as the code is bellow:

if (!srio_usePolledMode)
{
/* Hook up the SRIO interrupts with the core. */
EventCombiner_dispatchPlug (48, (EventCombiner_FuncPtr)Srio_rxCompletionIsr, (UArg)hAppManagedSrioDrv, TRUE);
EventCombiner_enableEvent (48);

/* SRIO DIO: Interrupts need to be routed from the CPINTC0 to GEM Event.
* - We have configured DIO Interrupts to get routed to Interrupt Destination 0
* (Refer to the CSL_SRIO_SetDoorbellRoute API configuration in the SRIO Initialization)
* - We want this to mapped to Host Interrupt 8
*
* Map the System Interrupt i.e. the Interrupt Destination 0 interrupt to the DIO ISR Handler. */
CpIntc_dispatchPlug(CSL_INTC0_INTDST0, myDIOIsr, (UArg)hAppManagedSrioDrv, TRUE);

/* SRIO DIO: Configuration is for CPINTC0. We map system interrupt 112 to Host Interrupt 8. */
CpIntc_mapSysIntToHostInt(0, CSL_INTC0_INTDST0, 8);

/* SRIO DIO: Enable the Host Interrupt. */
CpIntc_enableHostInt(0, 8);

/* SRIO DIO: Get the event id associated with the host interrupt. */
eventId = CpIntc_getEventId(8);

/* SRIO DIO: Plug the CPINTC Dispatcher. */
EventCombiner_dispatchPlug (eventId, CpIntc_dispatch, 8, TRUE);

/* Debug Message */
System_printf ("Debug: Interrupts Registration complete\n");
}

/* Code has only been tested in polled mode, interrupt mode is not guaranteed or expected to work. */
bool srio_usePolledMode = TRUE;

I have some question list here:

(1) why connect the EventID 48 to ISR (Srio_rxCompletionIsr) as the red code above, because I saw the eventID 48 in C66x CorePac Primary Interrupts is (QM_INT_HIGH_n (8) and it is QM Interrupt for Queue 704+n8, does it any relationship between SRIO interrupt and  QM Interrupt for Queue 704+n8。

(2) As the blue code shown, this test code has only been tested in polled mode, interrupt mode is not guaranteed or expected to work, and I tried the code run in interrupt mode, and I didn't get the reght result, so if it is the code doesn't configure the SRIO for interrupt rightly.


   Can anyone help me ,waiting for your help, thankyou!

  • That example will only support polling.  If you want to use interrupts, you can look at the other two examples:

    C:\ti\pdk_C6678_1_1_2_6\packages\ti\drv\srio\example

    SRIOLoopbackDioIsr is directIO traffic with LSU interrupts

    SRIOMulticoreLoopback is message traffic using accumulator interrupts.

    Regards,

    Travis