lsq.hh (4192:7accc6365bb9) | lsq.hh (4329:52057dbec096) |
---|---|
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; --- 43 unchanged lines hidden (view full) --- 52 /** SMT policy. */ 53 enum LSQPolicy { 54 Dynamic, 55 Partitioned, 56 Threshold 57 }; 58 59 /** Constructs an LSQ with the given parameters. */ | 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; --- 43 unchanged lines hidden (view full) --- 52 /** SMT policy. */ 53 enum LSQPolicy { 54 Dynamic, 55 Partitioned, 56 Threshold 57 }; 58 59 /** Constructs an LSQ with the given parameters. */ |
60 LSQ(Params *params); | 60 LSQ(O3CPU *cpu_ptr, IEW *iew_ptr, Params *params); |
61 62 /** Returns the name of the LSQ. */ 63 std::string name() const; 64 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 &dcachePort; } 74 75 /** Sets the pointer to the list of active threads. */ 76 void setActiveThreads(std::list<unsigned> *at_ptr); | 61 62 /** Returns the name of the LSQ. */ 63 std::string name() const; 64 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 &dcachePort; } 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. */ 82 void switchOut(); 83 /** Takes over execution from another CPU's thread. */ 84 void takeOverFrom(); 85 86 /** Number of entries needed for the given amount of threads.*/ 87 int entryAmount(int num_threads); 88 void removeEntries(unsigned tid); --- 189 unchanged lines hidden (view full) --- 278 Fault read(RequestPtr req, T &data, int load_idx); 279 280 /** Executes a store operation, using the store specified at the store 281 * index. 282 */ 283 template <class T> 284 Fault write(RequestPtr req, T &data, int store_idx); 285 | 77 /** Switches out the LSQ. */ 78 void switchOut(); 79 /** Takes over execution from another CPU's thread. */ 80 void takeOverFrom(); 81 82 /** Number of entries needed for the given amount of threads.*/ 83 int entryAmount(int num_threads); 84 void removeEntries(unsigned tid); --- 189 unchanged lines hidden (view full) --- 274 Fault read(RequestPtr req, T &data, int load_idx); 275 276 /** Executes a store operation, using the store specified at the store 277 * index. 278 */ 279 template <class T> 280 Fault write(RequestPtr req, T &data, int store_idx); 281 |
282 /** The CPU pointer. */ 283 O3CPU *cpu; 284 285 /** The IEW stage pointer. */ 286 IEW *iewStage; 287 |
|
286 /** DcachePort class for this LSQ. Handles doing the 287 * communication with the cache/memory. 288 */ 289 class DcachePort : public Port 290 { 291 protected: 292 /** Pointer to LSQ. */ 293 LSQ *lsq; 294 295 public: 296 /** Default constructor. */ 297 DcachePort(LSQ *_lsq) | 288 /** DcachePort class for this LSQ. Handles doing the 289 * communication with the cache/memory. 290 */ 291 class DcachePort : public Port 292 { 293 protected: 294 /** Pointer to LSQ. */ 295 LSQ *lsq; 296 297 public: 298 /** Default constructor. */ 299 DcachePort(LSQ *_lsq) |
298 : lsq(_lsq) | 300 : Port(_lsq->name() + "-dport"), lsq(_lsq) |
299 { } 300 301 bool snoopRangeSent; 302 303 virtual void setPeer(Port *port); 304 305 protected: 306 /** Atomic version of receive. Panics. */ --- 29 unchanged lines hidden (view full) --- 336 337 protected: 338 /** The LSQ policy for SMT mode. */ 339 LSQPolicy lsqPolicy; 340 341 /** The LSQ units for individual threads. */ 342 LSQUnit thread[Impl::MaxThreads]; 343 | 301 { } 302 303 bool snoopRangeSent; 304 305 virtual void setPeer(Port *port); 306 307 protected: 308 /** Atomic version of receive. Panics. */ --- 29 unchanged lines hidden (view full) --- 338 339 protected: 340 /** The LSQ policy for SMT mode. */ 341 LSQPolicy lsqPolicy; 342 343 /** The LSQ units for individual threads. */ 344 LSQUnit thread[Impl::MaxThreads]; 345 |
344 /** The CPU pointer. */ 345 O3CPU *cpu; 346 347 /** The IEW stage pointer. */ 348 IEW *iewStage; 349 | |
350 /** List of Active Threads in System. */ 351 std::list<unsigned> *activeThreads; 352 353 /** Total Size of LQ Entries. */ 354 unsigned LQEntries; 355 /** Total Size of SQ Entries. */ 356 unsigned SQEntries; 357 --- 35 unchanged lines hidden --- | 346 /** List of Active Threads in System. */ 347 std::list<unsigned> *activeThreads; 348 349 /** Total Size of LQ Entries. */ 350 unsigned LQEntries; 351 /** Total Size of SQ Entries. */ 352 unsigned SQEntries; 353 --- 35 unchanged lines hidden --- |