amaranth-lang / amaranth-soc

System on Chip toolkit for Amaranth HDL
BSD 2-Clause "Simplified" License
84 stars 31 forks source link

[pre-RFC] Ideas for an I2C peripheral interface on Wishbone #34

Open galibert opened 1 year ago

galibert commented 1 year ago

I feel the need for a way to configure the i2c-controlled devices I have on my fpga board from a wishbone bus driven by a cpu core. That means a single master and no real surprises on the bus, everything documented (hopefully) and no collisions. So the question has been what the wishbone-level interface would be to keep the complexity as low as possible in both the cpu code and the module implementation. There's also an idea of "you pay for what you need and no more".

The ideas I currently have:

A possible starting point on the interface:

Advantages of the interface:

Disadvantages:

Any ideas to complement/replace that one?

tannewt commented 1 year ago

Is the idea to do wishbone transactions over I2C? So Wishbone -> I2C -> Wishbone?

whitequark commented 1 year ago

No, a Wishbone peripheral implementing an I2C controller.