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

Ensure Queue is empty before finishing simulation #90

Closed

Conversation

h0lyalg0rithm
Copy link
Collaborator

No description provided.

@h0lyalg0rithm h0lyalg0rithm requested review from klingaard and a user September 27, 2023 16:34
@h0lyalg0rithm
Copy link
Collaborator Author

@knute-sifive I added this assert to make sure there are no pending stores and the current model fails.Do you some ideas on this

@ghost
Copy link

ghost commented Sep 27, 2023

I ran the regression with your branch and the failure makes sense -- and doesn't. 😄

One of the tests terminates simulation after 1M instructions have retired:

olympia -i 1M --workload traces/core_riscv.zstf

which will leave "unretired" stores in the ROB. In other words -- that's ok!

This test works fine:

olympia --workload traces/core_riscv.zstf

@h0lyalg0rithm
Copy link
Collaborator Author

h0lyalg0rithm commented Sep 28, 2023

Oh I missed that.
Should I change the test cases to remove the instruction limit.

@ghost
Copy link

ghost commented Sep 28, 2023

Well, you can remove the instruction limit if you want, but the simulator should not die if a user wants to only generate a pipeout or report or whatever for just the first few million instructions.

In other words, I do not think this assert is required.

@h0lyalg0rithm
Copy link
Collaborator Author

Got it, Is there another way to get around this issue?
Its pretty useful when developing to know that all the instructions were correctly handled in the LSU

@ghost
Copy link

ghost commented Sep 28, 2023

You can make it a parameter to the LS to help with debugging. If you really want to get fancy, you can add a NotificationSource to Retire that is observed by LS. When Retire is completely drained AND is stopping simulation, that notification can be broadcasted, which LS can "hear" and set a boolean retire_done_and_is_drained_ and then you can check the ensure the LS issue queue is actually drained.

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