Hi,
I have some questions about the SRIO_LoopbackTestProject example when I try to understand it to learn how to use C6678 SRIO peripheral.
The path of the example is : C:\ti\pdk_C6678_1_1_2_5\packages\ti\drv\exampleProjects\SRIO_LoopbackTestProject.
1.The following segment of code is found in SrioDevice_init function (the function is defined in device_srio_loopback.c).
/* TODO: Configure the processing element features
* The SRIO RL file is missing the Re-transmit Suppression Support (Bit6) field definition */
peFeatures.isBridge = 0;
peFeatures.isEndpoint = 0;
peFeatures.isProcessor = 1;
peFeatures.isSwitch = 0;
peFeatures.isMultiport = 0;
peFeatures.isFlowArbiterationSupported = 0;
peFeatures.isMulticastSupported = 0;
peFeatures.isExtendedRouteConfigSupported = 0;
peFeatures.isStandardRouteConfigSupported = 1;
peFeatures.isFlowControlSupported = 1;
peFeatures.isCRFSupported = 0;
peFeatures.isCTLSSupported = 1;
peFeatures.isExtendedFeaturePtrValid = 1;
peFeatures.numAddressBitSupported = 1;
CSL_SRIO_SetProcessingElementFeatures (hSrio, &peFeatures);
Actually, the above code is equal to : *((unsigned int *)0x0290b010) = 0x20000199.
This means writing 0x20000199 to Processing Element Features CAR (PE_FEAT) register.
The following figure is extracted from KeyStone Architecture Serial Rapid IO (SRIO) User Guide (SPRUGW1B).
I think C6678 is a PE which has physically addressable local address space and can be accessed as an end point through non-maintenance (i.e. non-coherent read and write) operations. So the bit 30 in PE_FEAT should be set 1. But the code writes 0x20000199 to the register( this means bit 30 is set to 0) and the phenomenon is the example code runs successfully. It really confuses me. The following figure is extracted from SPRUGW1B, which describes the CAR registers briefly.
My question is :
Whether the PE_FEAT register is used to configure the function of the local SRIO or it is just used to be read by a remote SRIO to determine the local SRIO’s capability ?
Whether the PE_FEAT register has affect on the function of the local SRIO or not ? If it has, please explain why the bit 30 of PE_FEAT register is set to 0 .
2. /* Clear the sticky register bits. */
CSL_SRIO_SetLLMResetControl (hSrio, 1);
What does the “sticky register bits” mean? Can you give me an example?
3. /* Set the device id to be 0 for the Maintenance Port-Write operation
* to report errors to a system host. */
CSL_SRIO_SetPortWriteDeviceId (hSrio, 0x0, 0x0, 0x0);
This is equal to :(*(unsigned int*))0x0290c028 = 0;
This means writing 0 to Port Write Target Device ID CSR.
I don’t think 0 is a valid value here. I think the device id should match the device id of a SRIO. Am I wrong?
4. /* Set the LLM Port IP Prescalar. */
CSL_SRIO_SetLLMPortIPPrescalar (hSrio, 0x21);
This means writing 0x21 to Port IP Prescalar for SRV_CLK Register
But the RefClk on my C6678 EVM is 312.5MHz, so I think the value 0x21 should be modified to 0x1f, am I right?
5.
What does the LLM mean in the figure?
Thanks!