rename_impl.hh (3970:d54945bab95d) | rename_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; --- 154 unchanged lines hidden (view full) --- 163 .flags(Stats::total) 164 ; 165} 166 167template <class Impl> 168void 169DefaultRename<Impl>::setCPU(O3CPU *cpu_ptr) 170{ | 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; --- 154 unchanged lines hidden (view full) --- 163 .flags(Stats::total) 164 ; 165} 166 167template <class Impl> 168void 169DefaultRename<Impl>::setCPU(O3CPU *cpu_ptr) 170{ |
171 DPRINTF(Rename, "Setting CPU pointer.\n"); | |
172 cpu = cpu_ptr; | 171 cpu = cpu_ptr; |
172 DPRINTF(Rename, "Setting CPU pointer.\n"); |
|
173} 174 175template <class Impl> 176void 177DefaultRename<Impl>::setTimeBuffer(TimeBuffer<TimeStruct> *tb_ptr) 178{ | 173} 174 175template <class Impl> 176void 177DefaultRename<Impl>::setTimeBuffer(TimeBuffer<TimeStruct> *tb_ptr) 178{ |
179 DPRINTF(Rename, "Setting time buffer pointer.\n"); | |
180 timeBuffer = tb_ptr; 181 182 // Setup wire to read information from time buffer, from IEW stage. 183 fromIEW = timeBuffer->getWire(-iewToRenameDelay); 184 185 // Setup wire to read infromation from time buffer, from commit stage. 186 fromCommit = timeBuffer->getWire(-commitToRenameDelay); 187 188 // Setup wire to write information to previous stages. 189 toDecode = timeBuffer->getWire(0); 190} 191 192template <class Impl> 193void 194DefaultRename<Impl>::setRenameQueue(TimeBuffer<RenameStruct> *rq_ptr) 195{ | 179 timeBuffer = tb_ptr; 180 181 // Setup wire to read information from time buffer, from IEW stage. 182 fromIEW = timeBuffer->getWire(-iewToRenameDelay); 183 184 // Setup wire to read infromation from time buffer, from commit stage. 185 fromCommit = timeBuffer->getWire(-commitToRenameDelay); 186 187 // Setup wire to write information to previous stages. 188 toDecode = timeBuffer->getWire(0); 189} 190 191template <class Impl> 192void 193DefaultRename<Impl>::setRenameQueue(TimeBuffer<RenameStruct> *rq_ptr) 194{ |
196 DPRINTF(Rename, "Setting rename queue pointer.\n"); | |
197 renameQueue = rq_ptr; 198 199 // Setup wire to write information to future stages. 200 toIEW = renameQueue->getWire(0); 201} 202 203template <class Impl> 204void 205DefaultRename<Impl>::setDecodeQueue(TimeBuffer<DecodeStruct> *dq_ptr) 206{ | 195 renameQueue = rq_ptr; 196 197 // Setup wire to write information to future stages. 198 toIEW = renameQueue->getWire(0); 199} 200 201template <class Impl> 202void 203DefaultRename<Impl>::setDecodeQueue(TimeBuffer<DecodeStruct> *dq_ptr) 204{ |
207 DPRINTF(Rename, "Setting decode queue pointer.\n"); | |
208 decodeQueue = dq_ptr; 209 210 // Setup wire to get information from decode. 211 fromDecode = decodeQueue->getWire(-decodeToRenameDelay); 212} 213 214template <class Impl> 215void --- 7 unchanged lines hidden (view full) --- 223 emptyROB[tid] = true; 224 } 225} 226 227template<class Impl> 228void 229DefaultRename<Impl>::setActiveThreads(std::list<unsigned> *at_ptr) 230{ | 205 decodeQueue = dq_ptr; 206 207 // Setup wire to get information from decode. 208 fromDecode = decodeQueue->getWire(-decodeToRenameDelay); 209} 210 211template <class Impl> 212void --- 7 unchanged lines hidden (view full) --- 220 emptyROB[tid] = true; 221 } 222} 223 224template<class Impl> 225void 226DefaultRename<Impl>::setActiveThreads(std::list<unsigned> *at_ptr) 227{ |
231 DPRINTF(Rename, "Setting active threads list pointer.\n"); | |
232 activeThreads = at_ptr; 233} 234 235 236template <class Impl> 237void 238DefaultRename<Impl>::setRenameMap(RenameMap rm_ptr[]) 239{ | 228 activeThreads = at_ptr; 229} 230 231 232template <class Impl> 233void 234DefaultRename<Impl>::setRenameMap(RenameMap rm_ptr[]) 235{ |
240 DPRINTF(Rename, "Setting rename map pointers.\n"); 241 | |
242 for (int i=0; i<numThreads; i++) { 243 renameMap[i] = &rm_ptr[i]; 244 } 245} 246 247template <class Impl> 248void 249DefaultRename<Impl>::setFreeList(FreeList *fl_ptr) 250{ | 236 for (int i=0; i<numThreads; i++) { 237 renameMap[i] = &rm_ptr[i]; 238 } 239} 240 241template <class Impl> 242void 243DefaultRename<Impl>::setFreeList(FreeList *fl_ptr) 244{ |
251 DPRINTF(Rename, "Setting free list pointer.\n"); | |
252 freeList = fl_ptr; 253} 254 255template<class Impl> 256void 257DefaultRename<Impl>::setScoreboard(Scoreboard *_scoreboard) 258{ | 245 freeList = fl_ptr; 246} 247 248template<class Impl> 249void 250DefaultRename<Impl>::setScoreboard(Scoreboard *_scoreboard) 251{ |
259 DPRINTF(Rename, "Setting scoreboard pointer.\n"); | |
260 scoreboard = _scoreboard; 261} 262 263template <class Impl> 264bool 265DefaultRename<Impl>::drain() 266{ 267 // Rename is ready to switch out at any time. --- 1136 unchanged lines hidden --- | 252 scoreboard = _scoreboard; 253} 254 255template <class Impl> 256bool 257DefaultRename<Impl>::drain() 258{ 259 // Rename is ready to switch out at any time. --- 1136 unchanged lines hidden --- |