Hi,Travis:
I use pdk1.1.2.5 SRIO_TputBenchmarkingTestProject.My project is configurated with device2device mode. I run producer on DSP1 core1 and run comsumer on DSP0 core0. DSP1 send NWRITE packet to DSP0.Here DSP means C6678.
When I run in poll mode,everything seems ok.But when change to interrupt mode. As the consumer DSP0 core0 cannot receive the doorbell interrupt from producer DSP1 core1.Meanwhile I can see that DSP0 core0 as the consumer has received data from DSP1 core1.
I setup interrupt like the below steps,If any wrong places are found please correct me.Thanks very much!
Step0:
On consumer side DSP0 core0.
I set doorbell interrupt route table like below:
CSL_SRIO_SetDoorbellRoute (hSrio, 1);
It means that doorbell interrupt be mapped into INTDST0-15.
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);
}
As to CSL_SRIO_RouteDoorbellInterrupts (hSrio, 0, 0, 0),it means that doorbell
Reg0 and bit 0 be mapped into INTDST0.
Step1:
On producer side DSP1 core1.
As I let DSP1 send a NWRITE packet followed with doorbell interrupt to DSP0.
So I set something like below:
bindInfo.dio.doorbellValid = 1; //valid = 1
bindInfo.dio.intrRequest = 0;
bindInfo.dio.supInt = 0;
bindInfo.dio.xambs = 0;
bindInfo.dio.priority = 0;
bindInfo.dio.outPortID = SRIO_PORT_NUM;
bindInfo.dio.idSize = ((testControl.srio_isDeviceID16Bit) ? 1 : 0);
bindInfo.dio.srcIDMap = 0;
bindInfo.dio.hopCount = 0;
bindInfo.dio.doorbellReg = 0;
bindInfo.dio.doorbellBit = 0;(reg0 bit0 can be mapped into INTDST0 112)
step2:
On consumer DSP0 core0:
Because I want to trigger interrupt events for INTDST0 ,So I select system event id = 112,host event id = 8 and cpu vector id = 4.
I install my SRIO isr like below:
Void myIsr()
{
System_printf("SRIO isr coming\n");
}
void Setup_SRIO_ISR()
{
Hwi_Params params;
int eventId;
int sysid,hostid,cpuintid;
Hwi_Handle myHwi;
sysid = 112;
hostid = 8;
cpuintid = 4;
CpIntc_Module_startup(0);
CpIntc_dispatchPlug(sysid, myIsr, sysid, TRUE);
CpIntc_mapSysIntToHostInt(0, sysid, hostid); CpIntc_enableHostInt(0, hostid);
CpIntc_enableSysInt(0, sysid);
CpIntc_enableAllHostInts(0);
eventId = CpIntc_getEventId(hostid);
Hwi_Params_init(¶ms);
params.arg = hostid;
params.eventId = eventId;
params.enableInt = TRUE;
params.priority = 2;
myHwi = Hwi_create(cpuintid, &CpIntc_dispatch, ¶ms, NULL);
Hwi_enableInterrupt(cpuintid);
Hwi_enable();
}
I think I do all the things as I can,But consumer still cannot enter myisr and consumer can receive
Data from producer successfully.