-
Notifications
You must be signed in to change notification settings - Fork 65
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
Mayne lsu #216
base: master
Are you sure you want to change the base?
Conversation
@MayneMei Please reach out to Knute and see if he is available for a meeting to address your questions about debugging. |
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.
When you run make regress
the last message from ctest
is printed at the end of the run. Something like /path/to/LastTest.log
. Examine that file, it will tell which tests failed and how to run them.
core/LSU.cpp
Outdated
@@ -31,7 +33,7 @@ namespace olympia | |||
cache_read_stage_(cache_lookup_stage_ | |||
+ 1), // Get data from the cache in the cycle after cache lookup | |||
complete_stage_( | |||
cache_read_stage_ | |||
cache_read_stage_ |
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.
Please set up your editor to remove extraneous (dead) whitespace from end of lines.
core/LSU.cpp
Outdated
inst_ptr->isStoreInst() && (inst_ptr->getStatus() != Inst::Status::RETIRED); | ||
const bool cache_bypass = is_already_hit || !phy_addr_is_ready || is_unretired_store; | ||
//check if we can forward from store buffer first | ||
uint64_t load_addr = inst_ptr->getTargetVAddr(); |
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.
const uint64_t
core/LSU.cpp
Outdated
ILOG("Store added to store buffer: " << inst_ptr); | ||
} | ||
|
||
LoadStoreInstInfoPtr LSU::findYoungestMatchingStore_(uint64_t addr) |
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.
Method can be const
core/LSU.cpp
Outdated
LoadStoreInstInfoPtr matching_store = nullptr; | ||
|
||
for (auto it = store_buffer_.begin(); it != store_buffer_.end(); ++it) | ||
{ | ||
auto & store = *it; | ||
if (store->getInstPtr()->getTargetVAddr() == addr) | ||
{ | ||
matching_store = store; | ||
} | ||
} | ||
return matching_store; |
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.
Use std::find_if
core/LSU.cpp
Outdated
auto delete_iter = sb_iter++; | ||
store_buffer_.erase(delete_iter); |
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.
auto delete_iter = sb_iter++; | |
store_buffer_.erase(delete_iter); | |
sb_iter = store_buffer_.erase(sb_iter); |
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.
Hi Knute, thank you for you suggestions. One question I have is that whether I need to make "data_forwarding" as an variable similar to "allow_speculative_load_exec_", so that user can manually choose whether to use this feature?
Signed-off-by: MayneMei <69469280+MayneMei@users.noreply.github.com>
@MayneMei I fixed the macOS build. BTW I am going to release my VLSU branch, which may conflict with some of your LSU changes. Let me know if you have any trouble updating your branch. |
Signed-off-by: MayneMei <69469280+MayneMei@users.noreply.github.com>
…for mem speculation false Signed-off-by: MayneMei <69469280+MayneMei@users.noreply.github.com>
Signed-off-by: MayneMei <69469280+MayneMei@users.noreply.github.com>
…ly can test by using auto regression test
When I added print message inside the LSU.cpp, I can see the store buffer size was modified. But in the test it's always 0. However, the cycle time met the expectation of data forwarding, so I assume it's correct |
@MayneMei my recent PR introduces some merge conflicts for you. If you have any trouble with the merge, please let me know and I can help resolve it. |
implemented data forwarding
@kathlenemagnus I resolved conflict. However during the regression test, there is an environment issue related to MacOS, and also test "BranchPred_test_Run" introduced a segfault. Other tests are all passed. Do you mind take a look at it? Thank you! |
Hi Arup and Knute, after I talked with Arup, I decided to implement store buffer first to enable data forwarding and then implement multi pipelines. Here is the draft pull. For my implementation, 30% tests passed, 69 tests failed out of 99, when I look those results I feel really lost on how to begin debug. Could you give me some guidance? Thank you!