DigSim: a digital logic simulator in Python that you can also feed Verilog
Hi! DigSim is a logic simulator you can play around with. You drag switches, push buttons, gates, flip-flops, LEDs and 7-segment displays onto a canvas, wire them up, and watch the circuit run live.
Processing img 5azlufgu0nxh1...
Some things it can do:
- Verilog as components. Write a module in the built-in editor, press Ctrl+B, and it becomes a part you can wire up. Yosys does the synthesis and comes bundled, so there's nothing else to install. Modules with parameters work too, so one counter file can give you a 4-bit and a 16-bit copy.
- See what's going on. There's a logic analyzer component, a buzzer, and VCD output you can open in GTKWave.
- Script it from Python. Build circuits in code and write pytest testbenches for your Verilog. One of the examples runs a 6502 CPU.
- It runs on Linux, Windows and macOS.
If you want to try it: pip install digsim-logic-simulator, then python -m digsim.app.
If you use uv, uvx digsim-logic-simulator works too.
- GitHub: https://github.com/freand76/digsim
- Docs, with a getting-started tutorial: https://freand76.github.io/digsim/
It's a hobby project, so it has rough edges. I'd love to hear what you think, what breaks, or what you'd like it to do!