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 C6678 SRIO

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!

  • Hi,

    5 days ago, I posted this question. No one can give me the answer, or some suggestions?

     

    Thanks!

  • weifeng guo said:

    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 .

    None of the CAR (capability registers) affect function.  They provide info to other devices when read.  The DSP is a processor as the PE_FEAT describes, the memory bit would indicate a memory only device with an SRIO interface.  The RapidIO spec allows for such a device.

    weifeng guo said:
    What does the “sticky register bits” mean? Can you give me an example?

    Not sure which bits are actually sticky, but I would assume you would want to set this bit to reset all bits after a reset.

    weifeng guo said:
    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?

    Port-writes are for error handling.  There are many posts on port-writes and most people disable them completely, since the system needs a device that can accept and respond to port-write messages.  If there isn't a device to respond to them, you can run into many issues due to the DSP continually resending the error message port-write.  Anyway, to answer your question, deviceID=0x0 is dedicated to the system host and usually the device that discovers and enumerates the system in complex setup.  So sending port-writes to 0x0 deviceID would be valid, but it depends on your system.

    weifeng guo said:
    But the RefClk on my C6678 EVM is 312.5MHz, so I think the value 0x21 should be modified to 0x1f, am I right?

    The srv_clk is the internal bus frequency, which is CPU/3.  The settings for the prescalar are not strict and overlap somewhat, so adjust to your preference.

    weifeng guo said:
    What does the LLM mean  in the figure?

    It is the hardware module that responds automatically to an incoming maintenance packet.  This may be bypassed if the DSP is put in a promiscuous mode.  However, you don't need to worry about this bit to control the destID checking, the better way is to use the 3 control bits that are shown in table 2-22.  These three bits control how incoming maintenance and regular packets are handled. 

    Regards,

    Travis

  • tscheck,

     Thank you very very much for your answer!

    Best Regards,

    Guo