Deleted Added
sdiff udiff text old ( 2871:7ed5c9ef3eb6 ) new ( 2907:7b0ababb4166 )
full compact
1/*
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;

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

65 /** Registers statistics of each LSQ unit. */
66 void regStats();
67
68 /** Returns dcache port.
69 * @todo: Dcache port needs to be moved up to this level for SMT
70 * to work. For now it just returns the port from one of the
71 * threads.
72 */
73 Port *getDcachePort() { return thread[0].getDcachePort(); }
74
75 /** Sets the pointer to the list of active threads. */
76 void setActiveThreads(std::list<unsigned> *at_ptr);
77 /** Sets the CPU pointer. */
78 void setCPU(O3CPU *cpu_ptr);
79 /** Sets the IEW stage pointer. */
80 void setIEW(IEW *iew_ptr);
81 /** Switches out the LSQ. */

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

253 /** Returns if the LSQ will write back to memory this cycle. */
254 bool willWB();
255 /** Returns if the LSQ of a specific thread will write back to memory this
256 * cycle.
257 */
258 bool willWB(unsigned tid)
259 { return thread[tid].willWB(); }
260
261 /** Debugging function to print out all instructions. */
262 void dumpInsts();
263 /** Debugging function to print out instructions from a specific thread. */
264 void dumpInsts(unsigned tid)
265 { thread[tid].dumpInsts(); }
266
267 /** Executes a read operation, using the load specified at the load index. */
268 template <class T>
269 Fault read(RequestPtr req, T &data, int load_idx);
270
271 /** Executes a store operation, using the store specified at the store
272 * index.
273 */
274 template <class T>
275 Fault write(RequestPtr req, T &data, int store_idx);
276
277 private:
278 /** The LSQ policy for SMT mode. */
279 LSQPolicy lsqPolicy;
280
281 /** The LSQ units for individual threads. */
282 LSQUnit thread[Impl::MaxThreads];
283
284 /** The CPU pointer. */
285 O3CPU *cpu;

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

298 /** Max LQ Size - Used to Enforce Sharing Policies. */
299 unsigned maxLQEntries;
300
301 /** Max SQ Size - Used to Enforce Sharing Policies. */
302 unsigned maxSQEntries;
303
304 /** Number of Threads. */
305 unsigned numThreads;
306};
307
308template <class Impl>
309template <class T>
310Fault
311LSQ<Impl>::read(RequestPtr req, T &data, int load_idx)
312{
313 unsigned tid = req->getThreadNum();

--- 15 unchanged lines hidden ---