Raw RGMII? (xCore-200)

If you have a simple question and just want an answer.
Post Reply
BillyBag2
Junior Member
Posts: 7
Joined: Thu Mar 15, 2018 11:42 am

Raw RGMII? (xCore-200)

Post by BillyBag2 »

Can there be a raw RGMII connection without a MAC?

I have example code for a raw MII connection using the function mii(). Is there an equiverlent raw RGMII connection?

I have not fully understood the hardware support for RGMII and how it is used at the low level. The MII insterface is soft and can connect to "any" pins.
How is the RGMII different?

Thanks William.


User avatar
akp
XCore Expert
Posts: 578
Joined: Thu Nov 26, 2015 11:47 pm

Post by akp »

The RGMII MAC appears to be software (all in lib_ethernet -- rgmii_ethernet_mac.xc) so you should be able to dig down from there and access the rgmii directly. Looks to be some assembly code for the low layer stuff. You can't change what pins you use because there is a hard RGMII block, I suspect that's to change from single data rate signals in the MCU to DDR on the RGMII links.
BillyBag2
Junior Member
Posts: 7
Joined: Thu Mar 15, 2018 11:42 am

Post by BillyBag2 »

Thanks I have got a little bit further but I'm now stuck.

I have looked at the rgmii code in lib_ethernet and the example AN00199_gigabit_ethernet_demo. I actually only require a speed of 100, full duplex, so I have modified ar8035_phy_driver() to call smi_configure() with the settings I want.
In this mode.

I have not used any MAC or buffering code as I do not want this.

I have take rgmii_10_100_master_rx_pins() as I think this is all I need. It now calls rgmii_configure_ports directly.

The SMI appears to be working and the state change when I plug in or remove the cable is working fine.

However I am not seeing any data on the port rgmii_ports.p_rxd_10_100. I can see data on wire shark and my other code which includes all the buffering also sees data on that port when I debug it.

Have I missed something obvious?

I have not yet done anything with TX. Will this be an issue?

Code: Select all

int main()
{
  smi_if i_smi;
  chan c_state_change;
  par {
#if 1
    on tile[1].core[0]: ar8035_phy_driver(i_smi, c_state_change);
    on tile[1]: smi(i_smi, p_smi_mdio, p_smi_mdc);
    on tile[1]: my_server(
            rgmii_ports,
            regs,
            c_state_change);
#endif
  }
  return 0;
}

my_server() is rgmii_10_100_master_rx_pins() with a call to rgmii_configure_ports().
Thanks William.
BillyBag2
Junior Member
Posts: 7
Joined: Thu Mar 15, 2018 11:42 am

Post by BillyBag2 »

Added...
set_core_fast_mode_on();
enable_rgmii(RGMII_DELAY_100M, RGMII_DIVIDE_100M);
and data is now coming in on the port. This enabled the rgmii PHY support on the xcore chip.
Post Reply