WireBuffer.cc (10919:80069a602c83) | WireBuffer.cc (11108:6342ddf6d733) |
---|---|
1/* 2 * Copyright (c) 2010 Advanced Micro Devices, Inc. 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; --- 21 unchanged lines hidden (view full) --- 30 */ 31 32#include <algorithm> 33#include <functional> 34 35#include "base/cprintf.hh" 36#include "base/stl_helpers.hh" 37#include "mem/ruby/structures/WireBuffer.hh" | 1/* 2 * Copyright (c) 2010 Advanced Micro Devices, Inc. 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; --- 21 unchanged lines hidden (view full) --- 30 */ 31 32#include <algorithm> 33#include <functional> 34 35#include "base/cprintf.hh" 36#include "base/stl_helpers.hh" 37#include "mem/ruby/structures/WireBuffer.hh" |
38#include "mem/ruby/system/System.hh" | 38#include "mem/ruby/system/RubySystem.hh" |
39 40using namespace std; 41 42// Output operator definition 43 44ostream& 45operator<<(ostream& out, const WireBuffer& obj) 46{ --- 69 unchanged lines hidden (view full) --- 116 MsgPtr node = m_message_queue.front(); 117 pop_heap(m_message_queue.begin(), m_message_queue.end(), greater<MsgPtr>()); 118 119 node->setLastEnqueueTime(m_ruby_system->curCycle() + Cycles(1)); 120 m_message_queue.back() = node; 121 push_heap(m_message_queue.begin(), m_message_queue.end(), 122 greater<MsgPtr>()); 123 m_consumer_ptr-> | 39 40using namespace std; 41 42// Output operator definition 43 44ostream& 45operator<<(ostream& out, const WireBuffer& obj) 46{ --- 69 unchanged lines hidden (view full) --- 116 MsgPtr node = m_message_queue.front(); 117 pop_heap(m_message_queue.begin(), m_message_queue.end(), greater<MsgPtr>()); 118 119 node->setLastEnqueueTime(m_ruby_system->curCycle() + Cycles(1)); 120 m_message_queue.back() = node; 121 push_heap(m_message_queue.begin(), m_message_queue.end(), 122 greater<MsgPtr>()); 123 m_consumer_ptr-> |
124 scheduleEventAbsolute(m_ruby_system->curCycle() + Cycles(1)); | 124 scheduleEventAbsolute(m_ruby_system->clockPeriod() 125 * (m_ruby_system->curCycle() + Cycles(1))); |
125} 126 127bool 128WireBuffer::isReady() 129{ 130 return ((!m_message_queue.empty()) && 131 (m_message_queue.front()->getLastEnqueueTime() <= 132 m_ruby_system->curCycle())); --- 17 unchanged lines hidden --- | 126} 127 128bool 129WireBuffer::isReady() 130{ 131 return ((!m_message_queue.empty()) && 132 (m_message_queue.front()->getLastEnqueueTime() <= 133 m_ruby_system->curCycle())); --- 17 unchanged lines hidden --- |