-
Notifications
You must be signed in to change notification settings - Fork 1k
Add configurable datacount for debug module #2105
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
Add configurable datacount for debug module #2105
Conversation
c4b3cf5 to
5a6f947
Compare
|
@aswaterman, @arrv-sc, could you take a look? |
|
I've mentioned this feature in #2086 |
This commit adds support for configuring the number of data registers available in the debug module. Previously, the debug module had a fixed datasize of 2, but now users can specify the number of data registers using the --dm-datacount option when running spike. The changes include: - Adding a datacount parameter to debug_module_config_t - Making dmdata a std::vector instead of a fixed array - Validating that datacount is between 1 and 12 - Updating the debug module to use the configured datacount - Adding command-line option to set datacount - Updating documentation in help output Signed-off-by: Farid Khaydari <[email protected]>
5a6f947 to
5397899
Compare
| std::find_if(debug_memory_regions.begin(), debug_memory_regions.end(), | ||
| [addr, len](const auto &range) { | ||
| return belongs_to_range(addr, len, range.addr, range.len); | ||
| }); |
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.
This is obviously going to perform somewhat more poorly than the old code, but I think that's OK in this context; Spike should not be spending much time in these routines in normal operation.
aswaterman
left a comment
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.
LGTM, thanks.
|
@arrv-sc I'll wait for your approval before I merge. |
|
LGTM! |
This commit adds support for configuring the number of data registers available in the debug module. Previously, the debug module had a fixed datasize of 2, but now users can specify the number of data registers using the --dm-datacount option when running spike.
The changes include: