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

Update Namespaces and Default Output File #114

Closed WorldofKerry closed 1 year ago

WorldofKerry commented 1 year ago

Is your feature request related to a problem? Please describe. The current namespace and default output file system can be confusing. The default output file name is the function name, and the default namespace is the namespace of the entire Python runtime.

Describe the solution you'd like

  1. The default output file name should be the file in which the function is decorated in(not where it is declared, as the function may want to be imported and then decorated). This will require tracing the source of a function, for AST parsing.
  2. The default namespace should be the namespace specific to the Python file a function is being decorated in. How will this work if someone wants to combine the namespace of two+ files?

Describe alternatives you've considered Keeping everything the way they are. I don't think it's too common to have multiple modules in the same file in SystemVerilog.

Additional context Low priority, at last until module can be combined together.

WorldofKerry commented 1 year ago

Addressed