From e578f6dd67aa76d20f2a221daeff48e1f2ad2061 Mon Sep 17 00:00:00 2001 From: MayneMei <69469280+MayneMei@users.noreply.github.com> Date: Sun, 1 Dec 2024 23:20:46 -0800 Subject: [PATCH] change store buffer to deque --- core/LSU.cpp | 8 ++++---- core/LSU.hpp | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/core/LSU.cpp b/core/LSU.cpp index edd829cc..38000357 100644 --- a/core/LSU.cpp +++ b/core/LSU.cpp @@ -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), @@ -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_)); @@ -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) diff --git a/core/LSU.hpp b/core/LSU.hpp index ccb0b2ad..c98da9e4 100644 --- a/core/LSU.hpp +++ b/core/LSU.hpp @@ -147,8 +147,9 @@ namespace olympia const uint32_t replay_issue_delay_; // Store Buffer - sparta::Buffer store_buffer_; - const uint32_t store_buffer_size_; + std::deque store_buffer_; + // sparta::Buffer store_buffer_; + // const uint32_t store_buffer_size_; sparta::PriorityQueue ready_queue_; // MMU unit