diff options
author | Nathan Binkert <nate@binkert.org> | 2011-01-10 11:11:20 -0800 |
---|---|---|
committer | Nathan Binkert <nate@binkert.org> | 2011-01-10 11:11:20 -0800 |
commit | bd18ac82877072a87745aaf7a104e7bb036c6c66 (patch) | |
tree | 0fb980aea5b81d79160105fbf505670be0cf5e72 /src/mem/ruby/tester | |
parent | 8e262adf4fcc009776810b9795f907fcd468591c (diff) | |
download | gem5-bd18ac82877072a87745aaf7a104e7bb036c6c66.tar.xz |
ruby: get rid of ruby's Debug.hh
Get rid of the Debug class
Get rid of ASSERT and use assert
Use DPRINTFR for ProtocolTrace
Diffstat (limited to 'src/mem/ruby/tester')
-rw-r--r-- | src/mem/ruby/tester/DeterministicDriver.cc | 11 | ||||
-rw-r--r-- | src/mem/ruby/tester/RaceyDriver.cc | 8 | ||||
-rw-r--r-- | src/mem/ruby/tester/RaceyPseudoThread.cc | 10 | ||||
-rw-r--r-- | src/mem/ruby/tester/test_framework.cc | 2 |
4 files changed, 13 insertions, 18 deletions
diff --git a/src/mem/ruby/tester/DeterministicDriver.cc b/src/mem/ruby/tester/DeterministicDriver.cc index 533f58e6f..9b0fe7967 100644 --- a/src/mem/ruby/tester/DeterministicDriver.cc +++ b/src/mem/ruby/tester/DeterministicDriver.cc @@ -27,10 +27,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* - * $Id$ - * - */ +#include <cassert> #include "base/misc.hh" #include "mem/ruby/common/Global.hh" @@ -127,7 +124,7 @@ void DeterministicDriver::wakeup() { void DeterministicDriver::hitCallback(int64_t request_id) { - ASSERT(requests.find(request_id) != requests.end()); + assert(requests.find(request_id) != requests.end()); int proc = requests[request_id].first; Address address = requests[request_id].second; @@ -177,7 +174,7 @@ bool DeterministicDriver::isAddrReady(NodeID node, vector<NodeID> addr_vector, A { int addr_number = addr.getAddress()/DATA_BLOCK_BYTES; - ASSERT ((addr_number >= 0) && (addr_number < addr_vector.size())); + assert((addr_number >= 0) && (addr_number < addr_vector.size())); if (((addr_vector[addr_number]+1)%m_num_procs == node) && (m_loads_completed+m_stores_completed >= m_numCompletionsPerNode*node) && // is this node next @@ -226,7 +223,7 @@ Address DeterministicDriver::getNextAddr(NodeID node, vector<NodeID> addr_vector Address addr; // should only be called if we know a addr is ready for the node - ASSERT(isAddrReady(node, addr_vector)); + assert(isAddrReady(node, addr_vector)); for (int addr_number=0; addr_number<addr_vector.size(); addr_number++) { diff --git a/src/mem/ruby/tester/RaceyDriver.cc b/src/mem/ruby/tester/RaceyDriver.cc index a9f716334..bc41b0281 100644 --- a/src/mem/ruby/tester/RaceyDriver.cc +++ b/src/mem/ruby/tester/RaceyDriver.cc @@ -27,10 +27,8 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* - * $Id$ - * - */ +#include <cassert> + #include "mem/ruby/common/Global.hh" #include "mem/ruby/tester/Tester_Globals.hh" #include "mem/ruby/tester/RaceyDriver.hh" @@ -77,7 +75,7 @@ void RaceyDriver::go() { void RaceyDriver::hitCallback(int64_t request_id) { - ASSERT(requests.find(request_id) != requests.end()); + assert(requests.find(request_id) != requests.end()); int proc = requests[request_id].first; Address address = requests[request_id].second.address; uint8_t * data = new uint8_t[4]; diff --git a/src/mem/ruby/tester/RaceyPseudoThread.cc b/src/mem/ruby/tester/RaceyPseudoThread.cc index cfe4078cf..ae01585e6 100644 --- a/src/mem/ruby/tester/RaceyPseudoThread.cc +++ b/src/mem/ruby/tester/RaceyPseudoThread.cc @@ -30,6 +30,8 @@ * Description: see RaceyPseudoThread.h */ +#include <cassert> + #include "mem/ruby/tester/RaceyPseudoThread.hh" #include "mem/ruby/tester/RaceyDriver.hh" #include "gzstream.hh" @@ -221,7 +223,7 @@ void RaceyPseudoThread::load_sig(unsigned index) { // pc is zero, problem? int64_t request_id = libruby_issue_request(libruby_get_port_by_name(port_name), RubyRequest(sig(index), read_data, 4, 0, RubyRequestType_LD, RubyAccessMode_User)); - ASSERT(m_driver.requests.find(request_id) == m_driver.requests.end()); + assert(m_driver.requests.find(request_id) == m_driver.requests.end()); struct address_data request_data; request_data.address = Address(sig(index)); @@ -248,7 +250,7 @@ void RaceyPseudoThread::load_m(unsigned index) { // pc is zero, problem? int64_t request_id = libruby_issue_request(libruby_get_port_by_name(port_name), RubyRequest(m(index), read_data, 4, 0, RubyRequestType_LD, RubyAccessMode_User)); - ASSERT(m_driver.requests.find(request_id) == m_driver.requests.end()); + assert(m_driver.requests.find(request_id) == m_driver.requests.end()); struct address_data request_data; request_data.address = Address(m(index)); @@ -279,7 +281,7 @@ void RaceyPseudoThread::store_sig(unsigned index, unsigned value) { // pc is zero, problem? int64_t request_id = libruby_issue_request(libruby_get_port_by_name(port_name), RubyRequest(sig(index), write_data, 4, 0, RubyRequestType_ST, RubyAccessMode_User)); - ASSERT(m_driver.requests.find(request_id) == m_driver.requests.end()); + assert(m_driver.requests.find(request_id) == m_driver.requests.end()); struct address_data request_data; request_data.address = Address(sig(index)); @@ -308,7 +310,7 @@ void RaceyPseudoThread::store_m(unsigned index, unsigned value) { // pc is zero, problem? int64_t request_id = libruby_issue_request(libruby_get_port_by_name(port_name), RubyRequest(m(index), write_data, 4, 0, RubyRequestType_ST, RubyAccessMode_User)); - ASSERT(m_driver.requests.find(request_id) == m_driver.requests.end()); + assert(m_driver.requests.find(request_id) == m_driver.requests.end()); struct address_data request_data; request_data.address = Address(m(index)); diff --git a/src/mem/ruby/tester/test_framework.cc b/src/mem/ruby/tester/test_framework.cc index 2dcace49d..6728f9e08 100644 --- a/src/mem/ruby/tester/test_framework.cc +++ b/src/mem/ruby/tester/test_framework.cc @@ -366,8 +366,6 @@ static void usageInstructions() } cerr << endl; - g_debug_ptr->usageInstructions(); - cerr << endl; exit(1); } |