Skip to content

Conversation

@Timmmm
Copy link

@Timmmm Timmmm commented Oct 4, 2024

Adds an optional --instructions=N CLI argument which will stop the simulation after N instructions.

This is useful for benchmarking and profiling and sometimes debugging.

@jerryz123
Copy link
Collaborator

I wonder if the desired behavior can be achieved through using the --debug-cmd flag, which lets you specify a file of interactive debug commands. Does setting the file to be

rs <some number of cycles>
q

achieve the same effect?

@Timmmm
Copy link
Author

Timmmm commented Oct 4, 2024

Doesn't seem to - it does stop the simulation but it just drops you into the REPL rather than exiting.

In any case it's a far less convenient and discoverable interface.

@Timmmm
Copy link
Author

Timmmm commented Feb 6, 2025

Any chance of a review for this?

Copy link
Collaborator

@aswaterman aswaterman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes to the control flow make me a little nervous, but they are probably harmless. @jerryz123?

Copy link
Author

@Timmmm Timmmm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review!

@Timmmm Timmmm force-pushed the instruction_limit branch from a965833 to 784679a Compare February 7, 2025 12:12
@aswaterman
Copy link
Collaborator

Looks like you need to update the ci-tests to account for the API change.

Adds an optional --instructions=N CLI argument which will stop the simulation after N instructions.

This is useful for benchmarking and profiling and sometimes debugging.
@Timmmm Timmmm force-pushed the instruction_limit branch from 784679a to fdbcde2 Compare February 7, 2025 15:57
@aswaterman aswaterman merged commit cd692c4 into riscv-software-src:master Feb 8, 2025
3 checks passed
@Timmmm
Copy link
Author

Timmmm commented Feb 8, 2025

Thanks!

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.

3 participants