RubyTester.cc (9294:8fb03b13de02) RubyTester.cc (9475:736909f5c13b)
1/*
2 * Copyright (c) 2012 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

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

186
187 return writePorts[idx];
188}
189
190void
191RubyTester::hitCallback(NodeID proc, SubBlock* data)
192{
193 // Mark that we made progress
1/*
2 * Copyright (c) 2012 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

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

186
187 return writePorts[idx];
188}
189
190void
191RubyTester::hitCallback(NodeID proc, SubBlock* data)
192{
193 // Mark that we made progress
194 m_last_progress_vector[proc] = g_system_ptr->getTime();
194 m_last_progress_vector[proc] = curCycle();
195
196 DPRINTF(RubyTest, "completed request for proc: %d\n", proc);
197 DPRINTF(RubyTest, "addr: 0x%x, size: %d, data: ",
198 data->getAddress(), data->getSize());
199 for (int byte = 0; byte < data->getSize(); byte++) {
200 DPRINTF(RubyTest, "%d", data->getByte(byte));
201 }
202 DPRINTF(RubyTest, "\n");
203
204 // This tells us our store has 'completed' or for a load gives us
205 // back the data to make the check
206 Check* check_ptr = m_checkTable_ptr->getCheck(data->getAddress());
207 assert(check_ptr != NULL);
195
196 DPRINTF(RubyTest, "completed request for proc: %d\n", proc);
197 DPRINTF(RubyTest, "addr: 0x%x, size: %d, data: ",
198 data->getAddress(), data->getSize());
199 for (int byte = 0; byte < data->getSize(); byte++) {
200 DPRINTF(RubyTest, "%d", data->getByte(byte));
201 }
202 DPRINTF(RubyTest, "\n");
203
204 // This tells us our store has 'completed' or for a load gives us
205 // back the data to make the check
206 Check* check_ptr = m_checkTable_ptr->getCheck(data->getAddress());
207 assert(check_ptr != NULL);
208 check_ptr->performCallback(proc, data);
208 check_ptr->performCallback(proc, data, curCycle());
209}
210
211void
212RubyTester::wakeup()
213{
214 if (m_checks_completed < m_checks_to_complete) {
215 // Try to perform an action or check
216 Check* check_ptr = m_checkTable_ptr->getRandomCheck();

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

224 exitSimLoop("Ruby Tester completed");
225 }
226}
227
228void
229RubyTester::checkForDeadlock()
230{
231 int size = m_last_progress_vector.size();
209}
210
211void
212RubyTester::wakeup()
213{
214 if (m_checks_completed < m_checks_to_complete) {
215 // Try to perform an action or check
216 Check* check_ptr = m_checkTable_ptr->getRandomCheck();

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

224 exitSimLoop("Ruby Tester completed");
225 }
226}
227
228void
229RubyTester::checkForDeadlock()
230{
231 int size = m_last_progress_vector.size();
232 Time current_time = g_system_ptr->getTime();
232 Time current_time = curCycle();
233 for (int processor = 0; processor < size; processor++) {
234 if ((current_time - m_last_progress_vector[processor]) >
235 m_deadlock_threshold) {
236 panic("Deadlock detected: current_time: %d last_progress_time: %d "
237 "difference: %d processor: %d\n",
238 current_time, m_last_progress_vector[processor],
239 current_time - m_last_progress_vector[processor], processor);
240 }

--- 14 unchanged lines hidden ---
233 for (int processor = 0; processor < size; processor++) {
234 if ((current_time - m_last_progress_vector[processor]) >
235 m_deadlock_threshold) {
236 panic("Deadlock detected: current_time: %d last_progress_time: %d "
237 "difference: %d processor: %d\n",
238 current_time, m_last_progress_vector[processor],
239 current_time - m_last_progress_vector[processor], processor);
240 }

--- 14 unchanged lines hidden ---