-
Notifications
You must be signed in to change notification settings - Fork 574
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[codegen] Emit literal identifiers for numeric ids
Change the FIRRTL serializer to use literal identifiers if any identifiers begin with a leading digit. This is a FIRRTL 3.0.0 feature that simplifies parsing. This enables literal identifier emission anywhere. However, this code path is only reachable via MixedVec due to mangling of numeric names to add a leading underscore in all other circumstances. In the future, this commit will enable removing this restriction and switching to literal identifiers when this happens. No changes are made to annotation targets. E.g., the literal identifier, "wire `42`" in circuit "Foo" and module "Bar" is still referred to by a local target "~Foo|Bar>42". This is intentional (for now). Targets don't have parsing ambiguity like FIRRTL text and the name of this wire is still "42" not "`42`". It follows that the storage of this name in FIRRTL IR is not changed. This is the same way that this is handled in CIRCT. Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
- Loading branch information
Showing
2 changed files
with
107 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters