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 LOCAL_DIS bit and PEREN in PCR register description mismatch

In the SRIO user guide (SPRUGW1B) section 2.3.11.1 the descriptions of the operation of the LOCAL_DIS bit and how to set it does not agree with the flow chart in figure 2-30 or the bit description in Table 3-18.  The description says 1 means Rx packets are discarded. The table says 0 means packets are discarded.  The description says if it =1 and PEREN=1, do a RESTORE, the figure says don't do a RESTORE.

What is the real description of this bit?

How should it be handled?

If is is discarding packets, does that mean that say, a DirectIO NREAD will not get a response? (Could this explain why I'm not seeing the NREAD response even though the FPGA is sending it?)

Thanks

Mike

  • Hi,

    For my understanding, If LOCAL_DIS is 1 and PEREN is also 1, do a RESTORE to 1 for clears the Local_Dis bit and allows for reception of local packets. I will check with our internal team and get back to you.

    Thanks,
  • I am unable to get a DirectIO NREAD from an FPGA to work.  Using 1 port in 4x mode, the NWRITES work quite well with no errors based on debugging the FPGA side. So the link is physically running correctly.  NREAD's arrive correctly at the FPGA, it sends the response correctly according to its debugger, but the C6678 always gets a response timeout (condition code 01 in the LSU_stat). 

    The GEL script I use to analyze the registers says that LOCAL_DIS ( = 0) is "discarding packets". The csl_srioAux.h file from the PDK 1.1.2.6 does not have a function to read the LOCAL_DIS bit or to read or write the RESTORE bit, suggesting that maybe this is typically not used or necessary? 

    Where should I look to figure out why response packets don't make it?

    Thanks in advance.

    Mike

  • I've tried setting the RESTORE bit when I initialize the SRIO but that did not change anything. In fact it seemed to cause errors.
    I still can't get a handle on why the NREAD times out when the NWRITES work just fine. Again, talking to an FPGA in 1 port mode 4x wide. There is
    only 1 core using the SRIO, so I only check the LSU full bit. After sending the request, I poll on the completion code to tell when it is finished. It always
    comes back as timeout and the memory is not changed.

    Here is the code:

    fpgaCmdData[0] = 0xa0a0a0a0; fpgaCmdData[1] = 0x05050505; /* Make sure there is space in the Shadow registers to write*/ while(CSL_SRIO_IsLSUFull(hSrio, LSU1) != 0); /* This reads REG6 to get the LTID and LCB */ CSL_SRIO_GetLSUContextTransaction(hSrio, LSU1, &tcontext, &txnid);

      lsuXfr.rapidIOMSB    = 0;                 // MSW of the destination address. None
       lsuXfr.doorbellValid = 0;                 // no doorbell
       lsuXfr.intrRequest   = 0;                 // No interrupts
       lsuXfr.supInt        = 0;                 // suppress good interrupt = 0 (don't care about interrupts)
       lsuXfr.xambs         = 0;                 // xambs = 0
       lsuXfr.priority      = 0;                 // priority = 0
       lsuXfr.outPortID     = 0;                 // outport id = 0
       lsuXfr.idSize        = 0;                 // id size = 1 for 16bit device IDs
       lsuXfr.srcIDMap      = 1;                 // src id map = 1, using RIO_DEVICEID_REG1
       lsuXfr.dstID         = fpga_Id_8bit;      // destid = 0x0A
       lsuXfr.hopCount      = 0;                 // hop count = 0,
       lsuXfr.doorbellInfo  = 0;                 // doorbell = 0
    lsuXfr.ttype = 0x4; // ttype, NREAD lsuXfr.ftype = 0x2; // ftype, NREAD lsuXfr.rapidIOLSB = 0x02000050; // LSB of the destination address. lsuXfr.dspAddress = (uint32_t)&fpgaCmdData; // dsp address is the source for the data write lsuXfr.bytecount = 8; // number of bytes to send; always 2 words CSL_SRIO_SetLSUTransfer(hSrio, LSU1, &lsuXfr); //Busy bit is now 0 do { CSL_SRIO_GetLSUCompletionCode(hSrio, LSU1, txnid, &completion_code, &context_bit); }while (tcontext != context_bit);

    Thanks for any help, I'm running out of ideas.

    Mike

  • Not sure about the formatting on the previous post, looks kind of bad, let me try again.

    I've tried setting the RESTORE bit when I initialize the SRIO but that did not change anything. In fact it seemed to cause errors.

    I still can't get a handle on why the NREAD times out when the NWRITES work just fine. Again, talking to an FPGA in 1 port mode 4x wide. There is only 1 core using the SRIO, so I only check the LSU full bit. After sending the request, I poll on the completion code to tell when it is finished. It always comes back as timeout and the memory is not changed.

    Here is the code:

          fpgaCmdData[0] = 0xa0a0a0a0;
          fpgaCmdData[1] = 0x05050505;
    
                            /* Make sure there is space in the Shadow registers to write*/
          while(CSL_SRIO_IsLSUFull(hSrio, LSU1) != 0);
    
                                           /* This reads REG6 to get the LTID and LCB   */
          CSL_SRIO_GetLSUContextTransaction(hSrio, LSU1, &tcontext, &txnid);
    
          lsuXfr.rapidIOMSB    = 0;                 // MSW of the destination address. None
          lsuXfr.doorbellValid = 0;                 // no doorbell
          lsuXfr.intrRequest   = 0;                 // No interrupts
          lsuXfr.supInt        = 0;                 // suppress good interrupt = 0 (don't care about interrupts)
          lsuXfr.xambs         = 0;                 // xambs = 0
          lsuXfr.priority      = 0;                 // priority = 0
          lsuXfr.outPortID     = 0;                 // outport id = 0
          lsuXfr.idSize        = 0;                 // id size = 1 for 16bit device IDs
          lsuXfr.srcIDMap      = 1;                 // src id map = 1, using RIO_DEVICEID_REG1
          lsuXfr.dstID         = fpga_Id_8bit;      // destid = 0x0A
          lsuXfr.hopCount      = 0;                 // hop count = 0,
          lsuXfr.doorbellInfo  = 0;                 // doorbell = 0
          lsuXfr.ttype   = 0x4;            // ttype,   NREAD
          lsuXfr.ftype   = 0x2;            // ftype,   NREAD
    
          lsuXfr.rapidIOLSB    = 0x02000050;                 // LSB of the destination address.
          lsuXfr.dspAddress    = (uint32_t)&fpgaCmdData;  // dsp address is the source for the data write
          lsuXfr.bytecount     = 8;                       // number of bytes to send; always 2 words
    
          CSL_SRIO_SetLSUTransfer(hSrio, LSU1, &lsuXfr);             //Busy bit is now 0
    
          do
          {
             CSL_SRIO_GetLSUCompletionCode(hSrio, LSU1, txnid, &completion_code, &context_bit);
          }while (tcontext != context_bit);

    Thanks   Mike

  • Hi,

    Please increase the timeout delay(maximum timeout) and try to test the NREAD operation. 

    Have you referred the below thread for Nread transaction timeout?
    e2e.ti.com/.../927353

    Thanks,

  • I have looked at that thread. I don't get any hardware errors that I can tell, the link status registers are very clean, no errors at all, I'm not using doorbell, and the ERR_DET bits only indicate a response timeout, no other error shows up in it or any of the other error registers. And the NWRITE works fine. I'm really puzzled where to look.
  • Please increase the timeout delay(maximum timeout) and try to test the NREAD operation.
  • This is the current setting, I believe they are at the maximum.

    C66xx_0: GEL Output:  ********************************** Port Link Time-Out Control CSR (SP_LT_CTL) ******************************************************

    C66xx_0: GEL Output:  TVAL ---> 4.992899 to 6.657199 sec (srio_ip_clk - 312.5 MHz)

    C66xx_0: GEL Output:  ********************************** Port Response Time-Out Control CSR (SP_RT_CTL) ******************************************************

    C66xx_0: GEL Output:  TIMEOUT_VALUE[31:8] ---> 0x00FFFFFF => 503316450.0 ns


    Mike

  • Have you received the actual data for the NREAD operation?

    Try to implement the doorbell interrupt on your setup or disable Packet Response Time-out error enable bit field ERR_EN register.
  • Ganapathi's answer is correct.  You should probably not ever be touching those bits, as they are for reset isolation of SRIO (enabled/disabled at the device level registers) in a packet forwarding topology which should be used only in a special case.

    So when you can't receive the NREAD response from the FPGA, are you able to send a NWRITE packet from the FPGA to the DSP and receive that correctly?  If not, you have something else going on like the Device ID checking mode is not setup correctly.  If you can receive NWRITEs, then I'd look at the format of the NREAD response and make sure the src and dest IDs are correct. 


    regards,

    Travis

  • Ok, so the problem was in the FPGA after all.  The "SRIO core" of the Xilinx fpga was passing the read request to the "application" level which supplied the correct information to the core, but the core never actually sent the data back to the dsp. Something about needing some wait states inserted.  Thank you for the help and suggestions.  I did learn a lot.

    Mike

  • Glad to hear. Thanks for your update.
  • Hi Michael,

    I have some trouble with data transfer between DSP and Xilinx FPGA. After sent read request from DSP to FPGA, I don't get data back.

    Did you edit SRIO IP core from Xilinx?

    With regards,

    Vladimir

  • Vladimir,

    I was not the one working with the Xilinx, that was a colleague that was working on the project with me.  Sorry I don't know the details.

    Mike

  • Hi Michael,

    It is very a pity, but thank you for the answer.

    With regards,
    Vladimir