[libre-riscv-dev] circuitjs

whygee at f-cpu.org whygee at f-cpu.org
Tue Apr 28 20:10:35 BST 2020

On 2020-04-28 16:53, Jacob Lifshay wrote:
>> https://github.com/sharpie7/circuitjs1/commit/323f530ce4c409316e2bab8277636deced3070fc
wait, YOU did it ? :-O
awesome !
For now I play with :
incremeters http://tinyurl.com/y7mseqfd
Carry-lookahead adders
complete ALU datapath http://tinyurl.com/rhonlsz
latches http://tinyurl.com/y8jjxd2x
shift registers, sequencers and so on,
very low-level but absolutely indispensable...
circuitjs has many quirks and bugs but
the qualities are not matched yet.

>> being able to have *interactive*
>> subsets of the circuits we're deploying would be absolutely fantastic.
that's all the point of a recently published article I wrote about it.
Can Jacob tell the developers about it ? :-)

> If we were to try to run much more than some really simple circuits, it
> would need things like multi-bit buses and a much faster simulator and
> subcircuits (though I think it may already have subcircuits).
I have not run into hard limitations so far, except screen size :-D

> BTW, the offline Java version is quite a bit faster than the online 
> version
> which is made using a Java to Javascript translator (GWT).
for now speed is not the point for me :
on hackaday.io we use circuitjs a LOT to discuss circuit topologies,
ping and pong ideas at each other, demonstrate stuff...

the circuitjs system allows sharing with much fewer limits than "normal 
and can be embedded in tutorials and educational webpage. A bit of JS 
detect a click to swap an <img> into an <iframe> that simulate the 

For number theory I have used JS-animated SVG but it's so painful and 
long to write,
but Luke could "build" the scoreboard before our eyes in a long HTML 
showing each sub-element one by one and assembling them, then show their 

The scheduler has long reached a state where even Luke has difficulties 
its subtleties so that method would not only help him, but more 
importantly OTHERS
so they can take over his work when needed. So far, I don't feel I could 
despite my little understanding of the CDC6600.

>> i'm even tempted to suggest putting in a new NLNet Grant request to 
>> cover it.
> Maybe write a BLIF to CircuitJS translator :)
> allows us to export from yosys to circuitjs
I've been considering finding ways to convert from/to circuitjs
to/from VHDL... that would be a killer.
At least a "filter" to transform the .txt outputs, recognize
the basic gates and map them to those of my library (or sxlib)
and/or vice versa.

> Jacob

More information about the libre-riscv-dev mailing list