I am using an Arty board (Digilent) and I am trying to communicate with the DP83848JSQ from an FPGA.
I've already confirmed the PHY is working correctly through another design, but I am specifically trying to read and write PHY registers over mdio/mdc, something I have not tested elsewhere.
However, I'm seeing some interesting behavior occur.
I'm attempting to send the message wire [13:0] message = 14'b00000100000110; which should instruct the PHY at address 00001 to send the contents of register zero back to the fpga. I only have one PHY connected to the FPGA and according to Digilent, the PHY is set to address 0001 at power-up.
My process right now is to send a reset signal to the PHY through the reset pin and follow up with the 32 clock cycles shortly after. I'm actually sending more like 60 to be safe as I know there is some time I have to wait between reset and sync.
After the sync, I'm sending 1 bit of the message at a time through mdio at the negedge of each mdc clock cycle.
After I send the last bit of the message, I am putting mdio into a hi-Z state for receiving. The problem is, I don't seem to receive anything. mdio does not get pulled down by the PHY like it should.
Here is a screenshot of that (mdc is 10 Mhz in this example. I have not noticed a change with a slower/faster clock) :
Zoomed in:
But, If I send the message wire [13:0] message = 14'b00000000000110; which sends to PHY address 0x0 which is not what expect from the ARTY, mdio gets pulled down by the PHY for some period of time, but I don't see any data.
Here is a screenshot of that (mdc is 10 Mhz in this example. I have not noticed a change with a slower/faster clock) :
It gets even more confusing than that as if I change the message to send to an invalid address the PHY should not respond to, wire [13:0] message= 14'b00000110000110;, mdio never gets pulled down, suggesting that when using the correct address, the PHY is doing something.
Here is a screenshot of that (mdc is 10 Mhz in this example. I have not noticed a change with a slower/faster clock) :
And a more zoomed-in version of the same waveform: