RubyTester.cc (9542:683991c46ac8) RubyTester.cc (10302:0e9e99e6369a)
1/*
2 * Copyright (c) 2012-2013 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

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

97
98void
99RubyTester::init()
100{
101 assert(writePorts.size() > 0 && readPorts.size() > 0);
102
103 m_last_progress_vector.resize(m_num_cpus);
104 for (int i = 0; i < m_last_progress_vector.size(); i++) {
1/*
2 * Copyright (c) 2012-2013 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

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

97
98void
99RubyTester::init()
100{
101 assert(writePorts.size() > 0 && readPorts.size() > 0);
102
103 m_last_progress_vector.resize(m_num_cpus);
104 for (int i = 0; i < m_last_progress_vector.size(); i++) {
105 m_last_progress_vector[i] = 0;
105 m_last_progress_vector[i] = Cycles(0);
106 }
107
108 m_num_writers = writePorts.size();
109 m_num_readers = readPorts.size();
110
111 m_checkTable_ptr = new CheckTable(m_num_writers, m_num_readers, this);
112}
113

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

220 exitSimLoop("Ruby Tester completed");
221 }
222}
223
224void
225RubyTester::checkForDeadlock()
226{
227 int size = m_last_progress_vector.size();
106 }
107
108 m_num_writers = writePorts.size();
109 m_num_readers = readPorts.size();
110
111 m_checkTable_ptr = new CheckTable(m_num_writers, m_num_readers, this);
112}
113

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

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

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

--- 14 unchanged lines hidden ---