diff options
| author | Schuyler Eldridge | 2018-10-05 00:20:10 -0400 |
|---|---|---|
| committer | Schuyler Eldridge | 2018-10-12 12:44:02 -0400 |
| commit | 95d907bd87da1f339264633f12d40673aa7e2818 (patch) | |
| tree | 47be3fffbec5e4a1374db6adee17830e9f4b126a /scripts | |
| parent | ed709571876b68e4982d11db15d236752713b6a1 (diff) | |
Verilog renaming uses "_", works on whole AST
Summary of changes to firrtl.passes.VerilogRename:
- Use "_" to mangle names that conflict with Verilog
keywords (previously "$")
- Rewrite to operate on the whole AST to propogate mangled ports and
module names
- Make VerilogRename a Transform (was previously a Pass)
- Renames are now propagated
- Adds documentation for new VerilogRename
This makes the VerilogRename Transform (previously a Pass) use an
underscore ('_') instead of a dollar sign ('$') to mangle names that
conflict with Verilog keywords. This prevents problems with potentially
buggy tools that are not expecting '$' in Verilog names.
This reimplements VerilogRename to be safe for name collisions that may
occur anywhere in the AST, e.g., in ports, module names, circuit names, or
in any statements/expressions. Previously, names were only mangled in
statements and in place. This resulted in problems where renames of ports
in a child's namespace would not be guaranteed to be mangled the same way
in a parent's namespace. The algorithm is reimplemented to walk all
modules in reverse topological order (from leafs to main) and relying on a
RenameMap to track name changes.
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
