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; --- 268 unchanged lines hidden (view full) --- 277 ldstQueue.numFreeEntries(tid); 278 } 279} 280 281template<class Impl> 282void 283DefaultIEW<Impl>::setCPU(O3CPU *cpu_ptr) 284{ |
285 cpu = cpu_ptr; |
286 DPRINTF(IEW, "Setting CPU pointer.\n"); |
287 288 instQueue.setCPU(cpu_ptr); 289 ldstQueue.setCPU(cpu_ptr); 290 291 cpu->activateStage(O3CPU::IEWIdx); 292} 293 294template<class Impl> 295void 296DefaultIEW<Impl>::setTimeBuffer(TimeBuffer<TimeStruct> *tb_ptr) 297{ |
298 timeBuffer = tb_ptr; 299 300 // Setup wire to read information from time buffer, from commit. 301 fromCommit = timeBuffer->getWire(-commitToIEWDelay); 302 303 // Setup wire to write information back to previous stages. 304 toRename = timeBuffer->getWire(0); 305 306 toFetch = timeBuffer->getWire(0); 307 308 // Instruction queue also needs main time buffer. 309 instQueue.setTimeBuffer(tb_ptr); 310} 311 312template<class Impl> 313void 314DefaultIEW<Impl>::setRenameQueue(TimeBuffer<RenameStruct> *rq_ptr) 315{ |
316 renameQueue = rq_ptr; 317 318 // Setup wire to read information from rename queue. 319 fromRename = renameQueue->getWire(-renameToIEWDelay); 320} 321 322template<class Impl> 323void 324DefaultIEW<Impl>::setIEWQueue(TimeBuffer<IEWStruct> *iq_ptr) 325{ |
326 iewQueue = iq_ptr; 327 328 // Setup wire to write instructions to commit. 329 toCommit = iewQueue->getWire(0); 330} 331 332template<class Impl> 333void 334DefaultIEW<Impl>::setActiveThreads(std::list<unsigned> *at_ptr) 335{ |
336 activeThreads = at_ptr; 337 338 ldstQueue.setActiveThreads(at_ptr); 339 instQueue.setActiveThreads(at_ptr); 340} 341 342template<class Impl> 343void 344DefaultIEW<Impl>::setScoreboard(Scoreboard *sb_ptr) 345{ |
346 scoreboard = sb_ptr; 347} 348 349template <class Impl> 350bool 351DefaultIEW<Impl>::drain() 352{ 353 // IEW is ready to drain at any time. --- 1311 unchanged lines hidden --- |