iew_impl.hh (4033:7bb1223f9645) | iew_impl.hh (4318:eb4241362a80) |
---|---|
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{ | 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 DPRINTF(IEW, "Setting CPU pointer.\n"); | |
286 cpu = cpu_ptr; | 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{ | 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 DPRINTF(IEW, "Setting time buffer pointer.\n"); | |
299 timeBuffer = tb_ptr; 300 301 // Setup wire to read information from time buffer, from commit. 302 fromCommit = timeBuffer->getWire(-commitToIEWDelay); 303 304 // Setup wire to write information back to previous stages. 305 toRename = timeBuffer->getWire(0); 306 307 toFetch = timeBuffer->getWire(0); 308 309 // Instruction queue also needs main time buffer. 310 instQueue.setTimeBuffer(tb_ptr); 311} 312 313template<class Impl> 314void 315DefaultIEW<Impl>::setRenameQueue(TimeBuffer<RenameStruct> *rq_ptr) 316{ | 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{ |
317 DPRINTF(IEW, "Setting rename queue pointer.\n"); | |
318 renameQueue = rq_ptr; 319 320 // Setup wire to read information from rename queue. 321 fromRename = renameQueue->getWire(-renameToIEWDelay); 322} 323 324template<class Impl> 325void 326DefaultIEW<Impl>::setIEWQueue(TimeBuffer<IEWStruct> *iq_ptr) 327{ | 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{ |
328 DPRINTF(IEW, "Setting IEW queue pointer.\n"); | |
329 iewQueue = iq_ptr; 330 331 // Setup wire to write instructions to commit. 332 toCommit = iewQueue->getWire(0); 333} 334 335template<class Impl> 336void 337DefaultIEW<Impl>::setActiveThreads(std::list<unsigned> *at_ptr) 338{ | 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{ |
339 DPRINTF(IEW, "Setting active threads list pointer.\n"); | |
340 activeThreads = at_ptr; 341 342 ldstQueue.setActiveThreads(at_ptr); 343 instQueue.setActiveThreads(at_ptr); 344} 345 346template<class Impl> 347void 348DefaultIEW<Impl>::setScoreboard(Scoreboard *sb_ptr) 349{ | 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{ |
350 DPRINTF(IEW, "Setting scoreboard pointer.\n"); | |
351 scoreboard = sb_ptr; 352} 353 354template <class Impl> 355bool 356DefaultIEW<Impl>::drain() 357{ 358 // IEW is ready to drain at any time. --- 1311 unchanged lines hidden --- | 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 --- |