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

Handling flush in LSU updateIssuePriorityAfterCacheReload #136

Closed
danbone opened this issue Jan 3, 2024 · 4 comments
Closed

Handling flush in LSU updateIssuePriorityAfterCacheReload #136

danbone opened this issue Jan 3, 2024 · 4 comments

Comments

@danbone
Copy link
Contributor

danbone commented Jan 3, 2024

@h0lyalg0rithm

I'm trying to enable flushing and I'm hitting the assert in this code because the instruction was flushed.

riscv-perf-model/core/LSU.cpp

Lines 1178 to 1196 in e3e1412

void LSU::updateIssuePriorityAfterCacheReload_(const MemoryAccessInfoPtr & mem_access_info_ptr,
const bool is_flushed_inst)
{
const LoadStoreInstIterator & iter = mem_access_info_ptr->getIssueQueueIterator();
sparta_assert(
iter.isValid(),
"Attempt to rehandle cache lookup for instruction not yet in the issue queue! "
<< mem_access_info_ptr);
const LoadStoreInstInfoPtr & inst_info_ptr = *(iter);
// Update issue priority for this outstanding cache miss
if (inst_info_ptr->getState() != LoadStoreInstInfo::IssueState::ISSUED)
{
inst_info_ptr->setState(LoadStoreInstInfo::IssueState::READY);
}
inst_info_ptr->setPriority(LoadStoreInstInfo::IssuePriority::CACHE_RELOAD);
uev_append_ready_.preparePayload(inst_info_ptr)->schedule(sparta::Clock::Cycle(0));
}

Can I just return early if the instruction was flushed?

@h0lyalg0rithm
Copy link
Collaborator

h0lyalg0rithm commented Jan 4, 2024

@danbone Yes I think that can work.
If spec_load is enabled we might need to either cancel those events or return early in the replay callback
How are you flushing the instructions.

@ullahnasr
Copy link

The email knute.lingaard@sfive is no longer valid as Knute lingaard is not at Sifive anymore. He will update his emal address

@klingaard
Copy link
Collaborator

Thanks, Nasr. I updated the settings. You (in theory) shouldn't be receiving any more emails.

@danbone
Copy link
Contributor Author

danbone commented Jan 8, 2024

@h0lyalg0rithm see #137

@danbone danbone closed this as completed Jan 19, 2024
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

No branches or pull requests

4 participants