-
Notifications
You must be signed in to change notification settings - Fork 298
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[OM] Rework ClassLike to use return style
This changes the OM dialect Class/ExternClass to use a return style field name/type specifier syntax and, for non-extern class, a terminator op in the style of hw.output. The ClassLike code requires updating their parser/printer for the new syntax. This change introduces two new inherent attributes for ClassLike: * fieldNames: array of string attribute corresponding to field names in definition order * fieldTypes: dictionary mapping field names to types The ClassLike code now provides an API to get the type of a field based on its name, abstracting the underlying attribute storage. The firrtl LowerClasses logic requires changes to use this API when constructing OM classes, as well as in the dialect conversion logic to handle the convering the stored types. The OM evaluator similarly is updated for the new field API. The OM linker is updated to skip constructing the field name to type map and instead using the getFieldType API provided by the classOp. The OM object field verifier also no longer needs to construct the field name to type maps and instead can just use the new API. Quite a few tests required updating for the new field syntax.
- Loading branch information
Showing
25 changed files
with
790 additions
and
595 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
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
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
Oops, something went wrong.