RubyDirectedTester.cc (13784:1941dc118243) RubyDirectedTester.cc (13892:0182a0601f66)
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

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

42#include "cpu/testers/directedtest/RubyDirectedTester.hh"
43
44#include "base/trace.hh"
45#include "cpu/testers/directedtest/DirectedGenerator.hh"
46#include "debug/DirectedTest.hh"
47#include "sim/sim_exit.hh"
48
49RubyDirectedTester::RubyDirectedTester(const Params *p)
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

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

42#include "cpu/testers/directedtest/RubyDirectedTester.hh"
43
44#include "base/trace.hh"
45#include "cpu/testers/directedtest/DirectedGenerator.hh"
46#include "debug/DirectedTest.hh"
47#include "sim/sim_exit.hh"
48
49RubyDirectedTester::RubyDirectedTester(const Params *p)
50 : MemObject(p),
50 : ClockedObject(p),
51 directedStartEvent([this]{ wakeup(); }, "Directed tick",
52 false, Event::CPU_Tick_Pri),
53 m_requests_to_complete(p->requests_to_complete),
54 generator(p->generator)
55{
56 m_requests_completed = 0;
57
58 // create the ports

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

78 generator->setDirectedTester(this);
79}
80
81Port &
82RubyDirectedTester::getPort(const std::string &if_name, PortID idx)
83{
84 if (if_name != "cpuPort") {
85 // pass it along to our super class
51 directedStartEvent([this]{ wakeup(); }, "Directed tick",
52 false, Event::CPU_Tick_Pri),
53 m_requests_to_complete(p->requests_to_complete),
54 generator(p->generator)
55{
56 m_requests_completed = 0;
57
58 // create the ports

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

78 generator->setDirectedTester(this);
79}
80
81Port &
82RubyDirectedTester::getPort(const std::string &if_name, PortID idx)
83{
84 if (if_name != "cpuPort") {
85 // pass it along to our super class
86 return MemObject::getPort(if_name, idx);
86 return ClockedObject::getPort(if_name, idx);
87 } else {
88 if (idx >= static_cast<int>(ports.size())) {
89 panic("RubyDirectedTester::getPort: unknown index %d\n", idx);
90 }
91
92 return *ports[idx];
93 }
94}

--- 50 unchanged lines hidden ---
87 } else {
88 if (idx >= static_cast<int>(ports.size())) {
89 panic("RubyDirectedTester::getPort: unknown index %d\n", idx);
90 }
91
92 return *ports[idx];
93 }
94}

--- 50 unchanged lines hidden ---