8 const char BIU::name[] =
"biu";
16 biu_req_queue_size_(p->biu_req_queue_size),
17 biu_latency_(p->biu_latency)
19 in_biu_req_.registerConsumerHandler
22 in_mss_ack_sync_.registerConsumerHandler
24 in_mss_ack_sync_.setPortDelay(
static_cast<sparta::Clock::Cycle
>(1));
28 info_logger_ <<
"BIU construct: #" << node->
getGroupIdx();
38 void BIU::getReqFromLSU_(
const ExampleInstPtr & inst_ptr)
40 appendReqQueue_(inst_ptr);
50 ev_handle_biu_req_.schedule(sparta::Clock::Cycle(0));
57 info_logger_ <<
"This request cannot be serviced right now, MSS is already busy!";
63 void BIU::handle_BIU_Req_()
66 out_mss_req_sync_.send(biu_req_queue_.front(), biu_latency_);
69 info_logger_ <<
"BIU request is sent to MSS!";
74 void BIU::handle_MSS_Ack_()
76 out_biu_ack_.send(biu_req_queue_.front());
77 biu_req_queue_.pop_front();
82 if (biu_req_queue_.size() > 0) {
83 ev_handle_biu_req_.schedule(sparta::Clock::Cycle(0));
87 info_logger_ <<
"MSS Ack is sent to LSU!";
92 void BIU::getAckFromMSS_(
const bool & done)
95 ev_handle_mss_ack_.schedule(sparta::Clock::Cycle(0));
98 info_logger_ <<
"MSS Ack is received!";
114 void BIU::appendReqQueue_(
const ExampleInstPtr& inst_ptr)
116 sparta_assert(biu_req_queue_.size() <= biu_req_queue_size_ ,
"BIU request queue overflows!");
119 biu_req_queue_.emplace_back(inst_ptr);
122 info_logger_ <<
"Append BIU request queue!";
Set of macros for Sparta assertions. Caught by the framework.
#define sparta_assert(...)
Simple variadic assertion that will throw a sparta_exception if the condition fails.
#define SPARTA_EXPECT_FALSE(x)
A macro for hinting to the compiler a particular condition should be considered most likely false.
#define CREATE_SPARTA_HANDLER_WITH_DATA(clname, meth, dataT)
Node in a composite tree representing a sparta Tree item.
group_idx_type getGroupIdx() const
Gets the group index of this node.
Macros for handling exponential backoff.