A free, open-source desktop application for digital design education. Draw combinational logic truth tables and Moore FSM ASM charts, generate correct VHDL-2008, simulate your design live, and export timing diagrams β all in one tool.
Built with Python 3.10+ and PyQt6.
Authors:
Oscar YÑñez SuΓ‘rez β Universidad AutΓ³noma Metropolitana, Unidad Iztapalapa Departamento de IngenierΓa ElΓ©ctrica
Erik RenΓ© Bojorges ValdΓ©s β Universidad Iberoamericana, Campus CDMX Departamento de Estudios en IngenierΓa para la InnovaciΓ³n
Omar PiΓ±a RamΓrez β Universidad AutΓ³noma Metropolitana, Unidad Iztapalapa Departamento de IngenierΓa ElΓ©ctrica
- Signal manager with scalar and bus (
std_logic_vector) support - Interactive truth table editor with don't-care support (
-,0,1) - Bus grouping / ungrouping
- One-click VHDL-2008 generation (concurrent
when-else, no processes)
- Visual ASM chart canvas β place states, connect transitions
- Three transition types: Unconditional, Diamond (single input), Hexagon (multi-input)
- Bus-aware hexagon condition minterms
- Moore output assignment via dialog (checkboxes for scalars, text for buses)
- Initial state marking with amber header
- ASM validation with errors and warnings before generation
- VHDL-2008 generation: three concurrent
when-elsestatements, no processes
- Cycle-by-cycle stepping or continuous run with adjustable speed
- Live timing diagram β logic-analyzer style waveform that updates in real time
- Amber glow ring highlights the current state on the canvas
- Input controls (dropdowns for scalars, text fields for buses) between steps
- Export timing diagram as PNG
- Project save / load (
.vhdltJSON format) - Dark mode β instant toggle, persisted across sessions
- Bilingual β English πΊπΈ / Spanish πͺπΈ, runtime switching, persisted
- Dirty tracking β window title shows
*for unsaved changes
- Python 3.10 or later
- PyQt6
# Clone the repository
git clone https://github.com/YOUR_USERNAME/vhdl-tool.git
cd vhdl-tool
# Create a virtual environment (recommended)
python -m venv venv
source venv/bin/activate # Linux / macOS
venv\Scripts\activate # Windows
# Install dependencies
pip install -r requirements.txt
# Run the app
python main.pyPyQt6>=6.4.0
In the Signals panel on the left, click + Input or + Output to add signals.
Set the Width to 1 for a single std_logic bit, or greater than 1 for a std_logic_vector bus.
For buses, you can also select multiple scalar input signals and click β Group β Bus to merge them into a single vector.
The truth table is generated automatically from your input signals β one row per input combination. Click any cell in an output column to cycle through 0, 1, and X (don't-care).
Use the Don't-care output generates dropdown in the toolbar to control how X values are emitted in the VHDL:
β(dash) β synthesiser choice ('-')1β cover the minterm0β don't cover
Set the Entity and Architecture names in the toolbar, then click β‘ Generate. The VHDL-2008 preview appears on the right. Click β Copy to copy to clipboard or πΎ Save .vhd to save to a file.
The generated architecture uses one concurrent when-else statement per output signal β no processes, fully synthesisable.
Add signals in the Signals panel on the right:
clkandrstβ clock and reset (added by default)- Input signals β the FSM's condition inputs (e.g.
x) - Output signals β the Moore outputs (e.g.
z)
Select the Place State tool in the toolbar and click on the canvas to place a state. Each state block has:
- An editable name at the top (click to rename)
- An output area in the middle (click to open the output assignment dialog)
- A οΌ condition button at the bottom
Double-click or right-click a state to mark it as the initial state β its header turns amber.
Click the output area of a state to open the Outputs dialog:
- Tick a checkbox to assert a scalar output (
'1') in that state - Type a bit pattern (e.g.
101) for a bus output - Unticked / empty signals default to
'0'
Click the οΌ condition button on a state to add a transition. Choose from:
| Type | When to use |
|---|---|
| Unconditional | The state always goes to the next state |
| Single input (Diamond) | Transition depends on one 1-bit signal |
| Multiple inputs (Hexagon) | Transition depends on multiple signals or a bus |
A condition block appears snapped below the state, connected by an arrow. Moving the state moves the condition block with it.
To edit or remove a condition, click the β condition button on the state.
Diamond exits: Y β (condition true) and N β (condition false), each pointing to a target state.
Hexagon exits: one exit per minterm (or custom labels), distributed alternately on the left and right sides. The number of exits is inferred automatically from the variable widths β a 2-bit bus generates 4 exits, two 1-bit signals also generate 4 exits.
Tip: A state with no condition block is a dead end β the validator will warn you.
Click β Validate to check your design. Errors (red) must be fixed before generating. Warnings (amber) are informational.
Click β‘ Generate to produce VHDL-2008. The architecture uses:
- One
when-elsefor next-state logic (failsafe:current_state) - One
when-elseper output signal (Moore: depends only on current state) - One
when-elsefor the state register (async reset + rising edge clock)
Click β Simulate in the toolbar. The tool validates the ASM chart first β if there are errors, it will report them and refuse to start.
The simulation panel slides in at the bottom of the window showing:
- Control bar β Reset, Step, Run, Pause, speed slider
- Input controls β one dropdown per 1-bit input, one text field per bus
- Live timing diagram β clock, state, inputs, and outputs update with every cycle
- βΆ| Step β advance one clock cycle using the current input values
- βΆ Run β run continuously; use the speed slider to control pace
- βΈ Pause β pause a running simulation
- βΉ Reset β return to the initial state and clear the diagram
Change input values between steps to explore different paths through the FSM.
The live diagram shows:
- clk β always-toggling clock lane
- state β coloured boxes per cycle showing the active state name
- inputs β green/red square waves for 1-bit signals; purple parallel lines for buses
- outputs β same style as inputs
The current state on the canvas is highlighted with an amber glow ring.
Click π Export Timing Diagram to save the current waveform as a PNG β ready for lab reports or course materials.
Use File β Save Project (Ctrl+S) to save your work as a .vhdlt file (JSON format). This saves both the combinational and sequential designs together.
The window title shows * when there are unsaved changes, and the app will prompt you to save before closing or opening another project.
Access Settings β Language to switch between English and EspaΓ±ol at any time β no restart needed.
Access Settings β Theme to switch between Light and Dark mode β also instant, no restart.
Both settings are remembered across sessions.
vhdl_tool/
βββ main.py # Entry point
βββ main_window.py # MainWindow, menus, project I/O, i18n
βββ requirements.txt
β
βββ ui/ # Qt Designer .ui files
β βββ main_window.ui
β βββ combinational_tab.ui
β βββ sequential_tab.ui
β
βββ widgets/ # PyQt6 widget classes
β βββ combinational_widget.py
β βββ sequential_widget.py
β βββ signal_manager_widget.py
β βββ truth_table_widget.py
β βββ asm_canvas_widget.py # QGraphicsScene/View canvas
β βββ asm_items.py # StateItem, DiamondItem, HexagonItem, β¦
β βββ asm_toolbar.py
β βββ vhdl_preview_widget.py
β βββ simulation_panel.py # Live simulation panel
β βββ timing_diagram_widget.py # Live waveform widget
β βββ condition_dialog.py
β βββ state_output_dialog.py
β
βββ models/ # Data models
β βββ signal_model.py
β βββ truth_table_model.py
β
βββ generators/ # VHDL code generators
β βββ combinational_vhdl.py
β βββ sequential_vhdl.py
β βββ asm_validator.py
β
βββ simulation/ # FSM simulation engine
β βββ fsm_engine.py
β βββ timing_diagram.py
β
βββ project/ # Save / load
β βββ project_manager.py
β βββ dirty_tracker.py
β
βββ i18n/ # Internationalisation
βββ __init__.py # tr(), set_language(), set_theme()
βββ en.py # English strings
βββ es.py # Spanish strings
βββ themes.py # Light / Dark colour tokens
This tool was designed for digital design courses. Students can:
- Design combinational circuits using the truth table editor
- Design Moore FSMs using the visual ASM chart editor
- Validate their design before generating VHDL
- Generate synthesisable VHDL-2008 with one click
- Simulate the FSM step by step, watching states transition live
- Export a timing diagram PNG for lab reports
Project files (.vhdlt) can be submitted as assignments and opened by the instructor for review.
- Mealy FSM support
- VHDL testbench generator from simulation trace
- More languages (French, Portuguese, β¦)
- State machine import from VHDL
- Simulation breakpoints and input scripting
Contributions are welcome! Please open an issue to discuss what you'd like to change before submitting a pull request.
- Fork the repository
- Create a feature branch (
git checkout -b feature/my-feature) - Commit your changes (
git commit -m 'Add my feature') - Push to the branch (
git push origin feature/my-feature) - Open a Pull Request
See CONTRIBUTING.md for full details.
This project is licensed under the GNU General Public License v3.0 β see the LICENSE file for details.
This means you are free to use, study, modify and distribute this software, provided that any derivative works are also distributed under the same GPL-3 license.
Built with PyQt6 β Python bindings for the Qt framework.





