Deleted Added
sdiff udiff text old ( 4192:7accc6365bb9 ) new ( 4318:eb4241362a80 )
full compact
1/*
2 * Copyright (c) 2005-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;

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

107}
108
109template <class Impl>
110LSQ<Impl>::LSQ(Params *params)
111 : dcachePort(this), LQEntries(params->LQEntries),
112 SQEntries(params->SQEntries), numThreads(params->numberOfThreads),
113 retryTid(-1)
114{
115 dcachePort.snoopRangeSent = false;
116
117 //**********************************************/
118 //************ Handle SMT Parameters ***********/
119 //**********************************************/
120 std::string policy = params->smtLSQPolicy;
121
122 //Convert string to lowercase
123 std::transform(policy.begin(), policy.end(), policy.begin(),
124 (int(*)(int)) tolower);
125
126 //Figure out fetch policy
127 if (policy == "dynamic") {
128 lsqPolicy = Dynamic;
129
130 maxLQEntries = LQEntries;
131 maxSQEntries = SQEntries;
132/*
133 DPRINTF(LSQ, "LSQ sharing policy set to Dynamic\n");
134*/
135 } else if (policy == "partitioned") {
136 lsqPolicy = Partitioned;
137
138 //@todo:make work if part_amt doesnt divide evenly.
139 maxLQEntries = LQEntries / numThreads;
140 maxSQEntries = SQEntries / numThreads;
141/*
142 DPRINTF(Fetch, "LSQ sharing policy set to Partitioned: "
143 "%i entries per LQ | %i entries per SQ",
144 maxLQEntries,maxSQEntries);
145*/
146 } else if (policy == "threshold") {
147 lsqPolicy = Threshold;
148
149 assert(params->smtLSQThreshold > LQEntries);
150 assert(params->smtLSQThreshold > SQEntries);
151
152 //Divide up by threshold amount
153 //@todo: Should threads check the max and the total
154 //amount of the LSQ
155 maxLQEntries = params->smtLSQThreshold;
156 maxSQEntries = params->smtLSQThreshold;
157/*
158 DPRINTF(LSQ, "LSQ sharing policy set to Threshold: "
159 "%i entries per LQ | %i entries per SQ",
160 maxLQEntries,maxSQEntries);
161*/
162
163 } else {
164 assert(0 && "Invalid LSQ Sharing Policy.Options Are:{Dynamic,"
165 "Partitioned, Threshold}");
166 }
167
168 //Initialize LSQs
169 for (int tid=0; tid < numThreads; tid++) {

--- 479 unchanged lines hidden ---