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

Add SYS execute pipe #170

Merged
merged 5 commits into from
Jun 5, 2024
Merged

Conversation

ah-condor
Copy link
Contributor

@ah-condor ah-condor commented May 20, 2024

This PR is a followup to #162.

It is also discussed in: #164
 
This PR changes the way SYS instructions are executed. Previously, SYS instructions did not go through an execution pipe but instead were dispatched to the ROB without delay, and the ROB handled the scoreboard with respect to the destination register. This PR requires the SYS instructions to pass through an execution pipe, thereby obviating any special scoreboard code in the ROB.  With the exception of CSR read instructions, the ROB will flush all SYS instructions.

This feature can be tested by running example_json.json workload, which is part of the make regress suite.  Also, the sys execute pipe was added to 3 config files big_core, medium_core and small_core.

How was this tested:
make regress passes 83/83.
 

core/ROB.cpp Outdated
// if SYS instr is not a csr instruction flush
// if SYS instr is a csr but src1 is not x0, flush
// otherwise it is a csr read, therefore don't flush
if (ex_inst->getMnemonic().substr(0,3)!="csr" || srclist.size()!=0)
Copy link
Collaborator

Choose a reason for hiding this comment

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

String comparisons are slower, you can use Mavis info to check for csr:
ex_inst->getOpCodeInfo()->isInstType(mavis::InstMetaData::InstructionTypes::CSR)

Copy link
Collaborator

Choose a reason for hiding this comment

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

@ah-condor -- can you make this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Working on it!

Copy link
Collaborator

@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.

Looks good. Once you remove the string compare that Aaron found, this is good to go.

@klingaard klingaard merged commit c1f2a23 into riscv-software-src:master Jun 5, 2024
4 checks passed
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