Very nice! The state of electronics tooling has long been extremely bad - 99% of people who put a regulator into their schematic will want an appropriate input and output capacitor as the datasheet demands. 99% of people who put a microcontroller will want a crystal and a programming port and a reset pin pull-up. It's only because of closed source tools stuck in the stone age that the state of the art is to copy out…
Yeah, trying to learn KiCad is worse than learning Blender. If JLCPcb made a simple online editor that sourced from available parts and integrated directly with their store they'd be running out of banks to put their money into.
Show HN: Atopile – Design circuit boards with code
131–140 of 300 posts
Re: Show HN: Atopile – Design circuit boards with code
#132I saw your project at Open Sauce last year, happy to see the official release.
Re: Show HN: Atopile – Design circuit boards with code
#133It should produce a schematic as one of its output products.. maybe use graphviz, see: https://observablehq.com/@nturley/netlistsvg-how-to-draw-a-b... HDL tools all do this.
I'm sure we will have some flavor of a visualizer in the compiler one day. But outputting a "normal" schematic doesn't seem like it's the right approach. We might actually end up with a bunch of different ways to "visualize" your circuit, each one optimized for a specific thing you are trying to achieve.
Re: Show HN: Atopile – Design circuit boards with code
#134 module blinky
(
input v3v3,
input gnd
);
wire led;
wire led_r;
rp2040 u1
(
.vcc (v3v3),
.gnd (gnd),
.gpioa15 (led)
);
resistor #(.VALUE("220"), .TOLERANCE("5%"), .PART("ERJH2CF1R10X"), .SIZE("1206")) r1
(
.a (led),
.b (led_r)
);
led #(.PART("WP7113SURDK14V")) d1
(
.anode (v3v3),
.cathode (led_r)
);
endmodule
Use Verilog parameters for all of the part information you might want, like links to digikey part number.. or bury them into modules with different names.FWIW: Cadance "conceptHDL" is a schematic entry program which generates a Verilog netlist like this as its output (usually for board level simulation including ASICs and FPGAs). But if you're careful, Verilog could used directly as the input- the board-level schematic is pretty simple compared with the chip source code.
I'm sure there is a tool somewhere to convert this into an EDIF netlist for Kicad or whatever. [Icarus can do it: https://steveicarus.github.io/iverilog/targets/tgt-fpga.html ]
Also: this is not limited to digital: there is a variant of Verilog called Verilog-AMS specifically designed for analog simulation.
https://en.wikipedia.org/wiki/Verilog-AMS
In Verilog-AMS, you can define a simulation models of your components:
module resistor
(
inout electrical a,
inout electrical b
);
parameter real R = 1.0;
analog
V(a,b)
So not only do you get a component, but you also can simulate the whole thing before fabrication to catch mistakes.Re: Show HN: Atopile – Design circuit boards with code
#135Re: Show HN: Atopile – Design circuit boards with code
#136It reminds me of the Akka Graph DSL[1] [1] https://doc.akka.io/docs/akka/current/stream/stream-graphs.h...
Interesting! Haven't come across it before but those linked `~>` operators do indeed quite familiar. If you're familiar with GraphDSL do you have some elements we should look into?
I wonder if with directional arrows, instead of writing "out ~ switch.in; switch.out ~ power.gnd", we could write "out ~> switch ~> power.gnd" instead?
But without distinction between in and out ports it may not be possible to check if connections are valid ones.
Anyway, this project really makes me want to learn electronics! Congrats!
Re: Show HN: Atopile – Design circuit boards with code
#137It can be a good example of how to setup an ato project.
Re: Show HN: Atopile – Design circuit boards with code
#138Very nice! The state of electronics tooling has long been extremely bad - 99% of people who put a regulator into their schematic will want an appropriate input and output capacitor as the datasheet demands. 99% of people who put a microcontroller will want a crystal and a programming port and a reset pin pull-up. It's only because of closed source tools stuck in the stone age that the state of the art is to copy out…
Yeah, trying to learn KiCad is worse than learning Blender. If JLCPcb made a simple online editor that sourced from available parts and integrated directly with their store they'd be running out of banks to put their money into.
Re: Show HN: Atopile – Design circuit boards with code
#139Why not use Verilog or SystemVerilog? module blinky ( input v3v3, input gnd ); wire led; wire led_r; rp2040 u1 ( .vcc (v3v3), .gnd (gnd), .gpioa15 (led) ); resistor #(.VALUE("220"), .TOLERANCE("5%"), .PART("ERJH2CF1R10X"), .SIZE("1206")) r1 ( .a (led), .b (led_r) ); led #(.PART("WP7113SURDK14V")) d1 ( .anode (v3v3), .cathode (led_r) ); endmodule Use Verilog parameters for all of the part information you might want, l…
Units and tolerances are core to our language, the physical world is 'fuzzy' and having a good way to deal with those we think is pretty important.
We are also trying to make it as readable and friendly as possible, our expectation is our users will likely have some experience with python and perhaps a little C back in school, so making it clear and approachable is front of mind.
Very open to critiques on our choices! We still very much in development.
Re: Show HN: Atopile – Design circuit boards with code
#140`import Y from X` is a terrible language design decision, established by the JavaScript ecosystem. It should be along the lines of `import X.Y` or `from X import Y` so that autocomplete tools can assist you.