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.

Problem About SGMII-to-SGMII Connection between C6678 and FPGA

Hello,

 

We are trying to implement SGMII-to-SGMII connection on our custom processor board. However, I could not get it work.

 

The connection is between Altera Startix V FPGA and TI C6678 DSP. The connections between the chips are AC coupled with series 0.1uF capacitors. The voltage standard of the FPGA transceiver is 1.5V PCML. We know the transceiver buffers of DSP are also CML so we guess there would be no problem regarding I/O standard.

 

On the board, we managed to work SGMII communication between two DSPs easily. At the same time, we implemented an onboard  loopback between two SGMII cores in FPGA which worked as well. But, we are not sure about the problem in DSP-to-FPGA SGMII connection.

 

We also checked the eye diagrams of the signals which are within the limits.

 

Can you tell a possible cause for the problem?

 

There are registers used to configure the RX and TX SGMII serdes interfaces called SGMII_SERDES_CFGRX and SGMII_SERDES_CFGTX whose values given below:

 

SGMII_SERDES_CFGRX = 0x00704621

SGMII_SERDES_CFGTX = 0x000108A1

 

We expected the malfunctioning is because of the values of the registers so we tuned them many times but none of the trials resulted with a working project.

 

During the trials, we did not clearly understand the function of the register named “RATE” in SGMII_SERDES_CGFTX.  The FPGA does not have such a register. So, while communicating with different devices (such as FPGA), does this register play an important role or is it an internal function?

 

By the way, we think the issue is not related with the PLL setting of DSP since the first bit of register SGMII_SERDES_STS is zero which indicates the PLL is locked.

 

I appreciate your valuable comments.

 

Regards.

  • Hi Melih,

    Let me ask some questions so I can understand you system. You stated that you are having problems with the SGMII connection between the C6678 and an FPGA SGMII implementation but you didn't define the link type. SGMII is designed to connect a MAC to a PHY where the MAC is the slave in the interface and the PHY is the master. The link is established using a negotiation across the SGMII that is initiated by the master with an expected response by the slave. If the negotiation is not initiated the link will remain down. The TI C6678 has the ability to operate as either a master or a slave on the link. The configuration is made using the SGMII_CONTROL register and the default mode is slave (MAC). What is the value you are writing to the SGMII_CONTROL and the MR_ADV_ABILITY registers? What is the value in the STATUS register? These registers are described in section 3.3 of the KeyStone Architecture Gigabit Ethernet (GbE) Switch Subsystem User Guide. What mode is you SGMII implementation in your FPGA configured to support?

    Regards, Bill

  • Hi Bill,
    First of all, thank you for the rapid response. 
    We carried out our trials based on two cases. The first one is the auto-negotiate mode and the second mode is the forced mode. 
    In auto-negotiate mode, the FPGA is set to auto-negotiate as well and the register values are given below:
    SGMII_CONTROL = 0x00000021
    MR_ADV_ABILITY  = 0x00009801
    STATUS = 0x00000038
    In forced mode, the FPGA is configured in forced mode as well and the register values are given below:
    SGMII_CONTROL = 0x00000020
    MR_ADV_ABILITY  = 0x00009801 
    STATUS = 0x00000038
    The link speed is set to be 1GHz in both cases. 
    In both cases, the DSPs are configured as masters whereas FPGAs does not have such a setting. In FPGA literature, there are two options regarding the master/slave ability. MAC mode and PHY modes determine that functionality. We tried both modes in both above given cases. 
  • Hi Melih,

    I'm checking with the software team to see if they can check you configuration process. Can you send your setup code so we can take a look? Both of the configurations have the master mode bit set. In this mode the C6678 will wait for a response if auto-negotiate is enabled or try and bring up the link if auto-enable is disabled. If the FPGA is set in master mode it may be waiting for a response from the C6678.  Try setting the FPGA in master mode with auto-negotiation and set the C6678 in slave mode with SGMII_CONTROL = 0x1 and MR_ADV_ABILITY = 0x1. This should allow the FPGA to initiate the auto-negotiation. I'll keep looking at your serdes setting as well but the SGMII has been pretty stable with the default settings. How are you physically connecting the C6678 to the FPGA? Are they both on the same board and connected with the PCB or are the signals routed through connectors? 

    Regards, Bill

  • Hi Bill,

    We carry out our trials on a single  board where there is no connector interaction exists. Basically, there are 2 DSPs connected to 1 FPGA on board. The connections between the DSPs and the FPGA are intra-board board communications. Additionally, the board is capable of PCIe Gen2 which more or less guarantees the functionality. We expect SGMII interface should work in such a board since it is relatively slow.

    Actually, we tried your suggested configuration while FPGA set to master and the DSP set to slave with auto-negotiation. And the link is still down. To be clear, FPGA registers do not have a "master/slave" terminology. Rather, it has "PHY/MAC" mode. We expect PHY mode corresponds to the master mode whereas MAC mode corresponds to the slave mode. 

    The "configSGMIISerdes" function, which is in the attached file (c6678.gel), implements the SGMII settings.  Additionally, we make the following register settings for SGMII in the project:

    --FOR SLAVE MODE-- 

    /* Slave Mode with Autonegotiation */
    *((volatile unsigned int *) (0x02090218)) &= 0xFFFF0000;
    *((volatile unsigned int *) (0x02090218)) |= 0x00000001;

    *((volatile unsigned int *) ( 0x02090210)) = 0x00000001; //Set SGMII Control Register -- SGMII as Slave, enable autonegotiation

    //Check to make sure that the LINK bit is set in the STATUS register
    while ((*((volatile unsigned int *) (0x02090214)) & 0x00000001) != 0x00000001);


    --FOR FORCED LINK MODE-- 

    /* Forced Link */
    *((volatile unsigned int *) (0x02090218)) &= 0xFFFF0000;
    *((volatile unsigned int *) (0x02090218)) |= 0x00009801;

    *((volatile unsigned int *) ( 0x02090210)) = 0x00000020; //Set SGMII Control Register -- SGMII as Master, no autonegotiation

    //Check to make sure that the LINK bit is set in the STATUS register
    while ((*((volatile unsigned int *) (0x02090214)) & 0x00000001) != 0x00000001);

    c6678.gel
  • Melih,

    The 6678 DSP /* Slave Mode with Autonegotiation */ and /* Forced Link */ register configurations matched our document SPRUGV9B sections 2.4.3.3.2 and 2.4.3.4. respectively. They are correct. Do you have the trial with Autonegotiation where FPGA is slave and 6678 is master (DSP configured as 2.4.3.3.1)?

    Regards, Eric

     

  • Hi,

    Yes, we tried that configuration and the link is still down. Any other suggestion is appreciated.

    Melih.