-
Notifications
You must be signed in to change notification settings - Fork 129
NetFPGA 1G CML mdio_ctrl_v1_00_a
jhirata edited this page Oct 2, 2014
·
1 revision
mdio_ctrl
v1.00a
pcore (HW)
lib/hw/contrib/pcores/mdio_ctrl_v1_00_a
AXI-Lite, MDIO
None
A generic MDIO interface for communicating with PHYs on the bus. It also provides extended resets to the PHYs at reset.
- Supports a variable number of PHY reset signals.
- Follows the same register format of the Xilinx AXI Ethernetlite core MDIO interface (Registers 0x07e4 - 0x07f0 from DS787).
Parameter | Description |
---|---|
C_MDIO_CLK_DIV | MDIO Clock Divisor. Use the function ceil(((S_AXI_ACLK Frequency) / (Desired MDIO clock frequency)) / 2) to determine the value of this parameter. |
C_NUM_PHY | Number of PHYs on the MDIO bus. This determines the width of the reset signal. |
Offset | Name | Description |
---|---|---|
0x00 | MDIOADDR | MDIO address register |
0x04 | MDIOWR | MDIO write data register |
0x08 | MDIORD | MDIO read data register |
0x0c | MDIOCTRL | MDIO control register |
Bits | Meaning |
---|---|
[31 - 11] | Reserved |
[10] | Operation: 0 - write, 1 - read |
[9 - 5] | PHY Address |
[4 - 0] | Register Address |
Bits | Meaning |
---|---|
[31 - 16] | Reserved |
[15 - 0] | Data to write to PHY register |
Bits | Meaning |
---|---|
[31 - 16] | Reserved |
[15 - 0] | Data read from PHY register |
Bits | Meaning |
---|---|
[31 - 4] | Reserved |
[3] | Enable: 0 - Disable interface, 1 - Enable interface |
[2 - 1] | Reserved |
[0] | Status: 0 - Ready for new request, 1 - Transfer in progress. Set |
| this bit to initiate a transfer.
- Wait until not busy. Check MDIOCTRL bit 0.
- Store PHY address, register address, and a 0 to bit 10 of MDIOADDR.
- Write data to MDIOWR.
- Enable MDIO by writing a 1 to bit 3 of the MDIOCTRL register.
- Initiate transfer by writing a 1 to bit 0 of the MDIOCTRL register. Also, rewrite the enable bit at bit 3. Basically, you'll be writing a 0x9 to the register.
- Check MDIOCTRL bit 0 to see when the transfer has completed.
- Wait until not busy. Check MDIOCTRL bit 0.
- Store PHY address, register address, and a 1 to bit 10 of MDIOADDR.
- Enable MDIO by writing a 1 to bit 3 of the MDIOCTRL register.
- Initiate transfer by writing a 1 to bit 0 of the MDIOCTRL register. Also, rewrite the enable bit at bit 3. Basically, you'll be writing a 0x9 to the register.
- Check MDIOCTRL bit 0 to see when the transfer has completed.
- Read data from MDIORD