1/* 2 * Copyright (c) 2004-2006 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 23 unchanged lines hidden (view full) --- 32#include <limits> 33#include <vector> 34 35#include "sim/root.hh" 36 37#include "cpu/o3/fu_pool.hh" 38#include "cpu/o3/inst_queue.hh" 39 |
40template <class Impl> 41InstructionQueue<Impl>::FUCompletion::FUCompletion(DynInstPtr &_inst, 42 int fu_idx, 43 InstructionQueue<Impl> *iq_ptr) 44 : Event(&mainEventQueue, Stat_Event_Pri), 45 inst(_inst), fuIdx(fu_idx), iqPtr(iq_ptr), freeFU(false) 46{ 47 this->setFlags(Event::AutoDelete); --- 45 unchanged lines hidden (view full) --- 93 //Initialize Mem Dependence Units 94 for (int i = 0; i < numThreads; i++) { 95 memDepUnit[i].init(params,i); 96 memDepUnit[i].setIQ(this); 97 } 98 99 resetState(); 100 |
101 std::string policy = params->smtIQPolicy; |
102 103 //Convert string to lowercase 104 std::transform(policy.begin(), policy.end(), policy.begin(), 105 (int(*)(int)) tolower); 106 107 //Figure out resource sharing policy 108 if (policy == "dynamic") { 109 iqPolicy = Dynamic; --- 162 unchanged lines hidden (view full) --- 272 issueDelayDist 273 .init(Num_OpClasses,0,99,2) 274 .name(name() + ".ISSUE:") 275 .desc("cycles from operands ready to issue") 276 .flags(pdf | cdf) 277 ; 278 279 for (int i=0; i<Num_OpClasses; ++i) { |
280 std::stringstream subname; |
281 subname << opClassStrings[i] << "_delay"; 282 issueDelayDist.subname(i, subname.str()); 283 } 284 285 issueRate 286 .name(name() + ".ISSUE:rate") 287 .desc("Inst issue rate") 288 .flags(total) --- 63 unchanged lines hidden (view full) --- 352 readyIt[i] = listOrder.end(); 353 } 354 nonSpecInsts.clear(); 355 listOrder.clear(); 356} 357 358template <class Impl> 359void |
360InstructionQueue<Impl>::setActiveThreads(std::list<unsigned> *at_ptr) |
361{ 362 DPRINTF(IQ, "Setting active threads list pointer.\n"); 363 activeThreads = at_ptr; 364} 365 366template <class Impl> 367void 368InstructionQueue<Impl>::setIssueToExecuteQueue(TimeBuffer<IssueStruct> *i2e_ptr) --- 45 unchanged lines hidden (view full) --- 414 415template <class Impl> 416void 417InstructionQueue<Impl>::resetEntries() 418{ 419 if (iqPolicy != Dynamic || numThreads > 1) { 420 int active_threads = (*activeThreads).size(); 421 |
422 std::list<unsigned>::iterator threads = (*activeThreads).begin(); 423 std::list<unsigned>::iterator list_end = (*activeThreads).end(); |
424 425 while (threads != list_end) { 426 if (iqPolicy == Partitioned) { 427 maxEntries[*threads++] = numEntries / active_threads; 428 } else if(iqPolicy == Threshold && active_threads == 1) { 429 maxEntries[*threads++] = numEntries; 430 } 431 } --- 962 unchanged lines hidden --- |