MessageBuffer.cc (10348:c91b23c72d5e) MessageBuffer.cc (10524:fff17530cef6)
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;

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

139 time += Cycles(100 + random_mt.random(1, 15)); // 100 + [1...15]
140 }
141 return time;
142}
143
144void
145MessageBuffer::enqueue(MsgPtr message, Cycles delta)
146{
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;

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

139 time += Cycles(100 + random_mt.random(1, 15)); // 100 + [1...15]
140 }
141 return time;
142}
143
144void
145MessageBuffer::enqueue(MsgPtr message, Cycles delta)
146{
147 m_msg_counter++;
147 assert(m_ordering_set);
148
149 // record current time incase we have a pop that also adjusts my size
150 if (m_time_last_time_enqueue < m_sender->curCycle()) {
151 m_msgs_this_cycle = 0; // first msg this cycle
152 m_time_last_time_enqueue = m_sender->curCycle();
153 }
148
149 // record current time incase we have a pop that also adjusts my size
150 if (m_time_last_time_enqueue < m_sender->curCycle()) {
151 m_msgs_this_cycle = 0; // first msg this cycle
152 m_time_last_time_enqueue = m_sender->curCycle();
153 }
154
155 m_msg_counter++;
154 m_msgs_this_cycle++;
155
156 m_msgs_this_cycle++;
157
156 assert(m_ordering_set);
157
158 // Calculate the arrival time of the message, that is, the first
159 // cycle the message can be dequeued.
160 assert(delta > 0);
161 Tick current_time = m_sender->clockEdge();
162 Tick arrival_time = 0;
163
164 if (!RubySystem::getRandomization() || !m_randomization) {
165 // No randomization

--- 258 unchanged lines hidden ---
158 // Calculate the arrival time of the message, that is, the first
159 // cycle the message can be dequeued.
160 assert(delta > 0);
161 Tick current_time = m_sender->clockEdge();
162 Tick arrival_time = 0;
163
164 if (!RubySystem::getRandomization() || !m_randomization) {
165 // No randomization

--- 258 unchanged lines hidden ---