fu_pool.hh (8737:770ccf3af571) fu_pool.hh (9184:a1a8f137b796)
1/*
2 * Copyright (c) 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;

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

54 * them as their scheduled execution events complete. This limits units in this
55 * model to either have identical issue and op latencies, or 1 cycle issue
56 * latencies.
57 */
58class FUPool : public SimObject
59{
60 private:
61 /** Maximum op execution latencies, per op class. */
1/*
2 * Copyright (c) 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;

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

54 * them as their scheduled execution events complete. This limits units in this
55 * model to either have identical issue and op latencies, or 1 cycle issue
56 * latencies.
57 */
58class FUPool : public SimObject
59{
60 private:
61 /** Maximum op execution latencies, per op class. */
62 unsigned maxOpLatencies[Num_OpClasses];
62 Cycles maxOpLatencies[Num_OpClasses];
63 /** Maximum issue latencies, per op class. */
63 /** Maximum issue latencies, per op class. */
64 unsigned maxIssueLatencies[Num_OpClasses];
64 Cycles maxIssueLatencies[Num_OpClasses];
65
66 /** Bitvector listing capabilities of this FU pool. */
67 std::bitset<Num_OpClasses> capabilityList;
68
69 /** Bitvector listing which FUs are busy. */
70 std::vector<bool> unitBusy;
71
72 /** List of units to be freed at the end of this cycle. */

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

119 typedef FUPoolParams Params;
120 /** Constructs a FU pool. */
121 FUPool(const Params *p);
122 ~FUPool();
123
124 /** Annotates units that provide memory operations. Included only because
125 * old FU pool provided this function.
126 */
65
66 /** Bitvector listing capabilities of this FU pool. */
67 std::bitset<Num_OpClasses> capabilityList;
68
69 /** Bitvector listing which FUs are busy. */
70 std::vector<bool> unitBusy;
71
72 /** List of units to be freed at the end of this cycle. */

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

119 typedef FUPoolParams Params;
120 /** Constructs a FU pool. */
121 FUPool(const Params *p);
122 ~FUPool();
123
124 /** Annotates units that provide memory operations. Included only because
125 * old FU pool provided this function.
126 */
127 void annotateMemoryUnits(unsigned hit_latency);
127 void annotateMemoryUnits(Cycles hit_latency);
128
129 /**
130 * Gets a FU providing the requested capability. Will mark the unit as busy,
131 * but leaves the freeing of the unit up to the IEW stage.
132 * @param capability The capability requested.
133 * @return Returns -2 if the FU pool does not have the capability, -1 if
134 * there is no free FU, and the FU's index otherwise.
135 */

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

143
144 /** Returns the total number of FUs. */
145 int size() { return numFU; }
146
147 /** Debugging function used to dump FU information. */
148 void dump();
149
150 /** Returns the operation execution latency of the given capability. */
128
129 /**
130 * Gets a FU providing the requested capability. Will mark the unit as busy,
131 * but leaves the freeing of the unit up to the IEW stage.
132 * @param capability The capability requested.
133 * @return Returns -2 if the FU pool does not have the capability, -1 if
134 * there is no free FU, and the FU's index otherwise.
135 */

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

143
144 /** Returns the total number of FUs. */
145 int size() { return numFU; }
146
147 /** Debugging function used to dump FU information. */
148 void dump();
149
150 /** Returns the operation execution latency of the given capability. */
151 unsigned getOpLatency(OpClass capability) {
151 Cycles getOpLatency(OpClass capability) {
152 return maxOpLatencies[capability];
153 }
154
155 /** Returns the issue latency of the given capability. */
152 return maxOpLatencies[capability];
153 }
154
155 /** Returns the issue latency of the given capability. */
156 unsigned getIssueLatency(OpClass capability) {
156 Cycles getIssueLatency(OpClass capability) {
157 return maxIssueLatencies[capability];
158 }
159
160 /** Switches out functional unit pool. */
161 void switchOut();
162
163 /** Takes over from another CPU's thread. */
164 void takeOver();
165};
166
167#endif // __CPU_O3_FU_POOL_HH__
157 return maxIssueLatencies[capability];
158 }
159
160 /** Switches out functional unit pool. */
161 void switchOut();
162
163 /** Takes over from another CPU's thread. */
164 void takeOver();
165};
166
167#endif // __CPU_O3_FU_POOL_HH__