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 * |
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 |
112 /** Perform sanity checks after a drain. */ 113 void drainSanityCheck() const; |
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. */ |
200 bool isEmpty() const |
201 { return numInstsInROB == 0; } 202 203 /** Returns if a specific thread's partition is empty. */ |
204 bool isEmpty(ThreadID tid) const |
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 |
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 --- |