# HG changeset patch # User Brad Beckmann <brad.beckm...@amd.com> # Date 1260657435 28800 # Node ID 856ecd55b3729ea5f083b76bc4750a29b008b707 # Parent 8b7cf38ad6de8a71ddcc3044abab28c7ec0d2599 ruby: Converted the sequencer deadlock event to m5 eventq
diff -r 8b7cf38ad6de -r 856ecd55b372 src/mem/ruby/system/Sequencer.cc --- a/src/mem/ruby/system/Sequencer.cc Sat Dec 12 14:37:15 2009 -0800 +++ b/src/mem/ruby/system/Sequencer.cc Sat Dec 12 14:37:15 2009 -0800 @@ -60,9 +60,9 @@ Sequencer::Sequencer(const Params *p) - : RubyPort(p) + : RubyPort(p), deadlockCheckEvent(this) { - m_deadlock_check_scheduled = false; + //m_deadlock_check_scheduled = false; m_outstanding_count = 0; m_max_outstanding_requests = 0; @@ -128,10 +128,11 @@ assert(m_outstanding_count == total_outstanding); if (m_outstanding_count > 0) { // If there are still outstanding requests, keep checking - g_eventQueue_ptr->scheduleEvent(this, m_deadlock_threshold); - } else { - m_deadlock_check_scheduled = false; - } + schedule(deadlockCheckEvent, m_deadlock_threshold); + //g_eventQueue_ptr->scheduleEvent(this, m_deadlock_threshold); + } // else { +// m_deadlock_check_scheduled = false; +// } } void Sequencer::printProgress(ostream& out) const{ @@ -190,10 +191,13 @@ assert(m_outstanding_count == total_outstanding); // See if we should schedule a deadlock check - if (m_deadlock_check_scheduled == false) { - g_eventQueue_ptr->scheduleEvent(this, m_deadlock_threshold); - m_deadlock_check_scheduled = true; + if (deadlockCheckEvent.scheduled() == false) { + schedule(deadlockCheckEvent, m_deadlock_threshold); } +// if (m_deadlock_check_scheduled == false) { +// g_eventQueue_ptr->scheduleEvent(this, m_deadlock_threshold); +// m_deadlock_check_scheduled = true; +// } Address line_addr(request->ruby_request.paddr); line_addr.makeLineAddress(); diff -r 8b7cf38ad6de -r 856ecd55b372 src/mem/ruby/system/Sequencer.hh --- a/src/mem/ruby/system/Sequencer.hh Sat Dec 12 14:37:15 2009 -0800 +++ b/src/mem/ruby/system/Sequencer.hh Sat Dec 12 14:37:15 2009 -0800 @@ -124,6 +124,18 @@ bool m_deadlock_check_scheduled; int m_servicing_atomic; int m_atomics_counter; + + class SequencerWakeupEvent : public Event + { + Sequencer *m_sequencer_ptr; + + public: + SequencerWakeupEvent(Sequencer *_seq) : m_sequencer_ptr(_seq) {} + void process() { m_sequencer_ptr->wakeup(); } + const char *description() const { return "Sequencer deadlock check"; } + }; + + SequencerWakeupEvent deadlockCheckEvent; }; // Output operator declaration @@ -140,5 +152,6 @@ return out; } + #endif //SEQUENCER_H _______________________________________________ m5-dev mailing list m5-dev@m5sim.org http://m5sim.org/mailman/listinfo/m5-dev