TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: I made a discrete logic network card

541 点作者 ynoxinul大约 1 年前

21 条评论

nonrandomstring大约 1 年前
Beautiful work to share.<p>&gt; I needed a hardware MAC address filtering.<p>What I really love is the stack trace of reasoning, that&#x27;s very pedagogical, and that you either worked out lots of things from first principles or felt the need to explain them is if from naive perspective.<p>Also, while impractical for real world networking I don&#x27;t think this is just idle play. What with backdoors turning up in over-complex network network chips you may find a more serious readership&#x2F;project motive in the future.
评论 #39996254 未加载
yjftsjthsd-h大约 1 年前
So this is for an all-custom computer, which is rather more impressive on its own (to say nothing of &quot;So I made a C compiler.&quot;), but now I&#x27;m curious what the minimal implementation of an ethernet card for a &quot;normal&quot; PC would be. I suspect a lot of it would be very similar, up to that you could do checksums on the PC&#x27;s CPU (probably just baked into the driver). It&#x27;d need to be attached - either bare serial or more usefully USB? And then you&#x27;d either need to write a &quot;real&quot; driver for it or else plumb through to userspace and do it there. For similar things I&#x27;ve eyeballed having the device implement <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;USB_communications_device_class" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;USB_communications_device_clas...</a> so it &quot;just works&quot; without needing to do your own driver, but I don&#x27;t think that would play nice with things like doing all the checksums host-side. Or... while searching for that, I stumbled across <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Ethernet_over_USB" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Ethernet_over_USB</a> , which <i>maybe</i> suggests that you can just build an adaptor that translates the physical connection to USB and then let the computer magically handle all the rest for you? Dunno, over my head.
评论 #39980528 未加载
评论 #39981072 未加载
评论 #39983821 未加载
JonChesterfield大约 1 年前
Towards the end is a link to a C compiler built for this project. <a href="https:&#x2F;&#x2F;github.com&#x2F;imihajlow&#x2F;ccpu-cc">https:&#x2F;&#x2F;github.com&#x2F;imihajlow&#x2F;ccpu-cc</a>. Seems to have a linker and a libc as well. I have no real understanding of how complicated the hardware design part is but casually throwing a C compiler together is great.
评论 #39978344 未加载
hubraumhugo大约 1 年前
Super impresssive! I would absolutely love to work on such projects and admire the passion and countless hours that went into understanding and then building the system.<p>Retirement is not something desirable for me, so maybe that&#x27;s when I&#x27;ll spend my time on hardware and software projects like this.
评论 #39977661 未加载
评论 #39978966 未加载
actionfromafar大约 1 年前
So, is it better or worse than the Etherlink 3c501 ? :-D<p><a href="https:&#x2F;&#x2F;mirror.math.princeton.edu&#x2F;pub&#x2F;oldlinux&#x2F;Linux.old&#x2F;net&#x2F;tcpip&#x2F;ne2000&#x2F;3c501.c" rel="nofollow">https:&#x2F;&#x2F;mirror.math.princeton.edu&#x2F;pub&#x2F;oldlinux&#x2F;Linux.old&#x2F;net...</a><p>IIRC it over-wrote the buffer the CPU tried to read with new packets from the network or something like that. I had it for a while in Linux and the performance really was bad. :-D
评论 #39977782 未加载
评论 #39977962 未加载
jiveturkey大约 1 年前
&gt; Fixing the frame length doesn’t have any effect on higher-level protocols because they encode the packet size in their headers and do not rely on the actual Ethernet frame length.<p>Interesting. I just wrote a packet decoder and I specifically verify at each layer that the lower layer length matches. So for IP, in my decoder the IP datagram length must match exactly the ethernet frame length + link layer header. I didn&#x27;t do this to be pedantic but rather to detect short frames, and then I decided that long frames were also errors.<p>You (author) are using uIP but I wonder what Linux or any other modern OS does. You don&#x27;t specifically mention interoperability but I wonder if you&#x27;ve tested that.
评论 #39977989 未加载
评论 #39979152 未加载
formerly_proven大约 1 年前
Physically a lot smaller than DEC&#x27;s first SSI Ethernet card(-set): <a href="https:&#x2F;&#x2F;i.ebayimg.com&#x2F;images&#x2F;g&#x2F;NEYAAOSw-mZlg0lZ&#x2F;s-l1600.jpg" rel="nofollow">https:&#x2F;&#x2F;i.ebayimg.com&#x2F;images&#x2F;g&#x2F;NEYAAOSw-mZlg0lZ&#x2F;s-l1600.jpg</a> (DEC DEUNA, those boards are over a foot long), though also a lot fewer features. DEUNA is a &quot;real&quot; NIC, it has tx&#x2F;rx queues and handles all that autonomously. Does DMA, too. It of course comes with it&#x27;s own on-card PDP-11 to run it.
precompute大约 1 年前
Very cool! How long did it take you? It&#x27;s really impressive!
评论 #39977071 未加载
amelius大约 1 年前
This shows how easy it is to put a backdoor inside a chip that is connected to a network port.
arnon大约 1 年前
In Communication Systems Engineering studies we implemented ethernet signalling, then the TCP&#x2F;IP stack including ARP and switching in Motorola 68k QUIC assembly.<p>Longest 18 months of my life.
tranxen大约 1 年前
I often use ENC28J60 chips which are converting SPI &lt;=&gt; 10Base-T, they are very fun to work with and not so expensive ($4).<p>But reading (<a href="https:&#x2F;&#x2F;qdiv.dev&#x2F;posts&#x2F;eth-to-spi&#x2F;" rel="nofollow">https:&#x2F;&#x2F;qdiv.dev&#x2F;posts&#x2F;eth-to-spi&#x2F;</a>) about somebody that made that chip from basic components is really awesome.<p>Thanks a lot !
asdefghyk大约 1 年前
I would like to see a hard disk with all open source software. This sounds extremely challenging, even just the physical construction. My thought is to take an EXISTING hard disk and replace the software. I think one problem is may some of the chips , it is hard &#x2F; challenging to obtain programming information.
评论 #40001076 未加载
评论 #39999391 未加载
whartung大约 1 年前
So, I read this as a “discrete logic network” “card” rather than “discrete logic” “network card”.<p>All set to learn what a discrete logic network was.
jfbenson大约 1 年前
This is truly impressive, not just the work, but the way you have laid it out so simply and effectively. Huge kudos!
cushychicken大约 1 年前
Man, that is really, really cool.<p>I just went back and reread the 10BASE-T write up as well.<p>That’s super cool you can even get 2.6kB out of it.
mogoh大约 1 年前
Sorry for this naive question, but isn&#x27;t every network card build out of discrete logic components?
评论 #39978915 未加载
评论 #39978941 未加载
评论 #39978947 未加载
2sk21大约 1 年前
Great work! Quite an interesting collection of hardware you have built!
samtho大约 1 年前
This is really cool, I also love the modularity of this computer setup.
_factor大约 1 年前
A network card with opaque firmware is a 0-day away from becoming a global catastrophe.<p>Even RISC-V based switches like the Vega use proprietary switch chips (Wuhan China designed FSL91030M specifically), which is no better.<p>You can verify input&#x2F;output to a certain extent, but this doesn’t preclude a timer based function call or a tailored packet activation.<p>I wonder why our society tolerates these unknowns. With the push towards WiFi replacing the majority of home networking, I’m not confident it will change any day soon.
评论 #39978991 未加载
评论 #39992800 未加载
评论 #39980432 未加载
amelius大约 1 年前
Cool. Now waiting for a WiFi implementation :)
RetroTechie大约 1 年前
Very cool stuff!<p>Only nitpick I&#x27;d have is that author decided to use a custom-design cpu.<p>Ok, &quot;discrete logic only!&quot; is a valid choice. And then keeping complexity to a minimum weighs heavily. But the downsides of that choice are also considerable:<p>-No interrupts (which are <i>very</i> useful)<p>-No existing software base to tap from. Somewhat-useful C compiler helps.. somewhat.<p>But who am I to question author&#x27;s choices for a hobby project like this? Great stuff in any case.
评论 #39978217 未加载
评论 #39978413 未加载