Skip to content

Commit

Permalink
change store buffer to deque
Browse files Browse the repository at this point in the history
  • Loading branch information
MayneMei authored Dec 2, 2024
1 parent b73dba2 commit e578f6d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
8 changes: 4 additions & 4 deletions core/LSU.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ namespace olympia
replay_buffer_("replay_buffer", p->replay_buffer_size, getClock()),
replay_buffer_size_(p->replay_buffer_size),
replay_issue_delay_(p->replay_issue_delay),
store_buffer_("store_buffer", p->ldst_inst_queue_size, getClock()), // Add this line
store_buffer_size_(p->ldst_inst_queue_size),
// store_buffer_("store_buffer", p->ldst_inst_queue_size, getClock()), // Add this line
// store_buffer_size_(p->ldst_inst_queue_size),
ready_queue_(),
load_store_info_allocator_(sparta::notNull(OlympiaAllocators::getOlympiaAllocators(node))
->load_store_info_allocator),
Expand Down Expand Up @@ -51,7 +51,7 @@ namespace olympia
ldst_pipeline_.enableCollection(node);
ldst_inst_queue_.enableCollection(node);
replay_buffer_.enableCollection(node);
store_buffer_.enableCollection(node);
// store_buffer_.enableCollection(node);

// Startup handler for sending initial credits
sparta::StartupEvent(node, CREATE_SPARTA_HANDLER(LSU, sendInitialCredits_));
Expand Down Expand Up @@ -960,7 +960,7 @@ namespace olympia
if(store_buffer_.empty()) {
return nullptr;
}
return store_buffer_.read(0);
return store_buffer_.front();
}

bool LSU::allOlderStoresIssued_(const InstPtr & inst_ptr)
Expand Down
5 changes: 3 additions & 2 deletions core/LSU.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,9 @@ namespace olympia
const uint32_t replay_issue_delay_;

// Store Buffer
sparta::Buffer<LoadStoreInstInfoPtr> store_buffer_;
const uint32_t store_buffer_size_;
std::deque<LoadStoreInstInfoPtr> store_buffer_;
// sparta::Buffer<LoadStoreInstInfoPtr> store_buffer_;
// const uint32_t store_buffer_size_;

sparta::PriorityQueue<LoadStoreInstInfoPtr> ready_queue_;
// MMU unit
Expand Down

0 comments on commit e578f6d

Please sign in to comment.