[ImportVerilog][Sim] Added remaining Moore instructions for dynamic arrays, as well as the corresponding Sim dialect instructions#9944
Open
yuriyKulinchenko wants to merge 30 commits intollvm:mainfrom
Conversation
…ructions to the moore dialect - Added the 'OpenUArrayCreateOp' moore instruction, which creates a new dynamic array - Added the 'OpenUArraySizeOp' moore instruction, which fetches the size of a dynamic array - Added the 'OpenUArrayDeleteOp' moore instruction, which deletes a dynamic array Currently, this commit does not include support for the optional initializer expression when creating a new array: arr = new [n](init_expr);
…ructions to the moore dialect - Added the 'OpenUArrayCreateOp' moore instruction, which creates a new dynamic array - Added the 'OpenUArraySizeOp' moore instruction, which fetches the size of a dynamic array - Added the 'OpenUArrayDeleteOp' moore instruction, which deletes a dynamic array Currently, this commit does not include support for the optional initializer expression when creating a new array: arr = new [n](init_expr);
…ructions to the moore dialect - Added the 'OpenUArrayCreateOp' moore instruction, which creates a new dynamic array Currently, this commit does not include support for the optional initializer expression when creating a new array: arr = new [n](init_expr);
…l expression parameter. Modified codegen to support the expression parameter Note: This requires a bug fix in Slang to work as expected (PR for this will be made soon)
…ue in Expressions.cpp
…ype must match the result type)
…s in the Moore dialect. Added conversion between the Moore and Sim dynamic array types, as well as the dynamic array creation instruction. Currently, extract ops, size ops and the delete op are not supported.
…he corresponding conversion from the Moore dialect to the Sim dialect.
… a value to a specified index of an open unpacked array. This replaces the previously used blocking assign instruction, which I have found is not suitable for dynamic arrays. Added appropriate handling for dynamic array assignment expressions in expressions.cpp. I will likely need to modify the existing moore instructions for array manipulation to operate on array references instead of the raw array: This will be relatively easy compared to implementing the afformentioned assign instruction.
…ed corresponding conversion between the moore "OpenUArrayAssignOp" instruction and the new sim instruction .
…consistent. Added the "DynamicArrayDeleteOp" instruction to the sim dialect. Modified the type signature of the "OpenUArrayDeleteOp" so that it is possible to convert into the sim dialect. Consequently, I have modified the handling of the delete op in "Expressions.cpp". Added conversion between the "OpenUArrayDeleteOp" and "DynamicArrayDeleteOp".
…nversion from the "OpenUArraySizeOp" instruction in "MooreToCore.cpp".
…in the "AssignmentExpression" visitor
…ther test case for dynamic array assignment.
Removed unnecessary imports
Removed unnecessary imports from MooreToCore
…est cases accordingly
Contributor
|
@yuriyKulinchenko looks like some test failures have made their way in here |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Moore Operations
Sim Operations
Modified and added test cases to reflect changes made to the Moore ops for dynamic arrays