Skip to content

creating verilog code based on a finite state machine

Notifications You must be signed in to change notification settings

NegarAskari/fsm-to-verilog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FSM to Verilog

Small Python project that converts a mealy FSM description into synthesizable Verilog code.
The created module will have an input wire for each input in the FSM and it is up to the user to make sure multiple inputs are not active simultaneously.
Also, the output will be in one-hot form and the encoding will be shown after the Verilog code is created.

FSM description

The description of your FSM should be in JSON format. The JSON file should include a list of inputs, outputs, and states, as well as a list of outgoing edges for each state. For example, the description of the FSM drawn below would look like this.

How to use

Write your FSM description in the "fsm.json" file and run "fsm_to_verilog.py". The output will be written to "output.sv" in the same directory.

About

creating verilog code based on a finite state machine

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published