Digital (logic simulator)

My last foray into logic circuits was some number of years ago, and although Logisim had recently ceased development, it had such utility and ease of use, that it fit the bill almost perfectly.  Fast forward five or six years and I felt it was time to cast out far and wide and see what was available.  Now a days there are lots of web based solutions but having been caught by the likes of google shuttering up their services, I decided to discount these options.  Over the years there have been a number of forks of Logisim, however this just looks like more of the same with a few extra features bolted on.  Other completely separate projects which shall remain nameless had shocking UI’s which were a horror show to use and just became a barrier to creativity, others still looked like an exercise in form over substance, however just before disillusionment came Digital…

Click to embiggen

Due to its lack of a distinct name most of my searches completely missed this little treasure, which is a real shame, fortunately something prompted me to add “github” to my startpage query and bingo!  This simulator is eminently usable and even when you zoom right out the quality of the rendered circuit is really good.  There is a fair manual although I have to own up to completely missing the FAQ which has some real gems about the finer points of using the simulator.  There are numerous really nice features including things like verilog output which I will have to try out with icestorm on some actual hardware!  Nice features aside some thought has been put into the simulation, the circuit has a switch on phase which helps for example flip flop circuits reach a stable state, alas it won’t let you create an oscillator with a NOT gate but that said, it will highlight which areas of the circuit its having issues with, which makes things a great deal easier should you need to debug a circuit to get it to run, although needing to do this isn’t a common occurrence.

A simple but powerful feature of Digital is if there is another circuit saved in the same directory (and it has proper inputs and outputs) you can use it as custom circuit (or chip) meaning you don’t have to go through some rigmarole to create a special sub circuit.  This was great as when creating a counter circuit, I was able to make my own flip flop (just to prove everything could be done with basic logic) and then use repeatedly.  This lead me to make every circuit I built to have just inputs and outputs, and use another circuit as an “application circuit” to test it, giving me a little library or reusable components without various input and output components attached.

Another simple but useful feature is that the most recently used components appear as buttons along the toolbar, which can save a little time, although you do also have the option of seeing a tree structure of all the component in its own window to the left of the editor, its your choice if you want it taking up real estate.

To really give the simulator a test drive I decided to replicate the 74F382, this ALU needs over 80 gates and is just of the level of complexity where it can highlight any obvious flaws with the editor and possibly any odd behaviour with the simulator, and besides there was a nice logic diagram in the datasheet just begging to be brought to life…

I’m very pleased to report that not only does it simulate just fine, actually building the circuit wasn’t too much of a chore.  This gives me plenty of confidence that this is a great tool for teaching and even for a larger project like a CPU which could eventually be implemented on a FPGA.

 

Leave a Reply

Your email address will not be published. Required fields are marked *