rob.hh (8822:e7ae13867098) | rob.hh (9444:ab47fe7f03f0) |
---|---|
1/* | 1/* |
2 * Copyright (c) 2012 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software 9 * licensed hereunder. You may use the software subject to the license 10 * terms below provided that you ensure that this notice is replicated 11 * unmodified and in its entirety in all distributions of the software, 12 * modified or unmodified, in source code or in binary form. 13 * |
|
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; 9 * redistributions in binary form must reproduce the above copyright --- 82 unchanged lines hidden (view full) --- 92 93 std::string name() const; 94 95 /** Sets pointer to the list of active threads. 96 * @param at_ptr Pointer to the list of active threads. 97 */ 98 void setActiveThreads(std::list<ThreadID> *at_ptr); 99 | 14 * Copyright (c) 2004-2006 The Regents of The University of Michigan 15 * All rights reserved. 16 * 17 * Redistribution and use in source and binary forms, with or without 18 * modification, are permitted provided that the following conditions are 19 * met: redistributions of source code must retain the above copyright 20 * notice, this list of conditions and the following disclaimer; 21 * redistributions in binary form must reproduce the above copyright --- 82 unchanged lines hidden (view full) --- 104 105 std::string name() const; 106 107 /** Sets pointer to the list of active threads. 108 * @param at_ptr Pointer to the list of active threads. 109 */ 110 void setActiveThreads(std::list<ThreadID> *at_ptr); 111 |
100 /** Switches out the ROB. */ 101 void switchOut(); | 112 /** Perform sanity checks after a drain. */ 113 void drainSanityCheck() const; |
102 103 /** Takes over another CPU's thread. */ 104 void takeOverFrom(); 105 106 /** Function to insert an instruction into the ROB. Note that whatever 107 * calls this function must ensure that there is enough space within the 108 * ROB for the new instruction. 109 * @param inst The instruction being inserted into the ROB. --- 70 unchanged lines hidden (view full) --- 180 bool isFull() 181 { return numInstsInROB == numEntries; } 182 183 /** Returns if a specific thread's partition is full. */ 184 bool isFull(ThreadID tid) 185 { return threadEntries[tid] == numEntries; } 186 187 /** Returns if the ROB is empty. */ | 114 115 /** Takes over another CPU's thread. */ 116 void takeOverFrom(); 117 118 /** Function to insert an instruction into the ROB. Note that whatever 119 * calls this function must ensure that there is enough space within the 120 * ROB for the new instruction. 121 * @param inst The instruction being inserted into the ROB. --- 70 unchanged lines hidden (view full) --- 192 bool isFull() 193 { return numInstsInROB == numEntries; } 194 195 /** Returns if a specific thread's partition is full. */ 196 bool isFull(ThreadID tid) 197 { return threadEntries[tid] == numEntries; } 198 199 /** Returns if the ROB is empty. */ |
188 bool isEmpty() | 200 bool isEmpty() const |
189 { return numInstsInROB == 0; } 190 191 /** Returns if a specific thread's partition is empty. */ | 201 { return numInstsInROB == 0; } 202 203 /** Returns if a specific thread's partition is empty. */ |
192 bool isEmpty(ThreadID tid) | 204 bool isEmpty(ThreadID tid) const |
193 { return threadEntries[tid] == 0; } 194 195 /** Executes the squash, marking squashed instructions. */ 196 void doSquash(ThreadID tid); 197 198 /** Squashes all instructions younger than the given sequence number for 199 * the specific thread. 200 */ --- 58 unchanged lines hidden (view full) --- 259 * double checking that variable. 260 */ 261 int countInsts(ThreadID tid); 262 263 /** Registers statistics. */ 264 void regStats(); 265 266 private: | 205 { return threadEntries[tid] == 0; } 206 207 /** Executes the squash, marking squashed instructions. */ 208 void doSquash(ThreadID tid); 209 210 /** Squashes all instructions younger than the given sequence number for 211 * the specific thread. 212 */ --- 58 unchanged lines hidden (view full) --- 271 * double checking that variable. 272 */ 273 int countInsts(ThreadID tid); 274 275 /** Registers statistics. */ 276 void regStats(); 277 278 private: |
279 /** Reset the ROB state */ 280 void resetState(); 281 |
|
267 /** Pointer to the CPU. */ 268 O3CPU *cpu; 269 270 /** Active Threads in CPU */ 271 std::list<ThreadID> *activeThreads; 272 273 /** Number of instructions in the ROB. */ 274 unsigned numEntries; --- 58 unchanged lines hidden --- | 282 /** Pointer to the CPU. */ 283 O3CPU *cpu; 284 285 /** Active Threads in CPU */ 286 std::list<ThreadID> *activeThreads; 287 288 /** Number of instructions in the ROB. */ 289 unsigned numEntries; --- 58 unchanged lines hidden --- |