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

Scoreboard View Fix #468

Merged
merged 3 commits into from
Jan 23, 2024
Merged

Conversation

aarongchan
Copy link
Contributor

Scoreboard view is hardcoded to look for scoreboards along core.* only. I hit this bug when working on development work for Olympia, where our unit tests initialize a simulation without a core node, thus resulting in the sparta assert triggering. The proposed fix is to check if the cpu_node is null, then use the root node to search for scoreboards. An additional test for a cpu not named "core" is added to verify these changes.

@@ -152,7 +152,7 @@ class ExeUnit : public sparta::Unit
my_scoreboard_view_.reset
(new sparta::ScoreboardView(getContainer()->getName(), // ALU0, ALU1, LSU, FPU, etc
sb_unit_type_, // integer, fp, vector
getContainer())); // Used to find the Scoreboard
getContainer()->getRoot())); // Used to find the Scoreboard
Copy link
Member

Choose a reason for hiding this comment

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

Technically you can call getRoot here, but this is a tester, no harm. Also, did it not work with just getContainer?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

getContainer didn't work. I think it was too far down the tree, so the scoreboard was above.

Copy link
Member

@klingaard klingaard left a comment

Choose a reason for hiding this comment

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

@furuame any comments?

Copy link
Member

@furuame furuame left a comment

Choose a reason for hiding this comment

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

@furuame any comments?

Oops ... good catch! LGTM!

@klingaard klingaard merged commit a00617e into sparcians:master Jan 23, 2024
8 checks passed
klingaard pushed a commit to riscv-software-src/riscv-perf-model that referenced this pull request Feb 7, 2024
This PR adds issue queue modeling to Olympia, by allowing users to
define the number of issue queues, which execution units map to which
issue queues, and which target pipes are supported for each execution
unit.

Regressions will fail until we merge [scoreboard
fix](sparcians/map#468) in Sparta.
Old flow:
dispatch -> executepipe->execute

New flow:
dispatch -> issue queue -> executepipe -> execute

---------

Signed-off-by: Aaron Chan <[email protected]>
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