You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In function Controller::ScheduleTransaction, there would be a corner case that the write_buffer is full and the first transaction in write_buffer can not pass the dependency check. When this happens, here would be an infinite loop until reaching the cycle we set when initializing.
I'm not sure whether this is correct but I modified the code like when this happens, schedule read queue for next cycle, and switch back to write_buffer after this. I'm glad to hear from you whether I'm right about this.
`void Controller::ScheduleTransaction() {
// determine whether to schedule read or write
if (write_draining_ == 0 && !is_unified_queue_) {
// we basically have a upper and lower threshold for write buffer
if ((write_buffer_.size() >= write_buffer_.capacity()) ||
(write_buffer_.size() > 8 && cmd_queue_.QueueEmpty())) {
write_draining_ = write_buffer_.size();
}
}
std::vector<Transaction> &queue =
is_unified_queue_ ? unified_queue_
: write_draining_ > 0 ? write_buffer_ : read_queue_;
for (auto it = queue.begin(); it != queue.end(); it++) {
auto cmd = TransToCommand(*it);
if (cmd_queue_.WillAcceptCommand(cmd.Rank(), cmd.Bankgroup(),
cmd.Bank())) {
if (!is_unified_queue_ && cmd.IsWrite()) {
// Enforce R->W dependency
if (pending_rd_q_.count(it->addr) > 0) {
write_draining_ = 0;
break;
}
write_draining_ -= 1;
}
cmd_queue_.AddCommand(cmd);
queue.erase(it);
break;
}
}
}`
The text was updated successfully, but these errors were encountered:
In function Controller::ScheduleTransaction, there would be a corner case that the write_buffer is full and the first transaction in write_buffer can not pass the dependency check. When this happens, here would be an infinite loop until reaching the cycle we set when initializing.
I'm not sure whether this is correct but I modified the code like when this happens, schedule read queue for next cycle, and switch back to write_buffer after this. I'm glad to hear from you whether I'm right about this.
`void Controller::ScheduleTransaction() {
// determine whether to schedule read or write
if (write_draining_ == 0 && !is_unified_queue_) {
// we basically have a upper and lower threshold for write buffer
if ((write_buffer_.size() >= write_buffer_.capacity()) ||
(write_buffer_.size() > 8 && cmd_queue_.QueueEmpty())) {
write_draining_ = write_buffer_.size();
}
}
}`
The text was updated successfully, but these errors were encountered: