Changelog¶
The changes in each DigSim release. vx.x.x lists changes on the main branch that are
not released yet. Releases are published on
PyPI and
GitHub.
v1.15.0¶
- Python API: YosysComponent.deposit() sets a named signal like a Verilog deposit: the value now, and the cells that drive it keep it until they drive it again (a register until its next active clock edge, a gate until an input changes). Synthesis(keep_signals=True) gives a signal that is the same net as another one (like an input) a buffer of its own. Needs digsim-native 0.6.0 with the native engine
- cocotb: writes to the signals inside the design are deposits, they were logged as errors and ignored
- cocotb: a vector is a packed object (PackedArrayObject, PackedObject in cocotb 2.1) with the range and the signedness of its declaration, and its bits can be indexed (dut.down[11] of logic [11:4] down) and the bits of an input set. It was a LogicArrayObject, VHDL's type, unsigned and from 0, without bits. A signal with a constant value, like a register only set in an initial block, is read only, it was missing
- Python API: Synthesis(keep_signals=True) keeps the named wires and registers, and the logic that drives them, also when no output depends on them. The cocotb tests see them: python -m digsim.cocotb keeps them unless --no-signals is given. They were removed by the synthesis, like the whole logic of a module without outputs
- Python API: Synthesis takes macros with any value, like a string with spaces and quotes (defines={"FILE": '"data/rom.hex"'}), also -D of python -m digsim.cocotb and the defines of cocotb's runner. They failed with "has a space or a quote"
v1.14.0¶
- Python API: Synthesis has include folders (includes) and macros (defines) for the Verilog files
- Python API:
import digsim.synthas the first import of digsim failed with a circular import. Importing digsim.circuit first worked - Python API: Circuit.vcd() has a timescale, the time of a nanosecond of the simulation in the file ("1 ns" as before), like "1 ps" for cocotb
- cocotb (a proof of concept): python -m digsim.cocotb (or digsim-cocotb) synthesizes a Verilog design with Yosys and runs cocotb's tests on it, in one process, without a simulator of its own, with include folders (-I), macros (-D) and parameters (-P). --netlist only synthesizes, and the tests run on the netlist file, the build step of cocotb's runner. With a cocotb that has DigSim support: make SIM=digsim, get_runner("digsim") and --cocotb-simulator=digsim of the pytest plugin, see docs/cocotb.md. One DigSim nanosecond is a picosecond for cocotb, so that the gate delays are short against the clocks of the tests. The tests read the ports of the top module and the named signals inside the design (the wires and registers that synthesis keeps, dut.u_alu.result for a submodule), and trigger on their edges. --no-signals (SIM_ARGS with make) leaves the signals out, for a faster simulation. Waveforms with --waves (WAVES=1 with make), in picoseconds, with the signals. Only the inputs of the top module can be set (deposits, other writes are logged and ignored), and a port is undefined as a whole
v1.13.0¶
- VCD files: written by the VCD writer of digsim-native (the same file as pyvcd writes), with both engines, and the native engine writes the changes of its own ports without calling Python. The 6502 example with --vcd runs about 3 times faster (from 4,300 to 12,700 clocks per second), with five times as many changes in the file, see the next line. Without digsim-native, pyvcd writes the file as before. Needs digsim-native 0.5.0
- VCD files with the native engine: the signals inside a Verilog component made of gates (like the 6502 example) changed in the file, they stayed X
- Python API: the helpers for the files and parameters that the components read are exported by digsim.circuit.components: read_memory_file, file_modules (the modules of a Verilog file), files_used (the files a subcircuit uses), parameter_dict and parameter_text (the parameters of a Verilog component) and NetlistParts. The GUI used them from private modules
- GUI: the file dialog of the path of a RAM or ROM had "All files" twice
- Python API: digsim is a namespace package (no init.py), so that the engine and the GUI can be packages of their own. Import Circuit from digsim.circuit:
from digsim import Circuitno longer works - digsim-engine: the simulator is a package of its own, without the GUI and Qt, for scripts, testbenches and servers: pip install digsim-engine. digsim-logic-simulator installs it, with the same version. The imports don't change
v1.12.0¶
- Verilog components: a Verilog file can have several modules. The component is the top module (the one no other module instantiates, with its submodules in it), or the module chosen with module="..." (Module in the settings pane of the GUI). Adding a file with several top modules in the GUI asks which one. It failed with "Only one module per file is supported"
- RV32E example circuit: the clock runs at 1000 Hz (was 100 Hz), and the program writes the hello text a letter every 0.2 s. lcd.c has defines for the clock and the delay
- Clock: the frequency is set as a number and a unit (Hz, kHz or MHz), from 1 Hz to 100 MHz (was a slider, 1–100 Hz). It is saved in Hz as before, so older circuits open unchanged
- VerilogComponent: the YosysComponent by the name of what it is made from, a Verilog file (or a Yosys netlist), with the same arguments. The examples use it
- Verilog (Yosys) components: the flip-flops and latches start undefined ("X"), as in Verilog and in hardware, or at the initial value of the Verilog (like "reg ready = 0", or the initial contents of a memory). They started at 0, which hid a register that is read before it is reset (an Icarus simulation shows it as X). Needs digsim-native 0.4.0 for the native engine
- The 74162 IC and the counter of the Verilog examples start at 0, as they did before the registers started undefined
- Verilog with $display (or another simulation message or assertion) loads: it failed with a KeyError, DigSim ignores those cells
- GUI: when a changed setting removes wires (the ports are gone), the warning names the ports after the component that had them, not after the new one
v1.11.0¶
- Native engine: a Clock (outside the GUI) runs in the engine, its edges don't call Python (digsim-native 0.3.0)
- Circuit.run_until_edge(rising=clock) (or falling=clock) runs through the next edge of a Clock, to just before its next edge, to drive a test bench by a clock instead of setting a clock input. With a port, it runs to the edge of the port. Clock.next_edge_ns() is the time of its next edge
- Native engine: a Verilog (Yosys) component is simulated as one compiled block, its cells in the order of their ranks without events and delays between them (digsim-native 0.2.0). The RV32E processor of rv32e runs 4.7 times faster with functional blocks and 10 times with gates, about 50 and 100 times faster than in Python. Inside a block there are no delays (the outputs change 1 ns after an input), so VCD files differ from the Python engine's, the settled values are the same. DIGSIM_BLOCKS=0 simulates every cell with its delay, like the Python engine
- GUI: GND and VDD, small symbols for a constant 0 and 1, instead of a one-bit Static Value
- GUI: the netlist view of a Verilog component has a search of its signals, cell types and source lines: the cells of the selected entry are shown in a color, the rest dimmed
- GUI: Edit > Auto Layout places the components of a circuit in columns from its inputs on the left to its outputs on the right and draws the wires again, one undo step
- GUI: View Netlist (or a double-click) on a Verilog component shows its gates or functional blocks and the wires between them in a read-only tab, inputs on the left and outputs on the right
- GUI: a subcircuit view pans with a drag (with the hand cursor, an arrow over a subcircuit to double-click), and the Zoom In, Zoom Out and Zoom to Fit shortcuts zoom it (they zoomed the circuit behind it)
v1.10.0¶
- StaticValue: a radix setting, to show the value in decimal (as before), hexadecimal or binary
- HD44780: a 16x2 character LCD module, programmed like the real one in 8-bit or 4-bit mode, with the A00 character ROM, custom characters and a blinking cursor. In the GUI it looks like a real module, with a green, blue, amber, white or red backlight.
- RAM: a byte enable input (the byte_enable setting, off by default): a write only changes the bytes of the word that BE selects, like a processor's byte strobes
- GUI: an opened circuit is zoomed to fit, and Zoom to Fit (and Export Image) includes the wires, not only the components
- GUI: the settings pane is hidden until you show it, with View > Settings Pane (F4) or Settings in the context menu of a component. DigSim remembers it once it is shown.
- GUI: no RuntimeError (Internal C++ object already deleted) when DigSim quits with components selected
- GUI: a click in the circuit no longer moves it a few pixels after the circuit was opened or zoomed to fit
- Clock: the frequency setting goes up to 100 Hz (was 50 Hz)
- GUI: the wires of a subcircuit view no longer disappear after a right-click on one of its ports
- An RV32E CPU system example circuit (
circuits/rv32e/): a RISC-V processor in Verilog with an arbiter, GPIO and a timer as subcircuits, running a C program that writes to an HD44780 LCD and runs a bar on LEDs - GUI: File > Examples, the example circuits come with the package (also with uvx): one is copied, with the files it uses, to a folder of your choice and opened from there
- GUI: the hex editor shows the characters of words wider than 8 bits too (16, 24 or 32 bits, lowest byte first), and highlights the characters of the current word
- GUI: the hex editor of a ROM no longer shows the dropdown of the RAM views over the name of its file
- GUI: the hex editor of a RAM or ROM no longer blocks the window, the circuit can be edited and simulated while it is open. Its words can't be changed or saved while the simulation runs. A RAM's editor shows the RAM now first, read again when the simulation stops.
- Label wires (Wire Source and Wire Sink) in a subcircuit belong to it: a subcircuit with label wires loads in a circuit with the same labels and can be used more than once, and its labels no longer connect to those of the circuit it is in
- GUI: the Yosys component is called Verilog in the component selection (a search for Yosys still finds it)
v1.9.0¶
- A native engine: with digsim-native installed (a dependency on Linux x86_64 and arm64, Windows x64 and macOS), the gates of Yosys components and ICs are simulated in Rust, with the same results, about 3 to 4 times faster for the 6502 example. DIGSIM_ENGINE=python simulates in Python
- GUI: Simulate in hidden tabs, in the application settings (off by default): the simulations go on in the tabs that aren't shown, without sound, and a tab that simulates has a ▶ in front of its name
- The GUI example circuits are in
circuits/, a folder each with the files they use (the Verilog of a Yosys component, the circuits of a subcircuit), instead ofexample_circuits/with paths intoexamples/ - GUI: VCD Output and VCD File... in the Simulation menu, like the VCD checkbox and file button
- GUI: the VCD file field grows with the window, up to a width, and shows the path of the file, shortened in the middle when it is long
- GUI: F11 is Single Step
- GUI: F5 starts and stops the simulation, like Space
- qtawesome is no longer a dependency, the icons are Qt's own
- GUI: the top bar has only the simulation controls and VCD output. Open, Save, New, Delete, Undo, Redo, zoom and Settings are in the menus (the buttons for them are gone).
- GUI: a double-click on a subcircuit shows what is inside it, also while the simulation runs (its context menu is off then)
- GUI: a click on a switch or button that moves the mouse a little is a click, it moved the component instead
- The error of a RAM or ROM whose binary file doesn't fit the data width says how many bytes a word has in the file
- GUI: rename a component with Name at the top of the settings pane. The name is in the VCD file and in Python, the wires, place and shortcut follow it, and a name you gave it stays when it changes to another IC or file.
- GUI: clearing the file of a Verilog component, ROM or subcircuit in the settings says that it needs a file. It tried to read the circuit's folder as the file and showed an error about that.
- GUI: an IC, a Verilog component or a subcircuit that is changed to another IC or file in the settings is named after it, it kept the old name. A flip-flop changed to another kind gets the name of the new kind.
- GUI: an oscillating circuit no longer makes the application look hung: Stop, clicks and keys work at once (Stop took 45 s), the simulation time turns red while it is slower than real time, and the components that oscillate are marked, with a message that names their ports
- Circuit.run_within(seconds, ...) runs for at most a time on the clock, and Circuit.oscillating_ports() finds the ports that oscillate (at most for a time on the clock with max_seconds)
- GUI: a dark theme, View > Theme: System (the default, as the system's color scheme), Light or Dark
- GUI: a hex editor for the contents of a RAM or ROM, Edit Contents... in its context menu. Save writes the words in its file, text or binary, and the memory reads it again. A RAM without a file asks for one.
- GUI: the hex editor of a RAM shows the RAM as it is in the simulation, while it is stopped, with the words it wrote marked. Save As... dumps them to a file, Use as Contents makes them the contents of its file.
- RAM and ROM: reload_contents() reads the file again after it changed
- GUI: Flip Horizontal and Flip Vertical (Ctrl+Shift+H, Ctrl+Shift+V) mirror the symbols that rotate, like a MUX with its select input on top. The mirror is saved in the circuit file.
- GUI: a settings pane to the right of the circuit shows the settings of the selected component, instead of a settings dialog. Apply changes them, also the ones that change the ports (like the inputs of a gate or the width of a bus): the component is built again with the wires to the ports it still has. A new component gets the default settings and is selected, a file or an IC is asked for first. View > Settings Pane (F4) hides and shows it.
- A flip-flop with an asynchronous load in a gate netlist (the Yosys cells $ALDFF and $ALDFFE) follows the load value while the load is active, like the functional $aldff. Before, it only took the value when the load started.
- New ICs: 74164 (8-bit serial-in, parallel-out shift register) and 74165 (8-bit parallel-in, serial-out shift register)
- New ICs: 74161 and 74163 (binary counters), 74157 (quad 2-to-1 multiplexer), 74139 (dual 2-to-4 decoder), 74148 (priority encoder), 74173, 74374 and 74574 (registers with tristate outputs), 74245 (bus transceiver), 4021 (parallel-in shift register), 4029 (up/down counter, binary or decade) and 4094 (shift-and-store bus register)
- GUI: rotate gates and the other components drawn as a symbol (the tristate buffer, MUX, decoder, demultiplexer and the bus splitters), a quarter at a time, with Rotate in the context menu or Edit > Rotate (Ctrl+R). Wires to a rotated component leave its ports in the directions they face, and the rotation is saved in the circuit file.
- New component: Splitter, a bus split into groups of bits, like [7:4] and [3:0], or groups merged into a bus.
Splitter(circuit, groups=[4, 4]), and in the GUI under Bus / Wires. - Verilog
inoutports, of any width: a bidirectional port of a Yosys component (PortInOut) drives the wire with what the design drives on it, "Z" while it doesn't, and the design reads the value of the wire, resolved with the other drivers. Wire two inout ports both ways (a.data.wire = b.dataandb.data.wire = a.data). Before, an inout port was an input and the design didn't drive it. - GUI: the ports of ICs and Verilog components are arrows that show their direction, an input points into the component and an output out of it
- GUI: the port of a Wire Source is at the tip of its tag, it was a little inside it
- GUI: inout ports are drawn as a diamond. They drive their line and read it, so two inout ports on a line drive each other.
- New Python example, examples/yosys_inout: two registers with an inout data port on a shared bus
- New GUI example circuit, bidirectional_port.circuit: two walkie-talkies, the same Verilog module twice, that talk over one bidirectional bus wire
- A register on the global clock (
always @($global_clock), the Yosys cells$ffand$_FF_) gives the same error for gates and functional synthesis, "Unsupported Yosys cell ... DigSim has no global clock", and Reload finds it before it takes the component apart - New components: RAM and ROM, in Python and in the GUI. They have 1–20 address bits and 1–32 data bits, are clocked (on the rising or falling edge) or asynchronous, and can have an output enable for a shared bus. The ROM is filled from a file, a RAM can be. The file is binary or text with hexadecimal words like Verilog's $readmemh reads.
- Mem64kByte is removed, use RAM(circuit, address_width=16, data_width=8, path=..., load_address=...) instead. The yosys_6502 example uses a RAM.
- GUI: a Probe shows the value of a wire or a bus, in hexadecimal, decimal or binary. Add probe in the context menu of a wire puts one on it.
- GUI: a menu bar, with File (New, Open, Save, Save As, Quit), Edit (Undo, Redo, Delete, Settings), View (zoom), Simulation (Start, Single Step, Reset) and Help. Save saves in the circuit's file without asking, and the window title shows the file, with a * when the circuit has changed.
- GUI: a component search above the component selection. Ctrl+K (or Ctrl+F) and a few letters, like "flp" for the flip-flop, list the components that match. Drag one into the circuit, or press Enter to add it.
- GUI: copy, cut, paste and duplicate (Ctrl+C, Ctrl+X, Ctrl+V, Ctrl+D) of the selected components, with the wires between them. A paste lands at the mouse pointer, and works between DigSim windows.
- GUI: Zoom to Fit (Ctrl+0 or Home) shows the whole circuit in the window
- GUI: File > Export Image (Ctrl+E) saves the circuit as a PNG or SVG image
- GUI: File > Open Recent, with the last eight circuits opened or saved
- New components: Adder, Subtractor, Multiplier, Comparator and Negator, of 1–32 bits, in Python and in the GUI
- New component: Counter, with a width, an optional clock enable, up/down and load, in Python and in the GUI
- New components: Decoder and Demultiplexer, and the MUX can have 16 inputs
- GUI: Simulation > Step Clock (F10) runs to the next rising edge of a clock and lets the logic settle, to step through a CPU one clock cycle at a time
- The Logic Analyzer samples an input that changes at the time of a sample, like on a clock edge, with its value from just before. Before, a clock could look uneven, depending on the order of the events at the same time.
- GUI: the Logic Analyzer is cleared when the circuit is reset, like the VCD file starts over
- GUI: a switch clicked while the simulation is stopped changes the circuit at once: it runs for 10 µs so that the change goes through it. Before, the switch changed but the rest of the circuit only when the simulation ran.
- GUI: tabs, a circuit in each. File > New Tab (Ctrl+T) and Close Tab (Ctrl+W), and Open opens a circuit in a tab of its own. Only the tab that is shown simulates.
- New components: In, Out and InOut, the ports of a circuit (CircuitInput, CircuitOutput and CircuitInOut in Python, and Circuit.ports()). They name the interface of a circuit for a subcircuit, and work as inputs and outputs in the circuit itself: Set Value... in the context menu of an In or an InOut sets its value.
- Subcircuits: SubCircuit(circuit, path) uses another circuit file as a component, through the In, Out and InOut ports of the file. A subcircuit can use subcircuits, and reload() builds it again after its file changed.
- GUI: a Subcircuit component, a circuit file used as a component, with Reload in its context menu
- GUI: Edit Subcircuit opens the file of a subcircuit in a tab, and saving a circuit builds the subcircuits of its file in the other tabs again
- GUI: View Subcircuit shows the inside of a subcircuit in a read-only tab, with the values of the simulation of its circuit, which goes on while the view is shown
- New GUI example circuits, half_adder.circuit, full_adder.circuit and adder_4bit.circuit: a 4-bit adder from full adders from half adders, subcircuits. New Python example, examples/subcircuit.
v1.8.0¶
- GUI: a new look. All components are drawn in one style: gates, LEDs, buffers and bus splitters as symbols only, devices like switches and displays with a white body, on a light background with a grid of dots. Most components are smaller, a selected one is blue, and green means on everywhere.
- GUI: gates with more inputs keep the shape of a two-input gate, with a line on the back for the inputs, and from three inputs the inputs are 10 pixels apart, so a gate with many inputs isn't tall and thin. A circuit saved before gets a short step in the wires to those inputs.
- GUI: the hex digit, the 7-segment display and the LED bar have a white window, with the segments and LEDs that are off in a pale tint of their color
- GUI: a new application icon in the new look, a white square wave on blue. On Linux the icon of the desktop entry is updated the first time the new version starts.
- Docs: a new guide, Your First Verilog Component: a new circuit with a Yosys component from a new Verilog file, a half adder written in the editor
- Verilog files reached through a link to an absolute path, like a project folder that is a link, can be synthesized. The WebAssembly Yosys doesn't follow such links and reported "file not found", now it gets the real path. This also makes files in /tmp on macOS work.
- A Verilog file that the WebAssembly Yosys can't read (in /tmp on Linux, in /share, directly in /, or a network path on Windows) gets a message that says why instead of "file not found", and New Verilog file asks for another folder
- Docs: an About page, with the history of DigSim and how AI has been used in its later stages
- GUI: Bus2Wires and Wires2Bus are drawn as a bus bar with an entry for each bit, numbered, and the width of the bus on it
- LEDs and LED bars have a color: red, green, blue or yellow (
colorin Python, a setting in the GUI). An LED looks like an LED, and glows when it is lit. - GUI: a circuit saved before keeps the routes of its wires where its components got smaller, with a short step at the ports that moved
- New GUI example circuit, traffic_light.circuit: the traffic light state machine (traffic_light.sv) with a reset and a request button, and red, yellow and green LEDs
- Verilog parameters:
Synthesis(..., parameters={"WIDTH": 16}),YosysComponent(..., parameters=...)andpython -m digsim.synth synth -p WIDTH=16synthesize the top module with other values for its parameters. A Yosys component keeps them in a saved circuit, and Reload and the Verilog editor synthesize each component with its own parameters. - GUI: Build > Parameters... in the Verilog editor shows the parameters of the module and their defaults, with the values of each component of the file, and synthesizes the components with new values.
Synthesis.list_parameters()lists the parameters of a module, andpython -m digsim.synth listlists each module's parameters with their defaults. - Python 3.15 support
v1.7.1¶
python -m digsim.verilog formatwithout -i writes a file with Windows newlines (\r\n) to the terminal without an extra \r on each line on Windows
v1.7.0¶
- The LED bar is a column of LEDs drawn like the DIP switch, with one input for each LED instead of a bus input, so it can be wired straight to a DIP switch. A LED bar in a circuit file from before loses its wire.
- GUI: a Verilog editor, Edit Verilog... in the context menu of a Yosys component. It colors Verilog like Emacs verilog-mode, and has line numbers, find and replace, go to line, indenting and commenting out lines. It notices when the file changes on disk.
- GUI: Synthesize (Ctrl+B) in the Verilog editor saves and synthesizes the file in the background, shows each step, the errors and warnings on their lines and the Yosys log, and updates the components of the file. Closing the editor offers to synthesize the saved file when its components were not updated with it.
- GUI: Format (Ctrl+Shift+I) in the Verilog editor indents the file with the Verilog formatter
- GUI: a Yosys component can start from a new Verilog file: choose New Verilog file when you add it, and the file is created with a module and opened in the editor. A file that exists is never replaced: use it as it is or choose another name.
- GUI: the settings of a Yosys component (functional blocks and internal signals) can be changed with Settings in its context menu. A component made from a netlist isn't asked about synthesizing.
- GUI: Reload works when the ports of the Verilog module change. It lists the changes and the wires to ports that are gone or changed, and removes those wires. Every component made from the file is reloaded, and the other Yosys components keep the netlists they have. Reload always synthesizes again, so it picks up a change in an included file or a $readmemh data file.
- A Verilog file that was synthesized before, with the same contents, is not synthesized again: a second Yosys component of the file, and undo and redo in the GUI, are faster. YosysComponent.synthesize_file() synthesizes a file the same way.
- Verilog formatter:
python -m digsim.verilog format(andVerilogFormatterin Python) indents Verilog and SystemVerilog files by their blocks and brackets, and only changes whitespace - The internal signals of a Yosys component (signals=True) are written with the names of their values when they have them, as "state_name" next to "state", which is written as a number. Every signal with an enum or with the width of at least two parameters gets them, states only adds more. The GUI has no field for the states any more, and its checkbox says what is written.
- GUI: the dialogs only have a close button (no minimize or maximize), and the small settings dialogs have a fixed size
- GUI: dragging a component shows only the see-through preview in the circuit area, not also a drag image (which X11 showed next to it)
- GUI: a wire being drawn is shown also when the view has scrolled away from where the last one was drawn. It could stay invisible until it was finished.
- GUI: starting the simulation right after a single step doesn't hang
- GUI: the second click on a dot selects the wires of its line, also where another line has a corner at the same place
- New ICs, written from their datasheets and tested against them: the 74181 ALU, 74182 carry look-ahead, 74283 adder, 7485 comparator, 74138 decoder, 74151 multiplexer, 74193 up/down counter, 74194 and 74595 shift registers, the 4017 decade counter and the 4511 BCD to 7-segment driver
- The 74162 IC is a new implementation, written from its datasheet. The earlier one came from a GPL-3.0 licensed project, which doesn't fit the license of DigSim.
- The IC selector has a search field: type a number, or words of the description like counter or shift, also with skipped letters, and pick from the ICs that match
- Several outputs can drive the same input: it has the value they drive, and "X" when they drive different values or one of them drives "X". Tristate outputs don't count while they don't drive ("Z", high impedance). New component: TristateBuffer.
- Verilog outputs that can be 'bz are tristate outputs of Yosys components. Tristate buses inside a design are merged by Yosys.
- The 74595 IC has its output enable (OE_bar): the outputs QA–QH are tristate and can share a bus
- GUI: wires that are connected make one line, and every output on it drives every input on it. A new wire can start or end on any wire, and connect any two ports, also two inputs or two outputs. The whole line shows the value its outputs drive together: blue when nothing drives it, red when they drive different values. New component: Tristate Buffer.
- New GUI example circuit, tristate.circuit: four values share one bus to a hex digit through tristate buffers, enabled with a DIP switch
- Circuit files store each line of wires as a graph: its ports, the points where its wires turn or meet, and the segments between them. The connections follow from the lines. Files from older versions load as before and are saved in the new form, which is also more compact. The example circuits are saved with lines. Circuit.from_json_file() also loads the connections of a GUI circuit file.
- GUI: a dot is drawn where a line goes three or more ways. A click on a wire selects the piece between the closest ports and dots, a second click the whole line, and Del deletes just the selected pieces. A click on a dot selects it, the next click the wires that meet there, and the next the whole line.
- GUI: dots, joints and segments at ports can be dragged, and the wires that meet there go with them. A new wire starts on a wire from the context menu, Start wire here (it replaces Add joint). Merge segments removes a joint where the wire runs straight.
- Synthesis always uses the bundled Yosys (YoWASP), also when another yosys is installed
- GUI: a circuit file where an output of a line doesn't drive all of its inputs (a Python circuit file, or one from an older version) gets the missing connections when it is opened, with a warning that lists them
- GUI: when a component of a line can't be loaded, or a pair of its ports can't be connected, the other ports of the line are still connected
- GUI: a port whose width no longer matches its line (a Verilog module that was changed) is left off the line when the file is opened, with a warning, instead of being drawn on it unconnected
- Yosys netlists simulate faster, about 35% for gate-level netlists and 8% for functional ones, with the same events in the same order
- A component deleted with
Circuit.delete_component()no longer sets its old wires from an event it had in the queue Circuit.run()andrun_until()round the time to whole nanoseconds,run(us=1.001)ran for 1000 ns- A loaded circuit keeps the wires of a component whose name is also the name of a part of another component, like a gate of an SR latch, instead of wiring that part
- GUI: a new Hex Digit has the decimal point input and a new Logic Analyzer samples at 100 Hz, the same defaults as in Python
- YosysComponent and IntegratedCircuit have no name argument: they always took the name of the Verilog module, whatever name was given. The arguments of YosysComponent after path are keyword-only.
- An input whose last wire is removed is "X", like an input that was never connected. It kept the last value it was driven with, so in the GUI a gate behind a deleted wire acted as if the wire were still there until Reset.
v1.6.0¶
- Add "Verilog Testbench with pytest" to the documentation, a walkthrough of testing a Verilog design with DigSim and pytest, with waveforms of the tests
- Synthesize Verilog into functional blocks, like adders, multiplexers and registers, instead of gates, for a faster simulation: Synthesis(..., functional=True), "--functional" for "python -m digsim.synth synth", and a "functional" setting (a checkbox in the GUI) for Yosys components loaded from Verilog
- The 6502 example runs the CPU synthesized into gates or, with --functional, into functional blocks, and prints how many clock cycles it simulated per second
- Yosys netlists from other synthesis flows can be simulated, with the cells $alu, $lcu, $fa, $macc_v2, $lut, $sop, $bweqx, $concat, $slice and $tribuf
- Functional blocks send the bits of a port to each other as one word, which makes the simulation of a functional netlist faster
- Yosys components can make their internal signals readable and write them to the VCD file (signals=True), with the states of state machines as names, from SystemVerilog enums or parameters. SystemVerilog (.sv) files can be loaded. New example: examples/yosys_fsm
- The waveform images of the documentation show text signals, like the state of the traffic light example
- The file dialog of a Yosys component shows netlists, Verilog and SystemVerilog files at first
- Update Yosys (yowasp-yosys) to 0.70 and pydantic to 2.14.1
- Pin yowasp-runtime, which runs Yosys in DigSim, to 1.96
- Pin the versions of ruff and the test tools in CI
- Add a table to the documentation (Home) that compares DigSim with Logisim Evolution, Digital, cocotb and DigitalJS, linked from the README
v1.5.0¶
- Wires in the GUI are made of horizontal and vertical segments, and the shape of each wire is saved with the circuit. Circuits without wire shapes load with the automatic route, like before.
- Click in the circuit area while drawing a wire to add corners, and press Backspace to remove the last one. The finished wire keeps the shape it was drawn with.
- Select a wire to reshape it: drag a segment by the dot in its middle, right-click a segment to split or merge it, or choose "Automatic route" to get the automatic shape back. When a component moves, only the segments at its ports follow it, and the wires between components that are moved together move with them.
- Wire trees: the wires from one output port can share the way. Click a corner of a wire to start a new wire there, or end a wire drawn from an input port anywhere on a wire with the same width. Right-click a wire and choose "Add joint" to put a corner on a straight part of it. A branch leaves its wire across it, with a dot where it starts.
- A click on a wire selects it from the closest split to the input ports it leads to, and a second click, or "Select wire tree" in its context menu, selects the whole tree. Del deletes the selected part and keeps the parts that other wires use.
- Bugfix: A wire that could not be connected, like to an input that already has a wire, added an undo step that did nothing and cleared the redo steps
- Bugfix: Components moved together with other selected components went back to their old place on undo, save or load
- Add a randomized test of the GUI (tools/gui_fuzz.py) that builds and edits circuits with mouse actions and checks the GUI against the circuit after each step, and a gui-tester agent for Claude Code that runs it
v1.4.0¶
- Add a script that takes the screenshots for a GUI tutorial in the real application
- Add "Your First Circuit", a step by step guide with screenshots to building and simulating a circuit in the GUI, and group the GUI pages in the documentation
- Bugfix: Circuits saved on Windows stored file paths with backslashes and could not be loaded on Linux or macOS. Paths are now stored with "/", and old files with backslashes load on all systems.
- Circuit.to_json_file() stores file paths relative to the JSON file, and from_json_file() reads them from the file's folder by default, so a saved circuit loads from any working directory. Files saved by older versions with such paths load with folder=".".
- More tests for how Yosys components are wired from a netlist
- The Yosys netlist model only reads the parts of a netlist that DigSim uses. Net names, attributes and cell parameters are no longer stored.
- Simpler Yosys netlist nets: NetPort names its cell (None for a module port) instead of holding the cell or module object, and loading the 6502 netlist is about 30% faster
- Yosys components no longer add an empty "nets" component to the circuit, and the unused nets argument is removed
- Bugfix: A Verilog module with an input that it does not use, or a netlist with an unused cell output, could not be loaded
- Simpler Yosys component code
- Bugfix: A GUI object that subclasses another image object with its own image showed the base class image
- Correct the descriptions of several GUI object classes
- Remove unused and repeated code from the GUI objects
- Simpler port handling in the GUI objects
- GUI objects choose whether to show the component name and port names with the SHOW_NAME and SHOW_PORT_NAMES class attributes, described in the guide for adding components
- NamedBoxObject: a base class for GUI objects drawn as a box with their name, like ICs, described in the guide for adding components
- Simpler label wire GUI objects, which no longer choose their shape by looking for "in" in a text
- The DIP switch only repaints the circuit when the mouse moves to another switch, not on every mouse move
- The DIP switch GUI object draws itself in paint_component(), like the other GUI objects
- The guide for adding components says that mypy reports a GUI object without paint_component() or paint_selectable_component()
- Bugfix: Ctrl+Z, Ctrl+Y and Del changed the circuit while the simulation was running
- Bugfix: Wires could be selected while the simulation was running
- Bugfix: The Delete button stayed disabled after selecting a component or wire
- Fix the grammar of the question before a circuit is replaced, and add the missing Zoom in tooltip
- Remove unused code and correct docstrings in the main window, circuit area, top bar and component selector
- Simpler mouse wheel zoom code
- The component selector and circuit area are placed side by side without a splitter, which showed a grip that could not be dragged
- Bugfix: Settings on a Static Value component showed "Unknown settings type" instead of the value slider
- Bugfix: A new Note placed without editing its text was empty instead of showing the default text
- Bugfix: An update frequency from a circuit file that is not in the settings list was lost when the settings were saved, and the next simulation start failed
- Simpler component settings dialog code
- The default application settings are kept in the model instead of the settings dialog
- Bugfix: Pressing Del with nothing selected added an undo step that did nothing
- Bugfix: Bring to front and Send to back could not be undone on their own
- Bugfix: A circuit file with an update frequency of 0 or an unknown setting value made the simulation fail to start. Such settings are now ignored.
- Remove unused code and correct docstrings in the application model
- Bugfix: For a moment after a single step, the GUI treated the simulation as stopped while its thread still used the circuit, so it could be changed under it
- Bugfix: A circuit file that is valid JSON but not an object (like a list) raised TypeError instead of being reported as malformed
- Bugfix: Loading a folder or a file without read permission raised an exception instead of showing an error
- Bugfix: A circuit file with an unknown component type, or a setting that a component does not have, stopped the whole load instead of giving a warning for that component. Types that are not components are refused.
- Bugfix: Components from circuit files without display names got an empty name in the GUI
- Bugfix: A circuit with a dot in a component name could be saved but not loaded
- Simpler storage model code
- Bugfix: A synthesis whose console file could not be opened left two file descriptors open
- Bugfix: python -m digsim.synth ended with a traceback when the output file could not be written, and printed "ERROR:" twice
- Bugfix: The error for reading a component's wire showed a method instead of the component name. The unused Component.settings_from_dict() is removed.
- Bugfix: Changing several settings of a component reconfigured it once per setting, partly with the old settings
- Port.disconnect() only disconnects a port that it drives, a wrong call no longer cuts another connection
- Simpler simulation core code, and Circuit.run() and run_until() are typed to take float times
- Bugfix: When a bit of a bus became undefined, VCD files kept showing the old bus value
- Document Circuit.process_single_event(), which processes one event at a time
- Docstrings that describe each component's ports and arguments, and the arguments, return values and errors of the main Circuit and Synthesis methods
- Add an API Reference to the documentation site, generated from the docstrings, and make the navigation section titles and page titles stand out more
- Restructure the documentation site into GUI, Python, API Reference and Project sections, and split the components guide into a Python page and a GUI page
- Remove the unused Component.delete_all_ports()
- Bugfix: Circuit.clear() kept the pending events of the removed components
- Update the GitHub Actions in all workflows to their newest versions, which run on Node 24
- The GUI circuit screenshots in the documentation are the same every time they are regenerated
- Component parameters are typed with the Parameter TypedDict, so mypy checks their keys and types
- The shift register screenshot in the documentation shows no undefined wires
- Bugfix: Settings missing from a loaded circuit file kept the values of the circuit loaded before
v1.3.0¶
- Bugfix: Error and close dialogs were not attached to the main window
- Use the Qt 6 mouse event API (no DeprecationWarning from QMouseEvent.pos())
- Dragging from the component selector starts when the mouse moves, not on every click
- Use the Qt 6 exec() instead of the Qt 5 exec_() for dialogs, menus and drags
- Painting components no longer changes pens shared by all components of a type
- Add the changelog to the documentation site
- Simpler sentences in the documentation
- Bugfix: Deleting a component left the components it is built from in the circuit
- Circuit can be used in a with statement, which closes its VCD file at the end
- Bugfix: Reloading a Yosys component kept its old gates in the circuit
- Bugfix: The SR latch outputs Q and nQ were treated as inputs
- Bugfix: The JK flip-flop toggled when K was undefined
- Bugfix: Initializing a circuit again did not reset the T flip-flop output
- Bugfix: The logic analyzer could draw a signal one sample short
- Simpler on/off switch code, which no longer sets its output twice at init
- Bugfix: HexDigit.dot_active() without a digit failed for a single digit
- Bugfix: A label wire with a label already in use was left in the circuit
- Simpler label wire code
- Bugfix: MemStdOut printed characters while its write enable was undefined
- Bugfix: A component that failed to load was left in the circuit
- Simpler Yosys component code
- Bugfix: Yosys flip-flops could miss the first clock edge after the circuit was reset
- Fix a typo in the error message for an unknown Yosys cell level
- Bugfix: Loading a circuit changed the stored component paths, so a second load failed
- Bugfix: Synthesis failed for Verilog files in a folder with a space in its name
- Simpler Yosys netlist code
- Bugfix: Shortcut keys stopped working after undo, and a shortcut to a missing component stopped the circuit from loading
- Bugfix: Loading a missing or broken circuit file crashed the application instead of showing an error
- Bugfix: A buzzer kept its old tone after the tone was changed in its settings
- Bugfix: A broken Yosys JSON netlist stopped a circuit from loading instead of giving a warning
- Bugfix: Reloading a Yosys component whose file was moved raised an exception instead of a warning
- Circuit.adding_components() removes the components a failing block added
- Bugfix: A dropped component that failed to build, like a Verilog file with errors, raised an exception and left parts of it in the circuit
- Bugfix: Turning VCD output off and on again in the GUI did not write the VCD file anymore
- Bugfix: A VCD file that could not be opened left the circuit unable to run or start another VCD
- Bugfix: Choosing a VCD file that cannot be written raised an exception instead of showing an error
- Bugfix: Saving to a folder that cannot be written raised an exception instead of showing an error
- Components built from other components no longer initialize their parts a second time. This only changes the first nanoseconds of the VCD files of Yosys designs.
- Remove the unused Port.width setter, which did not resize the bits of a bus port
- The IC selector lists the ICs sorted by name
- Bugfix: The buzzer clicked once a second for all tones except A
- Bugfix: Label wires were shared by all circuits in a program, so two circuits could not use the same label. The labels in use are now read with Component.get_circuit_parameters(circuit).
- Bugfix: Deleting a label wire driver in the GUI made the next reset or start fail
- Label wires are shown while they are dragged into the circuit area, with the label they get when dropped
- Bugfix: A button press or release just before the simulation stopped was handled at the next start, also after a reset
- Bugfix: Saving a Yosys component created from a netlist object stored the path "None". It now gives an error.
- Bugfix: A new component could take over the shortcut key of a deleted component with the same name
- A label wire output without a matching label wire input gives a warning when the circuit is initialized
- Keep at most 100 undo steps, so memory use does not grow during a long session
- Yosys gate cells propagate undefined inputs ("X") as in Verilog, instead of treating them as 0. The simulation results are the same, but VCD files show X until a design has settled after the start.
- The Fibonacci synthesis example starts with clock and reset low, so they are not undefined at the start of its waveforms
- Drop support for Python 3.10, which has reached its end of life. DigSim requires Python 3.11 or newer.
- Simpler documentation image script, using contextlib.chdir from Python 3.11
v1.2.0¶
- Update pyside6 to 6.12.0
- Add Application icon for Wayland
- Publish documentation at https://freand76.github.io/digsim/
- Rewrite README and documentation with separate install/run options
- Bugfix: Circuit.from_json_file() no longer requires a folder argument
- Add type annotations to the whole package (checked with mypy)
- Bugfix: Crash on init for Yosys async-load flip-flops with enable (ALDFFE*)
- Bugfix: Crash instead of error dialog when a loaded circuit cannot be built
- Bugfix: Synthesis crashed when given a pathlib.Path
- Bugfix: Wire Source/Sink (label wires) lost their connections
- Bugfix: Desktop menu entry started nothing and pointed at a stale interpreter
- Fix "Similation" typo on the simulation start/stop button
- Document all examples with circuit diagrams, expected output and waveforms
- Add guides for creating components and for contributing
- Add XNOR gate (2 to 8 inputs)
- Add LED bar component, a row of LEDs showing the bits of a bus
- Faster VCD output (2.3x faster simulation of the 6502 example with VCD)
- Faster simulation (1.8x on the 6502 example)
- 6502 example: VCD output is optional, enabled with --vcd [FILE]
- Run Yosys in-process instead of through an interactive terminal (pexpect), about 3x faster synthesis
- Bugfix: Crash when loading or changing a circuit right after stopping a simulation
- Bugfix: Dropped components land centered under the mouse pointer
- Show a preview of the component while dragging it into the circuit area
- Silence harmless Qt Wayland text-input warnings in the terminal
- Running from source with
uvx .always uses the current code - Bugfix: Garbled package description on PyPI
v1.1.0¶
- Update python packages
- Fix ruffing in code
- Fixed windows test github action
v1.0.0¶
- Bugfix: Fix bad signal path
- Bugfix: Disconnect signal before GUI component removal
- Cleanup path handling
v0.22.0¶
- Remove dependency to pkg_resources (due to deprecation)
v0.21.0¶
- Add requirement to setuptools (for pkg_resources)
v0.20.0¶
- Add current version in window title bar
- Bugfix documentation
v0.19.0¶
- Fix problems with script
v0.18.0¶
- Add executable 'digsim-logic-simulator'
v0.17.0¶
- Update uv test scripts
- Clear venv before creating it
- Use python 3.13
- Add uv_ruff.sh script
- Use "uv sync" instead of "uv pip install ."
- Add python 3.14 support to project
- Run pytest with python 3.14 (uv_run_test.sh)
- Update to yosys 0.60.0
v0.16.0¶
- Update pyside6 package to 6.10.0
- Update uv test scripts
- Update to yosys 0.59.0 (And update yosys netlist reader)
v0.15.0¶
- Avoid creating new wires when simulation is running
- Start/Stop simulation with space key
- Abort ongoing new wire when simulation starts
v0.14.0¶
- Drop python 3.9 support
- Remove abc from yosys synthesize script
- Update pydantic and yowasp-yosys packages
v0.13.0¶
- Fix validation "0", "1", "X" in yosys netlist
- Fix value type in _port.py (int, "X" or None is valid)
- Remove None from value type in _port.py (int, "X" is now valid)
- Optimize simulation with the help of Gemeni
- Use pathlib everywhere (and not os.path)
- Optimize event handling (suggestion from Gemini)
v0.12.0¶
- Use default audio output
- Automatically find yowasp-yosys.exe binary on windows
- Use pathlib for examples and test
- Enable github/action for testing of python3.13 in windows
v0.11.0¶
- Fix settings load bug
v0.10.0¶
- Fix reload bug: Adding/removing port
- Fix shortcuts load bug
v0.9.0¶
- Use pydantic to load yosys netlist
- Update ruff github action
- Update to yosys 0.57.0
v0.8.0¶
- Prepare for release 0.8.0
- Bugfix netlist readed after yosys update
- Update python packages
- Some more mypy checking
- Add types to _port.py file
- Fixed some mypy checking
- Update pyproject.toml to silence warnings
- Update bash script to use latest version of pypi packages
v0.7.0¶
- Upgrade pypi packages and prepare for release 0.7.0
- Add script to run pytest through uv
- Use uv for scripts
- Add python 3.13 to project
- Use ruff 0.9.7 to format files
- Update the python packages to "latest"
- Fix version in changelog
v0.6.0¶
- Block bad pyside version 6.8.0
v0.5.0¶
- Added pytest verilog testbench example
- Update python dependencies (yosys/pydantic/pyside6/...)
- Update to ruff 0.6.9 (And fix code that ruff thought was bad)
- Drop python 3.8 support
v0.4.0¶
- Make it possible to use locally installed yosys
- Use ruff for python formatting and linting of code
- Fix issue #3 (AttributeError when trying to delete objects)
v0.3.1¶
- Fix path in examples to work with github action
v0.3.0¶
- Use relative path in examples (for windows / yosys)
- Use alternative pexpect spawn function in windows
v0.2.0¶
- Use yowasp-yoysys for synthesis
v0.1.0¶
- Fix bug when detecting number of modules with yosys 0.9
- Improve error handling for yosys component
- Remove settings from pushbutton and switch
v0.0.1 - First Release¶
- Simulation of a digital circuit using a python
- Simulation of a yosys netlist using a python
- GUI application to build and simulate circuit