-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RGMII Ethernet + MiSoC core does not work on Sayma #854
Comments
I've paused to myself about how this Sayma subsystem is setup. @gkasprow please correct me if any of this is wrong.
There was discussion of white wire modifications in a Sinara Issue. sinara-hw/sinara#327 |
I've paused to myself about how this Sayma subsystem is setup. @gkasprow
<https://github.com/gkasprow> please correct me if any of this is wrong.
There is a single outward-facing Ethernet interface on Sayma_AMC.
- 1000BaseX over copper traces on microTCA Port 0 of the AMC backplane.
exactly
-
- Ways of connecting to Port 0 are
- a card edge adapter from WUT that provides power and RJ45
breakout
it provides SATA connector
- microTCA Carrier Hub Ethernet switch on NAT MCHBasic v3.5
<http://www.nateurope.com/manuals/nat_mch_base_v3x_man_hw.pdf>
- Broadcom BCM5396 Gigabit Ethernet Switch
- 1000BaseX interfaces for fabric A consisting of 12 Port0's
for up to 12 AMC modules
- RJ45 1000BaseT connector on the front panel labeled GbE1
there is yet another way - there is SATA connector close to the edge
connector. It is connected in parallel to the link. It is not very elegant,
but for 1Gbit it's not an issue and let you test the board outside the
crate.
MAX24287
<https://www.microsemi.com/product-directory/ieee-1588-plls-and-software/4668-max24287>
interfaces between outward-facing 1000BaseX and inward-facing MII or RGMII.
- for 1000BaseX: RDP, RDN, TDP, TDN are connected to AMC Port0.
- inward-facing interface can be exposed to either MMC (LPC1776 ARM
uP) or the FPGA (Ultrascale).
- A digital mux (SN74CB3Q32245ZKE) selects which of the two chips
is connected to the MAX24287 under the control of trace SEL_RGMII driven by
the MMC.
- The PLC1776 uses a parallel MII type interface.
- The FPGA uses a parallel RGMII-1000 type interface.
Exactly. By default the PHY is routed to the FPGA
If you have troubles, I'll have a look once again, but it was working.
|
@gkasprow Please edit your previous response to add additional line breaks between quote carrots '<'.
OK. The MAX24287 1000BaseX serial interface is connected to both AMC Port0 and SATA connector J10. But 1000BaseX and SATA are not easy to use; most Ethernet hubs are 1000BaseT with RJ45 plug. So to test Ethernet on bench top a different adapter is needed.
When you say "by default" do you mean a combination of a) defined by components on PCB and b) defined by MMC after it's booted. Do you have a list of power-on steps taken by the MMC and what the state of various lines is? Or is there an annotated source file that I should read? @gkasprow some Q&A that might help with trouble M-Labs is having.
Reset-based ReconfigurationToggling MAX24287 from MMC to FPGA is pretty complicated as it involves resetting the chip. Table 6.1 of the datasheet describes the value of the 15 configuration pins. These pins have different roles after the reset phase is finished, so many are driven by multiple sources.
I see some odd looking things comparing Table 6.1 and sheet 6 of the Sayma_AMC layout for the MAX24287. Here's a comparison for the two modes. Odd things are noted. select MII for use with MMC
select RGMII for use with FPGA
|
@sbourdeauducq What do you mean by "RGMII Ethernet + MiSoC core does not work on Sayma"? What have you tried? |
Guys, I will work on it very soon, hopefully tomorrow. |
No packet can be transmitted or received. When the PHY is clocked, and my cable is not broken (the SATA hack is very fragile), then autonegociation succeeds. |
@gkasprow Any findings? Now that the clocking and DACs are mostly working, Ethernet seems to be the major blocker to get RF output using ARTIQ. |
@sbourdeauducq Today I built setup to test Ethernet and there is partial success - it does not work at all. I'm quite happy with it because in this case I can find and solve the problem. |
@gkasprow Glad there's now something tangible that looks wrong on your side too. Progress comes in many colors. :) |
Debugging this is top priority. The Sayma hardware and lots of M-Labs gate ware is ready to test. Getting Ethernet up and running is the bottleneck to forward progress right now. |
I think I know where the problem is. I implemented simple condition in MMC firmware that resets the PHY chip after FPGA gets configured and DONE goes low.
|
Here is the binary file: |
I will test it on Monday. |
Why do I still get autonegotiation to work, then? Is that PHY chip still doing autonegotiation while in reset? |
In my media converter it shows LINK state when I plug SFP, even with AMC power supply off. |
Yes, that was a problem with one of my media converters too. Some of those just use (and require) the EEPROM and/or the LOS signal, which was one of the problems with the cable you gave me, since you had removed its chips entirely. Some other media converters show the status of the autonegotiation instead.
Yes, see section 36.2.5.2.7 "Auto-negotiation process" of IEEE 802.3-2008. The autonegotiation is optional and can be disabled with a switch on some media converters.
No, there is more (optionally).
In this case this is not the problem on my boards, since another of my media converters is sensitive to whether the SATA side of the cable is plugged or not. |
@sbourdeauducq I don't have access to AMC board right now, I simply found this issue looking at the code. University is closed right now. I will test it on Monday. Is the MII LED on? |
What is the MII LED? |
It is a LED on the front panel which is connected to the CPU |
@gkasprow Have you been able to get RGMII Ethernet to work again with your demonstration code? |
I just noticed that I was wrong, DONE pin when high indicates correct FPGA configuration. So the MMC code you have is correct. |
So far no success. I tested 3-pin mode and 15-pin configuration mode. I observe PHY transferring data and Rx data on PHY pin. But there is no activity on DV line at all. |
@sbourdeauducq @jbqubit I found! |
With another media converter I get reasonable data on Rx lines and observe them with chipscope |
We have revision B of the chip |
@gkasprow That's no longer true. One sfp converter doesn't work. I swapped it and in all cases I get transmission. (but still sometimes
|
It seems it defaults with SGMII interface... |
OK, I discovered that PHY on the board that works with Kasli is not configured by MMC but only by pin straps. Another one that shows link up but no traffic is configured by MMC. The PHY gets configured from time to time once per a few power cycles so it looks like floating pinstrap that is normally conntected to the FPGA. |
@sbourdeauducq thanks for yak shaving tools, they are really helpful here. |
I made Kasli transmitter and Sayma sniffer to test transmission in other direction. It doesn't work only in one case: kasli -> sfp -> sfp-sata -> sata -> sayma. If there is any media converter in this chain transmission works. @gkasprow It's the board on which phy is programmed. ed: PAUSE is off. |
So we have quite intriguing situation. |
Ok, this is getting ridiculous. I need a table to keep track of working configurations. These are Kasli -Sayma connections. Sayma with not init. phy - with heatsink Sayma with init. phy - without heatsink PAUSE off:
|
Have you tried Sayma_AMC -> SATA -> SATA-SFP -> SFP ------> switch? If this works what are the components so I can reproduce? |
@jbqubit It seems now we only have communication in one direction, we didn't try to plug it into switch. |
lack of PHY configuration means that the Rx clock is generated and two clock sources are fighting. |
funny thing is that the only registers the MMC modifies are:
which disables the Rx clock and fixes silicon issue described in the datasheet |
What we discovered with @marmeladapk today:
|
@gkasprow How did you get on with this? Any progress? |
I prepared simple design that simply forwards RGMII data to the IO header. It is really strange why I see really nice RGMII signals on FPGA vias but the Microscope tool does not detect any traffic. |
@sbourdeauducq any idea why microscope don't see any packets? |
funny thing, with RGMII pins forwarded to DIO, the Microscope sees some packets... |
What is the code you are using for Microscope? If the behavior changes when you are forwarding the pins to DIO and you are sure you did not make other changes to the code, this looks like another Ultrascale/Vivado bug. Considering the design of the new Ultrascale I/O cell, that would not be very surprising. |
no, U cannot connect it directly, At the moment the Microscope samples only rising edge data. |
@marmeladapk added RGMII converter and it works 😀 |
@sbourdeauducq I think it was my fault - I wrote (or more like copy-pasted) it second time and it works. Code looks like it was duct-taped together. |
Isn't it simpler to remove the capacitor, put it somewhere else, and solder on its pads? |
Is this a decoupling capacitor? Does the board work without it? |
It is decoupling cap, anyway you have to cut the trace. But you can cut the
trace in other place and short the capacitor. It will work.
|
According to Greg, ARTIQ Ethernet is also working on the WUT board. |
No description provided.
The text was updated successfully, but these errors were encountered: