Hi,
I am a new developer on a project that will incorporate a c6670 to communicate with a single external device via SRIO. I am using the SRIO LLD provided in the MCSDK/PDK and have briefly reviewed the four example SRIO projects provided. Unfortunately, none of the projects appear to implement an interrupt-based SRIO receive operation that I could use as a basis of my own design. I did have a couple questions about the driver and SRIO capabilities in general, all about receive:
1) From my study of the SRIO peripheral, to receive data via DirectIO from an external device, the external device will need to send a doorbell to the c6670 after transferring its data. Additionally, the external device will need to set the "correct" doorbell info bits for the DSP to be able to identify "which" transfer took place. Is my understanding of the peripheral's Direct IO capabilities correct? From my research, I couldn't see any method of initiating a CPU interrupt from the Direct IO receive data transfer alone.
2) There are 4 doorbell registers, with each having 16 bits. Does this mean that we can do a total of 64 "unique" DirectIO transfers? That is, I may have 64 data buffers at various locations, from the L2 spaces of the four cores to shared memory or even DDR3 external memory. Each of these 64 buffers would identify with a unique Doorbell Register and Doorbell Bit combination. Is this the intended use of the peripheral?
3) In the call to the Srio_dioCompletionIsr(hSrioDrv, intDstDoorbell) function of the SRIO LLD provided in the MCSDK, the destinations of the doorbells need to be provided to the driver because the user is able to configure doorbells to be routed to any of the 16 general purpose interrupt destinations (INTDST0 - INTDST15) or the eight dedicated doorbell destinations (INTDST16 - INTDST23), which 2 are routed to each of the c6670's four cores. The array of interrupt destinations, to which the doorbells are routed to, appears to only access 4 elements in the driver software (srio_drv.c), as it is based off the number of doorbell registers and not the number of interrupt destinations. This array of indices is used to access the SRIO decode registers. My question is: couldn't the number of doorbells routed potentially span a range of greater than 4 destinations? For example, can't the user route doorbells over the entire range of INTDST0-INTDST15, in which case the driver would need to read through 16 decode registers rather than just 4?
4) For DIO transfers, is there a way to determine how much data was transferred and the location to which the transfer occured? It looks like the Srio_sockRecv() function was intended to return the transfer size, but for the DIO situation, it looks like the value always returned is 1 byte, which was set in the call to Srio_dioCompletionIsr(). The doorbell information returned from Srio_sockRecv() looks correct, as the doorbell is properly "registered" with the socket. Also, I don't see anything in the API to reveal the details of the received data transfer, like the destination address. This is what led me to believe that the developer must map this back to the identity of the doorbell, as asked in question 2. The SRIO user's guide does make references to a potential "side-channel" that contains transfer description information (Figure 2-28 in SRIO User's Guide, sprugw1b.pdf), but I am unsure of how to access this via the LLD.
Thanks!