71 analyzeBuses(mach, busMap);
74 std::multimap<double, TTAMachine::Bus*>::const_iterator iter = busMap.end();
75 while (iter != busMap.begin()) {
77 if (addedBuses == busesToAdd) {
80 double numberToAdd = ceil((*iter).first * busesToAdd);
82 while (numberToAdd > 0) {
83 if (addedBuses < busesToAdd) {
88 std::string busBaseName = original.
name();
127 std::list<std::string>& removedBusNames) {
130 analyzeBuses(mach, busMap);
132 int removedBuses = 0;
133 std::multimap<double, TTAMachine::Bus*>::const_iterator iter =
136 while (iter != busMap.end() && removedBuses != busesToRemove) {
138 double numberToRemove = ceil(iter->first * busesToRemove);
142 for (
int i = 0; numberToRemove > 0 && i < navigator.
count(); i++) {
143 if (removedBuses < busesToRemove) {
144 if ((*iter).second->isArchitectureEqual(
145 *navigator.
item(i))) {
148 if (hasSlot(mach, navigator.
item(i)->name())) {
153 removedBusNames.push_back(
154 (*iter).second->name());
184 std::list<std::string>& removedBusNames) {
191 for (
int busesRemoved = 0, i = 0; 0 < navigator.
count(); ++i) {
192 if ( countToRemove == busesRemoved ) {
196 if (hasSlot(mach, navigator.
item(i)->name())) {
199 removedBusNames.push_back(navigator.
item(i)->name());
219 const Machine& mach,
const std::string& slotName) {
223 for (
int i = 0; i < itNav.
count(); i++) {
225 slot < itNav.
item(i)->slotCount();
228 if (itNav.
item(i)->slot(slot)->slot() == slotName) {
247 std::list<std::string> socketsToRemove;
250 for (
int i = 0; i < navigator.
count(); i++) {
251 if (navigator.
item(i)->portCount() == 0 ||
252 navigator.
item(i)->segmentCount() == 0) {
253 socketsToRemove.push_back(navigator.
item(i)->name());
257 std::list<std::string>::const_iterator iter = socketsToRemove.begin();
258 while (iter != socketsToRemove.end()) {
260 removedSocketNames.push_back(*iter);
277 std::set<int> checkedBuses;
278 for (
int i = 0; i < busNavigator.
count(); i++) {
281 if (checkedBuses.find(i) != checkedBuses.end()) {
287 for (
int j = i + 1; j < busNavigator.
count(); j++) {
289 checkedBuses.insert(j);
294 std::pair<double, TTAMachine::Bus*>(
297 checkedBuses.insert(i);
315 analyzeRegisters(mach, rfMap);
317 std::multimap<double, TTAMachine::RegisterFile*>::const_iterator iter =
319 while (iter != rfMap.begin()) {
321 if (!(*iter).second->isUsedAsGuard()) {
322 int addedRegisters = 0;
323 while (addedRegisters < registersToAdd) {
324 ObjectState* newRFState = (*iter).second->saveState();
331 std::string rfBaseName =
"rf";
362 if (percentsOfRegistersToAdd < 0.0) {
368 analyzeRegisters(mach, rfMap);
372 std::multimap<double, TTAMachine::RegisterFile*>::const_iterator iter =
374 while (iter != rfMap.begin()) {
376 if (!(*iter).second->isUsedAsGuard()) {
377 int addedRegisters = 0;
380 ceil((*iter).first * percentsOfRegistersToAdd));
381 while (addedRegisters < registersToAdd) {
385 std::string rfBaseName =
"rf";
416 std::set<int> checkedRegisters;
417 for (
int i = 0; i < registerNavigator.
count(); i++) {
419 if (checkedRegisters.find(i) != checkedRegisters.end()) {
425 for (
int j = i + 1; j < registerNavigator.
count(); j++) {
427 checkedRegisters.insert(j);
433 std::pair<double, TTAMachine::RegisterFile*>(
437 checkedRegisters.insert(i);
441 == registerNavigator.
count());
455 analyzeFunctionUnits(mach, fuMap);
457 std::multimap<double, TTAMachine::FunctionUnit*>::const_iterator iter =
459 while (iter != fuMap.begin()) {
462 while (addedUnits < unitsToAdd) {
463 ObjectState* newFuState = (*iter).second->saveState();
470 std::string fuBaseName =
"fu";
504 if (percentualFUIncrease < 0.0) {
510 analyzeFunctionUnits(mach, fuMap);
514 std::multimap<double, TTAMachine::FunctionUnit*>::const_iterator iter =
516 while (iter != fuMap.begin()) {
521 while (addedUnits < unitsToAdd) {
525 std::string fuBaseName =
"fu";
560 std::set<int> checkedUnits;
561 for (
int i = 0; i < unitNavigator.
count(); i++) {
563 if (checkedUnits.find(i) != checkedUnits.end()) {
569 for (
int j = i + 1; j < unitNavigator.
count(); j++) {
571 checkedUnits.insert(j);
577 std::pair<double, TTAMachine::FunctionUnit*>(
580 checkedUnits.insert(i);
584 == unitNavigator.
count());