-
Notifications
You must be signed in to change notification settings - Fork 76
feat: isa sim overlap list generator #1185
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1185 +/- ##
=======================================
Coverage 46.05% 46.05%
=======================================
Files 11 11
Lines 4942 4942
Branches 1345 1345
=======================================
Hits 2276 2276
Misses 2666 2666
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for contributing!
I have a question: What's the use-case for this? To check if instruction inside UDB overlap encodings? I think this is already done and integrated with UDB in ./do.
I do prefer python for it instead of ruby, but I am not sure if that alone is a good enough reason to duplicate the way of doing this task.
Thinking about this again, having duplicate tools inside UDB isn't that big of an issue, as long as there's a good reason for this. This specific test would be something downstream users could rely on instead of using the main ruby code structure as they could run the python script directly. I am not sure about what I think of this. Would like to hear your opinion @AliAlaa88 |
I didn't notice the duplication but it was a suggestion from Paul so I did it. |
@AliAlaa88 Maybe it's not a duplication - but it would be good to understand that. Please do ./do --tasks and follow the tips to understand it. Moreover, maybe it's fine to have duplication, but if you understand this reasoning it will be benificial to both you and the project :) |
This pull request adds a new Python generator script and a corresponding Rake task to automate the detection of overlapping instruction encodings for simulators (such as Spike). The generator analyzes instruction definitions and outputs declarations for instructions whose encodings overlap, which is important for proper simulator handling. The Rake task integrates this generator into the build process, allowing easy regeneration of overlap declarations as needed.
New Overlap Detection Feature:
overlap_list_generator.py
script tobackends/generators/overlap_list/
, which loads instruction YAML files, analyzes their encoding patterns, and generates a list of overlapping instruction declarations for use in simulators.Build System Integration:
gen/overlap_list
to store generated overlap declarations.gen:overlap_list
Rake task that runs the Python generator, passing the correct instruction directory and output location. The task supports configuration via environment variables for output directory and filename.