[WIP] An applet for communicating using an Ethernet RGMII PHY #562
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Remaining work before I'm willing to un-draft this, in no particular order:
IODelay
into its own moduleOUT-FIFO -> TX-PACKET
andIN-FIFO <- RX-PACKET
state machines into their own componentsEthernetInterface
class (doesn't have to beEthernetRGMIIInterface
since it's not RGMII-specific)writev
)writev
but integrate its functionality intowrite
itself (this is questionable because it's really not clear how theread
counterpart should work, and in any case it seems like complicating the API for no good reason; this applet really should be using zero-copyread_into
andwrite_into
but adding those is actually quite challengingTo be clear, this is already an excellent MAC that easily meets or exceeds specifications of some commercial USB NICs, especially when it comes to performance under load. You can spam it with hundreds of megabits or even gigabits of UDP junk and the latency never gets above 20 ms on my laptop, usually it's under 2 ms. You can play real-time games or use ssh during that. I just have brainworms and want it to be perfect.
Things that will not get done in this PR:
See, I'm able to limit the scope :) Slightly :)
The most significant out-of-scope issues are probably 1GBASE-T support (which is relatively easy to fix and is an appealing fix because it verifies some Amaranth code) and fairness for the FX2 bus (which absolutely tanks performance if you do bidirectional spam at 100M bandwidth... which is also why I didn't post that particular benchmark :)