Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

slang-reflect: Add support to reflect Unions #1173

Merged

Conversation

Sustrak
Copy link
Contributor

@Sustrak Sustrak commented Nov 13, 2024

No description provided.

Copy link

codecov bot commented Nov 13, 2024

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.

Project coverage is 94.62%. Comparing base (85f61c6) to head (63aeb24).
Report is 40 commits behind head on master.

Files with missing lines Patch % Lines
source/ast/types/Type.cpp 0.00% 4 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1173      +/-   ##
==========================================
- Coverage   94.77%   94.62%   -0.15%     
==========================================
  Files         191      195       +4     
  Lines       47802    50181    +2379     
==========================================
+ Hits        45304    47486    +2182     
- Misses       2498     2695     +197     
Files with missing lines Coverage Δ
include/slang/ast/types/Type.h 100.00% <ø> (ø)
source/ast/types/Type.cpp 95.46% <0.00%> (+0.37%) ⬆️

... and 159 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 85f61c6...63aeb24. Read the comment docs.

This commit adds support to slang-reflect to support unions.
As SystemVerilog structs are not 1:1 translatable to C++, because, for
example, a C++ struct might not be stored as an array of bits as it is
done in SystemVerilog.
The SystemVerilog union is reflected as a struct
with a single member with the data of the union. Helper functions are
generated to retrieve the different members of the union with the
corresponding type.
* Make use of std::views:keys
* Fix typo in a comment
@MikePopoloski MikePopoloski merged commit 5a5d423 into MikePopoloski:master Nov 14, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants