Digital
A digital logic designer and circuit simulator.
Install / Use
/learn @hneemann/DigitalREADME
Digital
Digital is an easy-to-use digital logic designer and circuit simulator designed for educational purposes.


Download and Installation
There is no installation required, just unpack the Digital.zip file, which is available for download. On Linux start the shell script and on Windows and MacOS the JAR file can be started directly. A Java Runtime Environment (at least JRE 8) is required to run Digital. On Windows the easiest way to get Java is to install the binaries provided by the Eclipse Temurin project.
If there are any problems starting Digital on your system, please try to run Digital from a command line within the Digital folder:
java -jar Digital.jar
Features
These are the main features of Digital:
- Visualization of signal states with measurement graphs.
- Single gate mode to analyze oscillations.
- Analysis and synthesis of combinatorial and sequential circuits.
- Simple testing of circuits: You can create test cases and execute them to verify your design.
- Many examples: From a transmission gate D-flip-flop to a complete (simple) MIPS-like single cycle CPU.
- Includes a simple editor for finite state machines (FSM). A FSM can then be converted to a state transition table and a circuit implementing the FSM (See screenshot).
- Contains a library with the most commonly used 74xx series integrated circuits.
- Supports generic circuits. This allows the creation of circuits that can be parameterized when used. In this way, it is possible, for e.g., to create a barrel shifter with a selectable bit width.
- Good performance: The example processor can be clocked at 120 kHz.
- Supports large circuits: The "Conway's Game of Life" example consists of about 2400 active components and works just fine.
- It is possible to use custom components which are implemented in Java and packed in a jar file. See this example for details.
- Simple remote TCP interface which e.g. allows an assembler IDE to control the simulator.
- Components can be described using VHDL or Verilog. The open source VHDL simulator ghdl needs to be installed to simulate a VHDL defined component, and the open source Verilog simulator Icarus Verilog is required to simulate a Verilog defined component.
- A circuit can be exported to VHDL or Verilog. There is also direct support for the BASYS3 Board and the TinyFPGA BX board. See the documentation for details. The examples folder contains a variant of the example CPU, which runs on a BASYS3 board.
- Direct export of JEDEC files which you can flash to a GAL16v8 or a GAL22v10. These chips are somewhat outdated (introduced in 1985!) but sufficient for beginners exercises, easy to understand and well documented. Also the ATF150x chips are supported which offer up to 128 macro-cells and in system programming. See the documentation for details.
- SVG export of circuits, including a LaTeX/Inkscape compatible SVG version (see ctan)
- No legacy code.
- Good test coverage (about 80%; Neither the GUI tests nor the HDL simulator integration tests are running on the Travis-CI build servers, so CodeCov measures only about 50%). Almost all examples contain test cases which ensure that they work correctly.
The latest changes that have not yet been released are listed in the release notes.
Documentation
The documentation is available in English, German, Spanish, Portuguese, French, Italian and simplified Chinese. It is still very incomplete but it contains a chapter "First Steps" which explains the basic usage of Digital. The documentation also contains a list of available 74xx chips and a list of available keyboard shortcuts.
Translations
So far Digital is available in English, German, Spanish, Portuguese, French, Italian and simplified Chinese. If someone wants to add a new translation, please let me know. I can provide you with a special file for translation. This file is much easier to translate than the files used directly by Digital. So you don't have to deal with GitHub or the Java source code. Simply add the respective translation of the English text to this file and send it back to me. If you want to know how to create the necessary files yourself, see here.
Comments
If you want to send a bug report or feature request please use the GitHub issue tracker. This helps me to improve Digital, so do not hesitate. If you have general questions, you can also use the new GitHub Discussions to ask your questions without creating an issue.
It's also possible to send a private message to digital-simulator@web.de.
Motivation
Prior to the development of Digital, I used Logisim, developed by Carl Burch. If you are familiar with Logisim you will recognize the wire color scheme.
Logisim is a excellent and proven tool for teaching purposes, that has been actively developed until 2011. In 2013 Carl Burch has started the development of a new simulator called Toves. In his blog he explained why he decided to develop a new simulator instead of improving Logisim. In short: In his opinion, there are weaknesses in Logisim's architecture that are too difficult to overcome. Unfortunately, the development of Toves was discontinued at a very early stage.
In 2014, Carl Burch finally discontinued the development of Logisim. Since Logisim was released as open source, there are a number of forks to continue the work on Logisim:
- Logisim-evolution by people of a group of swiss institutes (Haute École Spécialisée Bernoise, Haute École du paysage, d'ingénierie et d'architecture de Genève, and Haute École d'Ingénierie et de Gestion du Canton de Vaud)
- Logisim by Joseph Lawrance at Wentworth Institute of Technology, Boston, MA
- Logisim-iitd from the Indian Institute of Technology Delhi
- Logisim from the CS3410 course of the Cornell University
But as far as I know, these projects do not work on solving the architectural difficulties. They are more about adding features and fixing bugs. In Logisim-evolution, for example, a VHDL/Verilog export and a really nice FPGA board integration was added.
So I also decided to implement a new simulator completely from scratch and started the implementation of Digital in March 2016. In the meantime a development level has been reached which is comparable to Logisim. In some areas (performance, testing of circuits, circuit analysis, hardware support) Logisim has already been exceeded.
Below I would like to explain briefly the reasons which led me to start a new development:
Switch On
In Logisim there is no real "switching on" of a circuit. The simulation is running also while you are modifying it. This causes sometimes an unexpected behaviour. So it is possible to build a simple master-slave flip-flop which works fine. But after a circuit reset the flip-flop does not work anymore. Since the circuit is not switched on, there is no settling time to bring the circuit to a stable condition after its completion. A master-slave JK-flip-flop can only be implemented with a reset input, and this reset input needs to be activated to make the circuit operational.
To understand how Digital deals with this issue, you have to look at how the simulation works in Digital: Digital uses an event based simulator approach, i.e. each time a gate undergoes a change at one of its inputs, the new input states are read, however, the outputs of the gate are not updated instantly. Only when all gates involved have read their inputs, the outputs of all gates are updated. All gates seem to change synchronously, i.e. they seem to have all the exact same gate delay time. However, an undesirable feature of this approach is that even a simple RS flip-flop might not be able to reach a stable state. The same problem Logisim has.
To solve that problem, the "switching on" is introduced and a different simulation mode is used during the settling time right after switching on the circuit: Each time a gate undergoes a change at one of its inputs all gate inputs are read and their outputs are updated immediately. This happens gatewise in random order until no further change
