Deleted Added
sdiff udiff text old ( 8706:b1838faf3bcc ) new ( 8707:489489c67fd9 )
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;
9 * redistributions in binary form must reproduce the above copyright

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

61 LSQ(O3CPU *cpu_ptr, IEW *iew_ptr, DerivO3CPUParams *params);
62
63 /** Returns the name of the LSQ. */
64 std::string name() const;
65
66 /** Registers statistics of each LSQ unit. */
67 void regStats();
68
69 /** Returns dcache port.
70 * @todo: Dcache port needs to be moved up to this level for SMT
71 * to work. For now it just returns the port from one of the
72 * threads.
73 */
74 Port *getDcachePort() { return &dcachePort; }
75
76 /** Sets the pointer to the list of active threads. */
77 void setActiveThreads(std::list<ThreadID> *at_ptr);
78 /** Switches out the LSQ. */
79 void switchOut();
80 /** Takes over execution from another CPU's thread. */
81 void takeOverFrom();
82
83 /** Number of entries needed for the given amount of threads.*/

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

277 uint8_t *data, int load_idx);
278
279 /** Executes a store operation, using the store specified at the store
280 * index.
281 */
282 Fault write(RequestPtr req, RequestPtr sreqLow, RequestPtr sreqHigh,
283 uint8_t *data, int store_idx);
284
285 /** The CPU pointer. */
286 O3CPU *cpu;
287
288 /** The IEW stage pointer. */
289 IEW *iewStage;
290
291 /** DcachePort class for this LSQ. Handles doing the
292 * communication with the cache/memory.
293 */
294 class DcachePort : public Port
295 {
296 protected:
297 /** Pointer to LSQ. */
298 LSQ *lsq;
299
300 public:
301 /** Default constructor. */
302 DcachePort(LSQ *_lsq)
303 : Port(_lsq->name() + "-dport", _lsq->cpu), lsq(_lsq)
304 { }
305
306 bool snoopRangeSent;
307
308 protected:
309 /** Atomic version of receive. Panics. */
310 virtual Tick recvAtomic(PacketPtr pkt);
311
312 /** Functional version of receive. Panics. */
313 virtual void recvFunctional(PacketPtr pkt);
314
315 /** Receives status change. Other than range changing, panics. */
316 virtual void recvStatusChange(Status status);
317
318 /** Returns the address ranges of this device. */
319 virtual void getDeviceAddressRanges(AddrRangeList &resp,
320 bool &snoop)
321 { resp.clear(); snoop = true; }
322
323 /** Timing version of receive. Handles writing back and
324 * completing the load or store that has returned from
325 * memory. */
326 virtual bool recvTiming(PacketPtr pkt);
327
328 /** Handles doing a retry of the previous send. */
329 virtual void recvRetry();
330 };
331
332 /** D-cache port. */
333 DcachePort dcachePort;
334
335 protected:
336 /** The LSQ policy for SMT mode. */
337 LSQPolicy lsqPolicy;
338
339 /** The LSQ units for individual threads. */
340 LSQUnit thread[Impl::MaxThreads];
341
342 /** List of Active Threads in System. */

--- 42 unchanged lines hidden ---