
DigitalJs: Digital circuit simulator in browser - billconan
https://github.com/tilk/digitaljs
======
compumike
Very curious, what is it that makes circuit simulation so interesting to HN
readers? I'm certainly biased and have spent years on the problem as one of
the developers of CircuitLab (YC W13) -- for example try:
[https://www.circuitlab.com/editor/53xa3r/](https://www.circuitlab.com/editor/53xa3r/)
(just click "Simulate" and "Run Time-Domain Simulation") -- but in general I'm
surprised at the high level of interest from this audience. Is your interest
in electronics more theoretical or practical? What's your existing level of
knowledge? What do you want to learn? What do you want these tools to be able
to do?

~~~
billconan
As a software engineer, I get bored by looking at monitors and typing on
keyboards. I want to make something physical. I have learned verilog and some
drag n drop tool I don't recall its name, but at this point, I don't remember
anything.

My interests in electronics come from my interests in robotics. I basically
need a tool to draw simply pcb boards, and send them for manufacturing, or at
least get an estimate on how much to manufacture. This is what I want to build
[https://dspace.mit.edu/handle/1721.1/118671](https://dspace.mit.edu/handle/1721.1/118671)

~~~
femto
Very nice!

I've been using SimcirJS [1] to teach computer architecture to a group of
primary school children. DigitalJS would be a replacement if it were possible
to drag and drop components from a menu in addition to instantiating with HDL.
I notice that the schematic is editable, so it's very close to being able to
do this. Is there a way do drag and drop components from a menu based library,
each component in the menu mapping behind the scenes to an HDL module (or a
child schematic)?

At first glance I would prefer DigitalJS over SimcirJS, as being HDL based it
offers the opportunity of efficiently implementing things such as memory as an
array in the HDL. In SimcirJS memory has to be build from raw gates (or the
simulator extended), so it's quite slow to simulate an entire CPU with
attached memory.

[1]
[https://kazuhikoarase.github.io/simcirjs/](https://kazuhikoarase.github.io/simcirjs/)

------
dcanelhas
[https://www.falstad.com/circuit/](https://www.falstad.com/circuit/) i prefer
this one for analog circuits (and digital, too) it nicely visualises current
and potential and has a lot of components and examples.

~~~
beenBoutIT
Awesome site, thanks for sharing this.

------
mjsir911
I used the yosys demo found in the readme to learn verilog alongside my
computer science machine organization curriculum, and that was a blast! It's a
wonderful little simulator and has plenty of examples for commonly taught
logic circuits in university.

------
anderspitman
Since we've got all the true nerds in here I'll go ahead and drop a link to
the gate-level bubblesort implementation I made a while back:
[https://anderspitman.net/apps/hardware-
bubblesort/](https://anderspitman.net/apps/hardware-bubblesort/)

------
anm89
I know this is pretty unrelated but does anyone know of something similar for
Lewis structures in chemistry?

~~~
deepnotderp
Circuit schematics maybe?

------
natpalmer1776
It's refreshing to look at the comments on this post and see discussion
surrounding not just the linked item, but also other similar items that people
are either personally involved in or prefer over the one linked.

------
FPGAhacker
I like the interface, nicely done.

------
pjmlp
Quite cool!

