WbMdio by Martoni

Drive MDIO phy interface with a Chisel component

MDIO

Drive MDIO phy interface with a Chisel component. Test it with ksz8081rnb phy.

Wishbone interface

Wishbone slave is a simple 16bits data interface with 4 registers.

16bits addr register name
0x0 status
0x1 control
0x2 readData
0x3 writeData

status

bit 15..8 7..1 0
name version void busy

with:

  • version in decimal without dot (1.0 -> 10)
  • busy: set if frame is sending

control

bit 15 ... 7..5 4..0
name R void aphy areg

with:

  • R: read bit, must be set to emit read frame
  • aphy: phy address number
  • areg: register number

readData

bit 15 .. 0
name readData

writeData

bit 15 .. 0
name writeData

Typical use

Send write data frame

To send data frame on the mdio bus follow this step :

  • monitor the busy bit in status register, if the bit is low go to following step.
  • Write phy address and reg address in control register
  • Write data in writeData register. The wishbone write will trigger the data mdio write frame.
  • monitor the busy bit, once busy bit is low, write data frame has been sent.

Send read data frame

  • monitor the busy bit in status register, if the bit is low go to following step.
  • Write phy address, reg address and read bit 'R'. Writing the 'R' bit will trigger the read mdio frame
  • monitor the busy bit, once busy bit is low, read data frame is terminated.
  • read readData register to get the data read.

tests

To launch test use the makefile with commands:

$ make testall

Project Meta

  • Registered on LibreCores 11 months ago
  • Project started 1 year ago
  • Last commit 9 months ago

Commits

{"labels":[2019,2020],"series":[[41,0]]}

Commits per year

Contributors

{"labels":[2019,2020],"series":[[2,0]]}

Unique contributors per year

Releases

1.0-rc1 is is the only release.

  • 1.0-rc1
    Oct 1, 2019 d44cae5 prerelease

Languages

{"labels":["Others","Scala","Markdown","make","Python"],"series":[0,4,2,1,1]}

Share of languages used

Data Sheet
Project Web Site
https://github.com/Martoni/MDIO.git
Issue Tracker
Last activity 9 months ago
1.0-rc1 released 11 months ago
Primary language: Scala
2 watchers
3 stars
41 commits by 2 contributors
Fabien Marteau Martoni
0,4,8,6,1,1,1,3,1,1,5,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0

activity over the last year

LibreCores data updated 1 month ago