59 funcUnitsIdx.push_back(fu_idx);
66 int retval = funcUnitsIdx[idx++];
115 for (; j != end; ++
j) {
121 for (
int k = 0;
k < (*i)->number; ++
k)
125 fu->
addCapability((*j)->opClass, (*j)->opLat, (*j)->pipelined);
130 if (!(*j)->pipelined)
137 fu->
name = (*i)->name() +
"(0)";
140 for (
int c = 1;
c < (*i)->number; ++
c) {
145 s << (*i)->name() <<
"(" <<
c <<
")";
168 int start_idx = fu_idx;
174 if (fu_idx == start_idx) {
180 assert(fu_idx <
numFU);
210 cout <<
"Function Unit Pool (" <<
name() <<
")\n";
211 cout <<
"======================================\n";
212 cout <<
"Free List:\n";
219 cout <<
" [" << i <<
"] : ";
226 cout <<
"======================================\n";
227 cout <<
"Busy List:\n";
233 cout <<
" [" << i <<
"] : ";
244 bool is_drained =
true;
267 FUPoolParams::create()
void dump()
Debugging function used to dump FU information.
Cycles is a wrapper class for representing cycle counts, i.e.
int getFU()
Returns the index of the FU at the head of the queue, and changes the index to the next element...
std::vector< FuncUnit * > funcUnits
Functional units.
void addCapability(OpClass cap, unsigned oplat, bool pipelined)
FUIdxQueue fuPerCapList[Num_OpClasses]
Per op class queues of FUs that provide that capability.
std::vector< OpDesc * >::const_iterator OPDDiterator
void freeUnitNextCycle(int fu_idx)
Frees a FU at the end of this cycle.
std::vector< FUDesc * >::const_iterator FUDDiterator
bool isDrained() const
Have all the FUs drained?
std::vector< bool > unitBusy
Bitvector listing which FUs are busy.
std::vector< int > unitsToBeFreed
List of units to be freed at the end of this cycle.
Pool of FU's, specific to the new CPU model.
std::array< bool, Num_OpClasses > pipelined
Whether op is pipelined or not.
std::array< Cycles, Num_OpClasses > maxOpLatencies
Maximum op execution latencies, per op class.
FUPool(const Params *p)
Constructs a FU pool.
void addFU(int fu_idx)
Adds a FU to the queue.
virtual const std::string name() const
std::vector< FuncUnit * >::iterator fuListIterator
int getUnit(OpClass capability)
Gets a FU providing the requested capability.
void processFreeUnits()
Frees all FUs on the list.
std::bitset< Num_OpClasses > capabilityList
Bitvector listing capabilities of this FU pool.
Abstract superclass for simulation objects.