rename.hh (9427:ddf45c1d54d4) rename.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

--- 142 unchanged lines hidden (view full) ---

152 void setRenameMap(RenameMap rm_ptr[Impl::MaxThreads]);
153
154 /** Sets pointer to the free list. */
155 void setFreeList(FreeList *fl_ptr);
156
157 /** Sets pointer to the scoreboard. */
158 void setScoreboard(Scoreboard *_scoreboard);
159
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

--- 142 unchanged lines hidden (view full) ---

164 void setRenameMap(RenameMap rm_ptr[Impl::MaxThreads]);
165
166 /** Sets pointer to the free list. */
167 void setFreeList(FreeList *fl_ptr);
168
169 /** Sets pointer to the scoreboard. */
170 void setScoreboard(Scoreboard *_scoreboard);
171
160 /** Drains the rename stage. */
161 bool drain();
172 /** Perform sanity checks after a drain. */
173 void drainSanityCheck() const;
162
174
163 /** Resumes execution after a drain. */
164 void resume() { }
175 /** Has the stage drained? */
176 bool isDrained() const;
165
177
166 /** Switches out the rename stage. */
167 void switchOut();
168
169 /** Takes over from another CPU's thread. */
170 void takeOverFrom();
171
172 /** Squashes all instructions in a thread. */
173 void squash(const InstSeqNum &squash_seq_num, ThreadID tid);
174
175 /** Ticks rename, which processes all input signals and attempts to rename
176 * as many instructions as possible.
177 */
178 void tick();
179
180 /** Debugging function used to dump history buffer of renamings. */
181 void dumpHistory();
182
183 private:
178 /** Takes over from another CPU's thread. */
179 void takeOverFrom();
180
181 /** Squashes all instructions in a thread. */
182 void squash(const InstSeqNum &squash_seq_num, ThreadID tid);
183
184 /** Ticks rename, which processes all input signals and attempts to rename
185 * as many instructions as possible.
186 */
187 void tick();
188
189 /** Debugging function used to dump history buffer of renamings. */
190 void dumpHistory();
191
192 private:
193 /** Reset this pipeline stage */
194 void resetStage();
195
184 /** Determines what to do based on rename's current status.
185 * @param status_change rename() sets this variable if there was a status
186 * change (ie switching from blocking to unblocking).
187 * @param tid Thread id to rename instructions from.
188 */
189 void rename(bool &status_change, ThreadID tid);
190
191 /** Renames instructions for the given thread. Also handles serializing

--- 296 unchanged lines hidden ---
196 /** Determines what to do based on rename's current status.
197 * @param status_change rename() sets this variable if there was a status
198 * change (ie switching from blocking to unblocking).
199 * @param tid Thread id to rename instructions from.
200 */
201 void rename(bool &status_change, ThreadID tid);
202
203 /** Renames instructions for the given thread. Also handles serializing

--- 296 unchanged lines hidden ---