Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add option to reverse aggregate fields#34

Draft
Peter-McLean-Altera wants to merge 3 commits intop-ranav:masterfrom
Peter-McLean-Altera:feature/reverse_aggregate_fields
Draft

Add option to reverse aggregate fields#34
Peter-McLean-Altera wants to merge 3 commits intop-ranav:masterfrom
Peter-McLean-Altera:feature/reverse_aggregate_fields

Conversation

@Peter-McLean-Altera
Copy link

The intended use case for this feature is serializing data structures to a binary format compatible with SystemVerilog struct. In SystemVerilog, the last field in the struct is actually at the lowest address and the first field is in the highest address. By adding an option to reverse field serialization order, it's possible to interchange binary data with SystemVerilog when all struct members have the same byte alignment.

I did not add reorder to any aggregate type_info functions. As they are used now, I don't think it will change any functionality. Users of reverse_aggregate_fields would have to understand the binary compatibility issues

Please excuse the whitespace trimming in README.md.

Draft until tests added.

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.

1 participant