14 fetch_queue_(
"FetchQueue", p->fetch_queue_size, node->getClock(), &unit_stat_set_),
15 num_to_decode_(p->num_to_decode)
19 fetch_queue_write_in_.
21 uop_queue_credits_in_.
30 void Decode::sendInitialCredits_()
36 void Decode::receiveUopQueueCredits_(
const uint32_t & credits) {
37 uop_queue_credits_ += credits;
38 if (fetch_queue_.
size() > 0) {
39 ev_decode_insts_event_.
schedule(sparta::Clock::Cycle(0));
43 info_logger_ <<
"Received credits: " << uop_queue_credits_in_;
50 void Decode::fetchBufferAppended_(
const InstGroup & insts)
61 if (uop_queue_credits_ > 0) {
62 ev_decode_insts_event_.
schedule(sparta::Clock::Cycle(0));
67 void Decode::handleFlush_(
const FlushManager::FlushingCriteria & criteria)
72 fetch_queue_credits_outp_.
send(fetch_queue_.
size());
77 void Decode::decodeInsts_()
79 uint32_t num_decode = std::min(uop_queue_credits_, fetch_queue_.
size());
80 num_decode = std::min(num_decode, num_to_decode_);
86 for(uint32_t i = 0; i < num_decode; ++i) {
87 insts.emplace_back(fetch_queue_.
read(0));
97 uop_queue_outp_.
send(insts);
100 uop_queue_credits_ -= num_decode;
103 fetch_queue_credits_outp_.
send(num_decode);
108 if(uop_queue_credits_ > 0 && fetch_queue_.
size() > 0) {
#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)
#define CREATE_SPARTA_HANDLER(clname, meth)
File that defines the StartupEvent class.
Parameters for Decode model.
Decode(sparta::TreeNode *node, const DecodeParameterSet *p)
Constructor for Decode.
void send(const DataT &dat, sparta::Clock::Cycle rel_time=0)
Send data to bound receivers.
size_type size() const
Return the number of valid entries.
uint32_t capacity() const
Return the fixed size of this queue.
const value_type & read(uint32_t idx) const
Read and return the data at the given index, const reference.
iterator push(const value_type &dat)
push data to the Queue.
void enableCollection(TreeNode *parent)
Request that this queue begin collecting its contents for pipeline collection.
void clear()
Empty the queue.
void pop()
Pops the data at the front of the structure (oldest element) After pop iterator always points to the ...
StartupEvent is a simple class for scheduling a starting event on the Scheduler. It does not support ...
Node in a composite tree representing a sparta Tree item.
void schedule()
Schedule this event with its pre-set delay using the pre-set Clock.
log::MessageSource info_logger_
Default info logger.
Macros for handling exponential backoff.