@@ -20,9 +20,8 @@ namespace olympia
20
20
replay_buffer_ (" replay_buffer" , p->replay_buffer_size, getClock()),
21
21
replay_buffer_size_ (p->replay_buffer_size),
22
22
replay_issue_delay_ (p->replay_issue_delay),
23
- // store_buffer_("store_buffer", p->ldst_inst_queue_size, getClock()), // Add this line
24
- // store_buffer_size_(p->ldst_inst_queue_size),
25
- store_buffer_ (),
23
+ store_buffer_ (" store_buffer" , p->ldst_inst_queue_size, getClock()), // Add this line
24
+ store_buffer_size_ (p->ldst_inst_queue_size),
26
25
ready_queue_ (),
27
26
load_store_info_allocator_ (sparta::notNull(OlympiaAllocators::getOlympiaAllocators(node))
28
27
->load_store_info_allocator),
@@ -52,7 +51,7 @@ namespace olympia
52
51
ldst_pipeline_.enableCollection (node);
53
52
ldst_inst_queue_.enableCollection (node);
54
53
replay_buffer_.enableCollection (node);
55
- // store_buffer_.enableCollection(node);
54
+ store_buffer_.enableCollection (node);
56
55
57
56
// Startup handler for sending initial credits
58
57
sparta::StartupEvent (node, CREATE_SPARTA_HANDLER (LSU, sendInitialCredits_));
@@ -185,8 +184,6 @@ namespace olympia
185
184
// allocate to Store buffer
186
185
if (inst_ptr->isStoreInst ())
187
186
{
188
- std::cout << " Dispatch: Inst type: " << (inst_ptr->isStoreInst () ? " Store" : " Load" )
189
- << " Buffer size: " << store_buffer_.size () << " \n " ;
190
187
allocateInstToStoreBuffer_ (inst_ptr);
191
188
}
192
189
@@ -278,23 +275,16 @@ namespace olympia
278
275
sparta_assert (inst_ptr->getStatus () == Inst::Status::RETIRED,
279
276
" Get ROB Ack, but the store inst hasn't retired yet!" );
280
277
281
- if (inst_ptr->getStatus () != Inst::Status::RETIRED) {
282
- return ;
283
- }
284
-
285
278
if (inst_ptr->isStoreInst ())
286
279
{
287
- // std::cout << "RETIRE: Buffer size before:" << store_buffer_.size()
288
- // << " UID:" << inst_ptr->getUniqueID() << "\n";
289
280
auto oldest_store = getOldestStore_ ();
290
281
sparta_assert (oldest_store && oldest_store->getInstPtr ()->getUniqueID () == inst_ptr->getUniqueID (),
291
282
" Attempting to retire store out of order! Expected: "
292
283
<< (oldest_store ? oldest_store->getInstPtr ()->getUniqueID () : 0 )
293
284
<< " Got: " << inst_ptr->getUniqueID ());
294
285
295
286
// Remove from store buffer -> don't actually need to send cache request
296
- sparta_assert (store_buffer_.size () > 0 , " Store buffer empty on retiring store" );
297
- store_buffer_.pop_front ();
287
+ store_buffer_.erase (store_buffer_.begin ());;
298
288
++stores_retired_;
299
289
}
300
290
@@ -969,7 +959,7 @@ namespace olympia
969
959
if (store_buffer_.empty ()) {
970
960
return nullptr ;
971
961
}
972
- return store_buffer_.front ( );
962
+ return store_buffer_.read ( 0 );
973
963
}
974
964
975
965
bool LSU::allOlderStoresIssued_ (const InstPtr & inst_ptr)
@@ -1448,7 +1438,6 @@ namespace olympia
1448
1438
1449
1439
void LSU::flushStoreBuffer_ (const FlushCriteria & criteria)
1450
1440
{
1451
- // std::cout << "FLUSH: Store buffer size before:" << store_buffer_.size() << "\n";
1452
1441
auto sb_iter = store_buffer_.begin ();
1453
1442
while (sb_iter != store_buffer_.end ()) {
1454
1443
auto inst_ptr = (*sb_iter)->getInstPtr ();
@@ -1461,7 +1450,6 @@ namespace olympia
1461
1450
++sb_iter;
1462
1451
}
1463
1452
}
1464
- // std::cout << "FLUSH: Store buffer size after:" << store_buffer_.size() << "\n";
1465
1453
}
1466
1454
1467
1455
} // namespace olympia
0 commit comments