WorldofKerry / Python2Verilog

Transpiles a subset of Python functions into synthesizable SystemVerilog.
https://worldofkerry.github.io/Python2Verilog/
GNU General Public License v3.0
1 stars 0 forks source link

Add config file for generator parser #9

Open WorldofKerry opened 11 months ago

WorldofKerry commented 11 months ago

Quite a few assumed conventions should be configurable:

  1. Name of the standard I/O, e.g. start, valid, done ready, etc. Including the ability to configure them as active high or active low
  2. How the states (in the state machine) are named should also be configurable, e.g. the _state prefix

.ini files are currently used for the test cases. They could be used for this too, but moving to .toml may also be a good idea.

Could be implemented by passing an optional (file in the case of CLI, or dict in the case of package API), which can then be parsed and used to initialize the base Context class. Perhaps in the case of the package API, the context class could be passed instead?

Not too high priority, as if the user must, they can change the source code, primarily the defaults of the Context class.

WorldofKerry commented 10 months ago

Lacks purpose, now that Context class added in #73 contains default signal names.

Haxrox commented 9 months ago

What is the purpose of allowing users to change the standard I/O signal names? Similarly with the states naming convention

I like the idea of allowing users to select active high or active low