Sequencer.hh (7039:bc0b6ea676b5) | Sequencer.hh (7055:4e24742201d7) |
---|---|
1/* 2 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 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; --- 15 unchanged lines hidden (view full) --- 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 */ 28 29#ifndef __MEM_RUBY_SYSTEM_SEQUENCER_HH__ 30#define __MEM_RUBY_SYSTEM_SEQUENCER_HH__ 31 | 1/* 2 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 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; --- 15 unchanged lines hidden (view full) --- 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 */ 28 29#ifndef __MEM_RUBY_SYSTEM_SEQUENCER_HH__ 30#define __MEM_RUBY_SYSTEM_SEQUENCER_HH__ 31 |
32#include <iostream> 33 |
|
32#include "mem/gems_common/Map.hh" 33#include "mem/protocol/AccessModeType.hh" 34#include "mem/protocol/CacheRequestType.hh" 35#include "mem/protocol/GenericMachineType.hh" 36#include "mem/protocol/PrefetchBit.hh" 37#include "mem/ruby/common/Address.hh" 38#include "mem/ruby/common/Consumer.hh" 39#include "mem/ruby/common/Global.hh" --- 23 unchanged lines hidden (view full) --- 63 public: 64 typedef RubySequencerParams Params; 65 Sequencer(const Params *); 66 ~Sequencer(); 67 68 // Public Methods 69 void wakeup(); // Used only for deadlock detection 70 | 34#include "mem/gems_common/Map.hh" 35#include "mem/protocol/AccessModeType.hh" 36#include "mem/protocol/CacheRequestType.hh" 37#include "mem/protocol/GenericMachineType.hh" 38#include "mem/protocol/PrefetchBit.hh" 39#include "mem/ruby/common/Address.hh" 40#include "mem/ruby/common/Consumer.hh" 41#include "mem/ruby/common/Global.hh" --- 23 unchanged lines hidden (view full) --- 65 public: 66 typedef RubySequencerParams Params; 67 Sequencer(const Params *); 68 ~Sequencer(); 69 70 // Public Methods 71 void wakeup(); // Used only for deadlock detection 72 |
71 void printConfig(ostream& out) const; | 73 void printConfig(std::ostream& out) const; |
72 | 74 |
73 void printProgress(ostream& out) const; | 75 void printProgress(std::ostream& out) const; |
74 75 void writeCallback(const Address& address, DataBlock& data); 76 void readCallback(const Address& address, DataBlock& data); 77 78 RequestStatus makeRequest(const RubyRequest & request); 79 RequestStatus getRequestStatus(const RubyRequest& request); 80 bool empty() const; 81 | 76 77 void writeCallback(const Address& address, DataBlock& data); 78 void readCallback(const Address& address, DataBlock& data); 79 80 RequestStatus makeRequest(const RubyRequest & request); 81 RequestStatus getRequestStatus(const RubyRequest& request); 82 bool empty() const; 83 |
82 void print(ostream& out) const; 83 void printStats(ostream & out) const; | 84 void print(std::ostream& out) const; 85 void printStats(std::ostream& out) const; |
84 void checkCoherence(const Address& address); 85 86 void removeRequest(SequencerRequest* request); 87 88 private: 89 bool tryCacheAccess(const Address& addr, CacheRequestType type, 90 const Address& pc, AccessModeType access_mode, 91 int size, DataBlock*& data_ptr); --- 36 unchanged lines hidden (view full) --- 128 SequencerWakeupEvent(Sequencer *_seq) : m_sequencer_ptr(_seq) {} 129 void process() { m_sequencer_ptr->wakeup(); } 130 const char *description() const { return "Sequencer deadlock check"; } 131 }; 132 133 SequencerWakeupEvent deadlockCheckEvent; 134}; 135 | 86 void checkCoherence(const Address& address); 87 88 void removeRequest(SequencerRequest* request); 89 90 private: 91 bool tryCacheAccess(const Address& addr, CacheRequestType type, 92 const Address& pc, AccessModeType access_mode, 93 int size, DataBlock*& data_ptr); --- 36 unchanged lines hidden (view full) --- 130 SequencerWakeupEvent(Sequencer *_seq) : m_sequencer_ptr(_seq) {} 131 void process() { m_sequencer_ptr->wakeup(); } 132 const char *description() const { return "Sequencer deadlock check"; } 133 }; 134 135 SequencerWakeupEvent deadlockCheckEvent; 136}; 137 |
136inline ostream& 137operator<<(ostream& out, const Sequencer& obj) | 138inline std::ostream& 139operator<<(std::ostream& out, const Sequencer& obj) |
138{ 139 obj.print(out); | 140{ 141 obj.print(out); |
140 out << flush; | 142 out << std::flush; |
141 return out; 142} 143 144#endif // __MEM_RUBY_SYSTEM_SEQUENCER_HH__ 145 | 143 return out; 144} 145 146#endif // __MEM_RUBY_SYSTEM_SEQUENCER_HH__ 147 |