nusgart / uhdl

MIT CADR HDL
https://lm-3.github.io/cadr.html
BSD 2-Clause "Simplified" License
7 stars 1 forks source link

Ethernet support (Chaosnet or TCP/IP) #3

Open nusgart opened 4 years ago

nusgart commented 4 years ago

Currently there is some half-implemented chaosnet code in xbus_chaos.v, but even if the code was finished there needs to be a physical layer in order for it to actually work. Since the Arty A7 has an ethernet port and TI PHY (DP83848J), using that is logical.

nusgart commented 3 years ago

I'm copying some thoughts from myself and @ams here so they don't get lost to the mists of time.

AMS on 2021-05-10

On a slightly different topic, do you have any ideas for adding Ethernet? The side on the Lisp Machine is simple, address to write data too, address to read data from, a special address to send data in said buffer, and a interrupt that is triggered when receiving a packet. I was thinking raw Etherne frames, with the type set to Chaos, and then whatever data following (I have code for handling the Unix side of this).

nusgart on 2021-05-11

This sounds similar to the ideas I had, assuming that it would provide the same interface as the original xbus adapter (or whatever the system 78/98/99 chaos drivers support). It would be more a lot more convenient for end users if we tunneled chaos over IP, or even over UDP/TCP. There is the chaos-bridge, but I'd imagine that it needs a separate ethernet adapter so it can take exclusive access (if it can share the ethernet adapter with the kernel's IP stack, then ignore these last two sentences).

AMS on 2021-05-11

Chaosnet is on the Unibus, tunneling is definitely an option. But I suspect it would require much more work. My idea was rather to get the kernel driver that hooked into the network stack, and add a layer on there. This is what was done back in the day -- but first I guess we need to have something booting.

Ehternet (or any kind of network) is a very high priority for me since that would mean we can bootstrap the machine from the FPGA.

nusgart on 2021-05-11

Tunneling would definitely require a lot more work, except on the MiSTer, where we could just take advantage of the HPS and use Linux's IP stack. I was thinking of that as a possibility later down the line, not immediately. I agree that ethernet/networking should be the highest priority after getting the thing to boot in the first place. If a kernel driver could help avoid needing to have a dedicated ethernet interface, that would be convenient.