12#include "sparta/report/DatabaseInterface.hpp"
13#include "simdb/ObjectManager.hpp"
14#include "simdb/ObjectRef.hpp"
23 uop_queue_(
"rename_uop_queue", p->rename_queue_depth,
24 node->getClock(), getStatisticSet()),
25 num_to_rename_per_cycle_(p->num_to_rename)
34 in_dispatch_queue_credits_.
42 void Rename::sendInitialCredits_()
47 void Rename::creditsDispatchQueue_(
const uint32_t & credits)
51 credits_dispatch_ += credits;
52 if (uop_queue_.
size() > 0) {
58 void Rename::handleFlush_(
const FlushManager::FlushingCriteria & criteria)
63 out_uop_queue_credits_.
send(uop_queue_.
size());
66 if (!stop_checking_db_access_) {
68 if (
auto sim = container->getSimulation()) {
70 "wildcard-components"))
72 if (
auto dbconn = GET_DB_FOR_COMPONENT(Stats, container)) {
75 (void) dbconn->findObject(
"ObjectManagersInDatabase", 1);
80 stop_checking_db_access_ =
true;
84 void Rename::decodedInstructions_(
const InstGroup & insts)
88 for(
auto & i : insts) {
94 if (credits_dispatch_ > 0) {
99 void Rename::renameInstructions_()
102 uint32_t num_rename = std::min(uop_queue_.
size(), num_to_rename_per_cycle_);
103 num_rename = std::min(credits_dispatch_, num_rename);
109 for(uint32_t i = 0; i < num_rename; ++i) {
110 insts.emplace_back(uop_queue_.
read(0));
116 out_dispatch_queue_write_.
send(insts);
117 credits_dispatch_ -= num_rename;
120 out_uop_queue_credits_.
send(num_rename);
123 if (credits_dispatch_ > 0 && (uop_queue_.
size() > 0)) {
#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)
#define CREATE_SPARTA_HANDLER(clname, meth)
File that defines the StartupEvent class.
Parameters for Rename model.
static const char name[]
Name of this resource. Required by sparta::UnitFactory.
Rename(sparta::TreeNode *node, const RenameParameterSet *p)
Constructor for Rename.
bool dataReceived() const
Has this port received data (not timed)
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 ...
TreeNode * getContainer()
Gets the TreeNode (container) for this resource (if any)
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.
std::enable_if< std::is_same< T, app::FeatureConfiguration >::value, bool >::type IsFeatureValueEnabled(const T &cfg, const std::string &feature_name)