RubyTester.cc (8975:7f36d4436074) RubyTester.cc (9171:ae88ecf37145)
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

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

40 */
41
42#include "base/misc.hh"
43#include "cpu/testers/rubytest/Check.hh"
44#include "cpu/testers/rubytest/RubyTester.hh"
45#include "debug/RubyTest.hh"
46#include "mem/ruby/common/Global.hh"
47#include "mem/ruby/common/SubBlock.hh"
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

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

40 */
41
42#include "base/misc.hh"
43#include "cpu/testers/rubytest/Check.hh"
44#include "cpu/testers/rubytest/RubyTester.hh"
45#include "debug/RubyTest.hh"
46#include "mem/ruby/common/Global.hh"
47#include "mem/ruby/common/SubBlock.hh"
48#include "mem/ruby/eventqueue/RubyEventQueue.hh"
49#include "mem/ruby/system/System.hh"
50#include "sim/sim_exit.hh"
51#include "sim/system.hh"
52
53RubyTester::RubyTester(const Params *p)
54 : MemObject(p), checkStartEvent(this),
55 _masterId(p->system->getMasterId(name())),
56 m_num_cpus(p->num_cpus),

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

187
188 return writePorts[idx];
189}
190
191void
192RubyTester::hitCallback(NodeID proc, SubBlock* data)
193{
194 // Mark that we made progress
48#include "mem/ruby/system/System.hh"
49#include "sim/sim_exit.hh"
50#include "sim/system.hh"
51
52RubyTester::RubyTester(const Params *p)
53 : MemObject(p), checkStartEvent(this),
54 _masterId(p->system->getMasterId(name())),
55 m_num_cpus(p->num_cpus),

--- 130 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
195 m_last_progress_vector[proc] = g_eventQueue_ptr->getTime();
194 m_last_progress_vector[proc] = g_system_ptr->getTime();
196
197 DPRINTF(RubyTest, "completed request for proc: %d\n", proc);
198 DPRINTF(RubyTest, "addr: 0x%x, size: %d, data: ",
199 data->getAddress(), data->getSize());
200 for (int byte = 0; byte < data->getSize(); byte++) {
201 DPRINTF(RubyTest, "%d", data->getByte(byte));
202 }
203 DPRINTF(RubyTest, "\n");

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

225 exitSimLoop("Ruby Tester completed");
226 }
227}
228
229void
230RubyTester::checkForDeadlock()
231{
232 int size = m_last_progress_vector.size();
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");

--- 21 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();
233 Time current_time = g_eventQueue_ptr->getTime();
232 Time current_time = g_system_ptr->getTime();
234 for (int processor = 0; processor < size; processor++) {
235 if ((current_time - m_last_progress_vector[processor]) >
236 m_deadlock_threshold) {
237 panic("Deadlock detected: current_time: %d last_progress_time: %d "
238 "difference: %d processor: %d\n",
239 current_time, m_last_progress_vector[processor],
240 current_time - m_last_progress_vector[processor], processor);
241 }

--- 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 ---