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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

PCB-rs:library to wite Software Emulated Hardware

37 点作者 goombacloud大约 3 年前

5 条评论

zackmorris大约 3 年前
This is pretty great, I love the concept of modeling circuits with code. I wish it wasn&#x27;t Rust, but only because circuits are based on functional programming, so there&#x27;s no need for the added complexity of mutability or the other imperative concepts that Rust goes to great lengths to support. But it&#x27;s good to get a reference implementation done before exploring doing this in Lisp or something.<p>I&#x27;d also like to see if this attempts to address the drawbacks of VHDL and Verilog. When I used VHDL in college in the 90s, I remember that it had a lot of trouble with basic stuff like describing a collection of bits as a variable and expecting math on that variable to &quot;just work&quot;. Like maybe I could connect a circuit directly to one of the variable&#x27;s bits, but it acted flakier than if I connected it to a verbose circuit described manually. I think it had something to do with timing, maybe rising&#x2F;falling edge stuff, or maybe something needed to be latched before it could be used, etc. And maybe some of that has since been &quot;fixed&quot;, although the problem was probably user error on my part.<p>Anyway, I&#x27;d like to see a thin layer above hardware description languages that takes care of that stuff so that they don&#x27;t have surprising side effects. It&#x27;s kind of like how XML is more powerful than JSON because it can have its own types, but the industry discovered that custom types encourage anti-patterns, so now everybody just uses JSON. I need a circuit to be built as described, even if it has additional training wheels inside for my protection, and then an optimization pass would remove anything superfluous or maximize stability by converting to stuff like gray code (which is probably already widely supported). I feel rather strongly that this issue has set FPGAs back by at least 2 decades, maybe longer.
评论 #31042788 未加载
评论 #31041191 未加载
bjt2n3904大约 3 年前
I&#x27;m having difficulty understanding what this library does that HDL doesn&#x27;t already accomplish.<p>VHDL and verilog are definitely ugly, and MyHDL took a whack at trying to make it better... But this seems to come up a little short.
评论 #31042554 未加载
评论 #31040454 未加载
goombacloud大约 3 年前
The author also published a blog post that introduces it more: <a href="https:&#x2F;&#x2F;dev.to&#x2F;yjdoc2&#x2F;introducing-pcb-rs-making-it-easier-to-write-hardware-397m" rel="nofollow">https:&#x2F;&#x2F;dev.to&#x2F;yjdoc2&#x2F;introducing-pcb-rs-making-it-easier-to...</a><p>As far as I understood there is no functionality (yet) to translate it to something that could run on an FPGA.
评论 #31042647 未加载
mastax大约 3 年前
See also: Renode <a href="https:&#x2F;&#x2F;renode.io&#x2F;about&#x2F;" rel="nofollow">https:&#x2F;&#x2F;renode.io&#x2F;about&#x2F;</a>
yjdoc2大约 3 年前
Hey, I am the author of pcb-rs ; thanks for sharing this, and showing interest! I would be happy to answer any questions about it!