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.

SRIO Direct I/O Read/Write 6670



I'm having issues read/writing to a CPS1432 switch.  There are some settings that do not seem to be quite right when I have been able to set the 6670 in boot mode and communicate (using maintenance packets) to the TMS320C6670 (1.0, 1GHz silicon), reading/writing tag/vendor/assembly information.  I have also setup the SRIO peripheral manually (using the pdk loopback example as a basis) and have also been able to communicate from the switch to the dsp.  

My set it up function can be found here: http://pastebin.com/hCDnsptV, we are using a 156.25MHz 

I seem to be having 2 problems, first is that link status is not always valid, My main issue comes when trying to initiate communications from the DSP to the switch.  I set/read the CAR register for link reset/status and do not always get the "0x80000010" returned (unless I enable loopback), however the switch always sees the DSP (and can read/write to it).  Not sure why the switch can see the link w/o any issues while the DSP doesn't always see a good link status.

The other issue I have is that I can play with the settings so the link does look good, however I cannot get maintenance packets to read/write w/ a valid code.  Sometime if I play w/ the switch settings, I can write maintenance packets, and the ackid's increment, however the completion code back I get is always timeouts.  I know the write is working because the switch's property changes, however I never seem to get read data back.

Here is what I am doing for Direct I/O access using maintenance read/writes http://pastebin.com/FcCnSdhk

Any help figuring out what is wrong with either of these issues would be greatly appriciated

  • Ok, after further tests, it is not reading properly from the switch (it was a different device that I was read/writing).  So I believe I have some sort of connection issue, however I'm not quite sure what it could be since I assume SRIO boot mode should come and be able to be connected to w/o any additional setup requirements.  If I am wrong about that, please let me know.

  • Erick,

    It is not clear to me what you can successfully do and what you can not do here.  You can successfully read and write from the switch to the DSP, but not vise versa?  A connection issue would probably prohibit you from doing either.  The first thing I'd like to know is if you get Port_ok set in the SPn_err_stat register.  I'm not sure if this is the register that you report the value 0x80000010 from or not.  You basically want to be sure that you have port_ok and no input or output error stopped state before you start transferring packets.  Are you using our EVM or is this a custom board with DSP and FPGA?  When you boot via SRIO, the peripheral will be initialized such that you can read and write to internal memory (not DDR) directly.  There is no other step needed.

    If you use the loopback example from the PDK as is, but only disable the loopback portion, you could be able to use the switch to perform the loopback and load and run from the DSP side.

    Regards,

    Travis

  • Hey Travis,

    Sorry I wasn't clear... I went to recheck my results, and when I thought I was talking to the DSP (via external source and switch) I was actually talking to a different processor, so I can't actually read/write between the DSP and switch in either direction.  I am working on a custom board that has a CPS1432 attached to it.  (the DSP is a TMS320C6670 silicon rev 1.0)

    I have no issues setting up the DSP so that I get a port_ok in the SP0_err_stat (actual value is 0x00000002) indicating no errors... I also can write a input status request to SP0_LM_REQ (0x4) and when I write that, I get a 0x80000010 return value (valid response, link_status ok).  I don't seem to be able to do direct I/O read/writes though, when I try my ackid's all increment (SP0_ACKID_STAT as well as ACKID_STATUS in SP0_LM_RESP), however I always get timeout errors.  My routines to do direct i/o read/writes can be found here http://pastebin.com/FcCnSdhk.  I was more interested in direct i/o access over the pdk loopback example, however I will give it a try to see if that will work.

    Am I correct in assuming that direct I/O can be performed in loopback mode?  Like I should be able to read my own registers/memory locations properly when in loopback mode if my routines are written properly?

    Erick

  • Erick,

    Please let me know what you see when using the PDK loopback example (taken out of loopback).  If the port is ok and you can do the link maintenance control symbol, you should be able to do DIO packets.  After you try sending the DIO packets, does the SP0_err_stat remain 0x00000002?  Can you send a maintenance request successfully?  Maintenance also use ackid but are handled by the switch port itself, not requiring the switch to be setup for routing packets correctly.  If you can do that, something in the switch routing table is not correct.

    Yes, you can definitely do DIO in loopback, both nwrite and nread.  No issues.  The example does this already, just uses internal TX-to-RX loopback instead of external pin looback.

    Regards,

    Travis

  • Thanks Travis, after trying the loop back within the switch, there seemed to be some sort of flaw on the board I was using, I have been able to connect and do direct I/O on a a couple of different boards.  I still seem to be running into an issue w/ link connections however.  If I setup and enable the DSP's SRIO ports, then enable or reset the SRIO switch, I have no problems establishing a link, and communicating, however if I setup and enable the switch's SRIO port first, then setup and enable the DSP's SRIO, I can't seem to establish a link.

    In the second scenario, the err_stat reg still shows 0x00000002, however when I try a link status request, I don't get a valid response (0x00000000), and when I try to send a reset request over the link, the switch never receives it.  Is there something I need to do to get the DSP's SRIO to auto negotiate w/ the switch?  The main issue being if there is an issue w/ the link the DSP will need to recover the link through the SRIO port, and the switch will already be running by the time the DSP gets powered up.

    Any ideas would be greatly appreciated, thanks

  • Erick,

    It doesn't make sense to me why the order of initialization of the swich and DSP would matter.  Do you have access to the switch registers to see if the switch port is in any type of errored state (Input/Ouput)?  If you are in Port_ok state, ackids are aligned, and not in one of these error states, you should be able to send packets.  What is the port configuration of the switch, i.e. is it 1x and you are only connected to a 1x port on the DSP?

    After port_ok, but before trying to send packets, you can clear the errored states of both devices by following the guidelines in the attached....

    Regards,

    Travis

    Keystone Software Assisted Error recovery_addendum.pdf
  • Hi Erick

    we have designed a board with two dsp's of 6678 and one srio switch cps1432..
    dsp1(6678) -- cps1432 -- dsp2(6678)
    The issue is port is getting trained but input & output error stoped state is set.
    We tried software error recovery process but still facing same input & output error stoped state is set

    Please clarify below points

    Have you tried SRIO communication between dsp1 to dsp2 through cps1432 switch ?
    dsp1(6670) -- cps1432 -- dsp2(6670)

    Other than ports and lane & speed initialization inside cps1432 registers ,did u
    initialized any other registers of cps1432 for proper link training?

    can you attach me the dsp srio code as well as cps1432 initialization code what u have tested ?

    Please help

  • Mahendra varman said:
    Have you tried SRIO communication between dsp1 to dsp2 through cps1432 switch ?
    dsp1(6670) -- cps1432 -- dsp2(6670)

    No, we haven't tested on such a platform, but the proceedure will work the same between the DSP and Switch as it does DSP to DSP.  Remember the input/output error state and ACKID alignment is between link partners only.

    Regards,

    Travis

  • Hi,
     I was trying to understand boot sequence for srio switch(cps1432), and i need some help. May be this question is simple but i did not understand. At 1st stage cps1432 switch initialization sequence ie I2C initialization, in EEPROM some registers and their values should be placed a/c to eeprom format and the cps1432 will read that configuration and configure itself and then go to next stage. so my question is what are the powerup configuration for cps1432 need to set before software initializaion should start? what are the registers need to be updated before going to next stage?

    I asked here because i found cps1432 related stuff here. I am a kind of new to RapidIO technology so pls help. If i am missing something then please point it out.

    With Regards

    Ashish

  • Hi Ashish,


    There may be other non-TI community members that can answer, but I'd suggest you contact IDT directly to ask these questions.

    Regards,

    Travis