Trashernet is a very trashy Ethernet stack for FPGAs written in VHDL aiming to cover all OSI layers, including physical!
Go to file
Markus Koch 0f7437e901 demo: Fix missing record in mac demo
Will eventually become part of trashernet, I guess. But for now,
let's add it to the top level.
2022-04-18 09:44:27 +02:00
bench bench: Use VUnit 2022-01-16 17:46:01 +01:00
demo/lattice_brevia2 demo: Move top level to library work 2022-02-12 13:19:14 +01:00
design demo: Fix missing record in mac demo 2022-04-18 09:44:27 +02:00
doc doc: Add circuit diagram 2022-01-30 19:29:09 +01:00
trashernet phy: Improve header synchronization 2022-01-30 19:26:43 +01:00
.gitignore bench: Use VUnit 2022-01-16 17:46:01 +01:00
README.MD doc: Add circuit diagram 2022-01-30 19:29:09 +01:00
run.py bench: Use VUnit 2022-01-16 17:46:01 +01:00

Trashernet

Trashernet Logo

Trashernet is a very trashy Ethernet stack for FPGAs written in VHDL aiming to cover all OSI layers:

  • Layer 1, Physical: trashernet_phy
  • Layer 2, Data link: trashernet_mac

When writing it, the following were the main design philosophies:

  1. Standards are nice and all, but this, it just needs to work.
  2. Hardware is expensive, LOC are not. So let's do everything we can inside the FPGA.
  3. If there's a feature that feels optional even though it isn't, it is. See 1. if in doubt.

IMPORTANT: This code (and HW suggestions) violate the Ethernet standard in many ways. Do not use in proper (especially commercial) products.

Hardware

Circuit Diagram

  • RX: Use resistors behind Ethernet magnetics to reduce Ethernet RX voltage levels (0 +-2.5V) to LVPECL voltage levels (1.65V +-400mV). Or LVDS if your FPGA can't handle LVPECL. Also, pull up/down resistors help to avoid glitchy behavior with no cable connected or little data activity.
  • TX: Meh, a series current limiting resistor is good enough. Drive two outputs differentially to increase the voltage swing. (Technically not true antivalent signals as there's also the "off" state with both disabled.)

Notes:

  • The RX pull up/downs are probably not the best idea, and fixable in a better way. But for now, this shall work -- and suffice!
  • On the TX side, I'm grossly overloading the drivers. A line driver would probably be a good idea. Or you can just parallel multiple outputs ;D

License

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.