Loading repository data…
Loading repository data…
shahed22 / repository
A Python-based tool for generating Verilog modules with features including customizable state machines, port definitions, and state diagrams using Graphviz. Ideal for FPGA and ASIC design workflows.
This application allows users to create Verilog modules with various features such as state machines, input and output ports, and more.
main.py: Entry point of the application.gui.py: Contains the GUI layout and related functions.utils.py: Utility functions for parsing and validation.verilog_generator.py: Functions for generating Verilog code.graph_utils.py: Functions for generating state diagrams using Graphviz.The Verilog Module Generator application follows these steps to create a Verilog module with a state machine:
Start Application
Enter File Name
Select Clock and Reset Type
Specify Ports
Choose Machine Type
State Machine Encoding
Enter Number of States
Define State Names and Codes
Generate State Diagram (Optional)
Create Verilog Module
File Output
+--------------------------------------+
| Start Application |
+--------------------------------------+
|
v
+--------------------------------------+
| Enter File Name |
+--------------------------------------+
|
v
+--------------------------------------+
| Select Clock and Reset Type |
+--------------------------------------+
|
v
+--------------------------------------+
| Specify Ports |
| - Input Ports |
| - Output Ports |
| - Wire Ports |
| - Register Ports |
+--------------------------------------+
|
v
+--------------------------------------+
| Choose Machine Type |
+--------------------------------------+
|
v
+--------------------------------------+
| State Machine Encoding |
| - Automatic |
| - Manual |
+--------------------------------------+
|
v
+--------------------------------------+
| Enter Number of States |
+--------------------------------------+
|
v
+--------------------------------------+
| Define State Names and Codes |
| - Automatic Encoding |
| - Manual Encoding |
+--------------------------------------+
|
v
+--------------------------------------+
| Generate State Diagram (Optional) |
+--------------------------------------+
|
v
+--------------------------------------+
| Create Verilog Module |
+--------------------------------------+
|
v
+--------------------------------------+
| File Output |
+--------------------------------------+
## Dependencies
- `tkinter`
- `graphviz`
- `re`
## Usage
1. Run `main.py` to start the application.
2. Enter the file name, select clock and reset types, and specify ports.
3. Choose encoding style and state machine type.
4. Click "Create Verilog Module" to generate the Verilog code and state diagram.
## License
This project is licensed under the MIT License.
<img width="369" alt="image" src="https://github.com/user-attachments/assets/921d4bdf-3330-4b03-9ff0-c33f7b9f0459">