summaryrefslogtreecommitdiff
path: root/src/mem
diff options
context:
space:
mode:
authorBrad Beckmann <Brad.Beckmann@amd.com>2010-08-20 11:46:13 -0700
committerBrad Beckmann <Brad.Beckmann@amd.com>2010-08-20 11:46:13 -0700
commit6a4f99899b080b1afd68b0aaff24d2c2867b6c77 (patch)
tree1b4fcde90c323d60d7a1c40f7e1822c1a23e2bf4 /src/mem
parent984adf198ae60eb0d32d0818fc6233d4475b6eb1 (diff)
downloadgem5-6a4f99899b080b1afd68b0aaff24d2c2867b6c77.tar.xz
ruby: Resurrected Ruby's deterministic tests
Added the request series and invalidate deterministic tests as new cpu models and removed the no longer needed ruby tests --HG-- rename : configs/example/rubytest.py => configs/example/determ_test.py rename : src/mem/ruby/tester/DetermGETXGenerator.cc => src/cpu/directedtest/DirectedGenerator.cc rename : src/mem/ruby/tester/DetermGETXGenerator.hh => src/cpu/directedtest/DirectedGenerator.hh rename : src/mem/ruby/tester/DetermGETXGenerator.cc => src/cpu/directedtest/InvalidateGenerator.cc rename : src/mem/ruby/tester/DetermGETXGenerator.hh => src/cpu/directedtest/InvalidateGenerator.hh rename : src/cpu/rubytest/RubyTester.cc => src/cpu/directedtest/RubyDirectedTester.cc rename : src/cpu/rubytest/RubyTester.hh => src/cpu/directedtest/RubyDirectedTester.hh rename : src/mem/ruby/tester/DetermGETXGenerator.cc => src/cpu/directedtest/SeriesRequestGenerator.cc rename : src/mem/ruby/tester/DetermGETXGenerator.hh => src/cpu/directedtest/SeriesRequestGenerator.hh
Diffstat (limited to 'src/mem')
-rw-r--r--src/mem/protocol/RubySlicc_Exports.sm45
-rw-r--r--src/mem/ruby/tester/DetermGETXGenerator.cc176
-rw-r--r--src/mem/ruby/tester/DetermGETXGenerator.hh105
-rw-r--r--src/mem/ruby/tester/DetermInvGenerator.cc220
-rw-r--r--src/mem/ruby/tester/DetermInvGenerator.hh105
-rw-r--r--src/mem/ruby/tester/DetermSeriesGETSGenerator.cc150
-rw-r--r--src/mem/ruby/tester/DetermSeriesGETSGenerator.hh102
-rw-r--r--src/mem/ruby/tester/SConscript4
8 files changed, 9 insertions, 898 deletions
diff --git a/src/mem/protocol/RubySlicc_Exports.sm b/src/mem/protocol/RubySlicc_Exports.sm
index 4cea7c379..574307341 100644
--- a/src/mem/protocol/RubySlicc_Exports.sm
+++ b/src/mem/protocol/RubySlicc_Exports.sm
@@ -65,45 +65,18 @@ enumeration(TesterStatus, desc="...") {
Check_Pending, desc="Check Pending";
}
-// SpecifiedGeneratorTypes
-enumeration(SpecifiedGeneratorType, desc="...") {
- DetermGETXGenerator, desc="deterministic GETX Tester";
- DetermInvGenerator, desc="deterministic all shared then invalidate Tester";
- DetermSeriesGETSGenerator, desc="deterministic Series of GETSs Tester for prefetcher tuning";
+// InvalidateGeneratorStatus
+enumeration(InvalidateGeneratorStatus, desc="...") {
+ Load_Waiting, desc="Load waiting to be issued";
+ Load_Pending, desc="Load issued";
+ Inv_Waiting, desc="Store (invalidate) waiting to be issued";
+ Inv_Pending, desc="Store (invalidate) issued";
}
-// RequestGeneratorStatus
-enumeration(RequestGeneratorStatus, desc="...") {
- Thinking, desc="Doing work between release and next acquire";
- Test_Pending, desc="Test pending";
- Before_Swap, desc="We're about to perform the swap";
- Swap_Pending, desc="The swap used for test-and-send is pending";
- Holding, desc="We are holding the lock performing the critical section";
- Release_Pending, desc="The write for the release is pending";
- Done, desc="Done, waiting for end of run";
-}
-
-// DetermGETXGeneratorStatus
-enumeration(DetermGETXGeneratorStatus, desc="...") {
- Thinking, desc="Doing work before next action";
- Store_Pending, desc="Store pending";
- Done, desc="Done, waiting for end of run";
-}
-
-// DetermGETXGeneratorStatus
-enumeration(DetermInvGeneratorStatus, desc="...") {
- Thinking, desc="Doing work before next action";
- Store_Pending, desc="Store pending";
- Load_Complete, desc="Load complete";
- Load_Pending, desc="Load pending";
- Done, desc="Done, waiting for end of run";
-}
-
-// DetermSeriesGETSGeneratorStatus
-enumeration(DetermSeriesGETSGeneratorStatus, desc="...") {
+// SeriesRequestGeneratorStatus
+enumeration(SeriesRequestGeneratorStatus, desc="...") {
Thinking, desc="Doing work before next action";
- Load_Pending, desc="Load pending";
- Done, desc="Done, waiting for end of run";
+ Request_Pending, desc="Request pending";
}
// LockStatus
diff --git a/src/mem/ruby/tester/DetermGETXGenerator.cc b/src/mem/ruby/tester/DetermGETXGenerator.cc
deleted file mode 100644
index 934b6d4e5..000000000
--- a/src/mem/ruby/tester/DetermGETXGenerator.cc
+++ /dev/null
@@ -1,176 +0,0 @@
-/*
- * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met: redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer;
- * redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution;
- * neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * $Id$
- *
- */
-
-// This Deterministic Generator generates GETX requests for all nodes in the system
-// The GETX requests are generated one at a time in round-robin fashion 0...1...2...etc.
-
-#include "mem/ruby/tester/DetermGETXGenerator.hh"
-#include "mem/protocol/DetermGETXGeneratorStatus.hh"
-#include "mem/ruby/tester/DeterministicDriver.hh"
-#include "mem/ruby/tester/Tester_Globals.hh"
-#include "mem/ruby/common/Global.hh"
-#include "mem/ruby/tester/SpecifiedGenerator.hh"
-//#include "DMAController.hh"
-#include "mem/ruby/libruby.hh"
-
-
-DetermGETXGenerator::DetermGETXGenerator(NodeID node, DeterministicDriver * driver)
-{
- m_status = DetermGETXGeneratorStatus_Thinking;
- m_last_transition = 0;
- counter = 0;
- m_node = node;
- m_address = Address(1); // initialize to null value
- m_counter = 0;
- issued_load = false;
- parent_driver = driver;
- // don't know exactly when this node needs to request so just guess randomly
- parent_driver->eventQueue->scheduleEvent(this, 1+(random() % 200));
-}
-
-DetermGETXGenerator::~DetermGETXGenerator()
-{
-}
-
-void DetermGETXGenerator::wakeup()
-{
- DEBUG_EXPR(TESTER_COMP, MedPrio, m_node);
- DEBUG_EXPR(TESTER_COMP, MedPrio, m_status);
-
- // determine if this node is next for the GETX round robin request
- if (m_status == DetermGETXGeneratorStatus_Thinking) {
- if (parent_driver->isStoreReady(m_node)) {
- if (!issued_load) {
- pickAddress();
- }
- m_status = DetermGETXGeneratorStatus_Store_Pending; // Store Pending
- m_last_transition = parent_driver->eventQueue->getTime();
- initiateStore(); // GETX
- } else { // I'll check again later
- parent_driver->eventQueue->scheduleEvent(this, thinkTime());
- }
- } else {
- WARN_EXPR(m_status);
- ERROR_MSG("Invalid status");
- }
-
-}
-
-void DetermGETXGenerator::performCallback(NodeID proc, Address address)
-{
- assert(proc == m_node);
- assert(address == m_address);
-
- DEBUG_EXPR(TESTER_COMP, LowPrio, proc);
- DEBUG_EXPR(TESTER_COMP, LowPrio, m_status);
- DEBUG_EXPR(TESTER_COMP, LowPrio, address);
-
- if (m_status == DetermGETXGeneratorStatus_Store_Pending) {
- parent_driver->recordStoreLatency(parent_driver->eventQueue->getTime() - m_last_transition);
- parent_driver->storeCompleted(m_node, address); // advance the store queue
-
- m_counter++;
- if (m_counter < parent_driver->m_tester_length) {
- m_status = DetermGETXGeneratorStatus_Thinking;
- m_last_transition = parent_driver->eventQueue->getTime();
- parent_driver->eventQueue->scheduleEvent(this, waitTime());
- } else {
- parent_driver->reportDone();
- m_status = DetermGETXGeneratorStatus_Done;
- m_last_transition = parent_driver->eventQueue->getTime();
- }
-
- } else {
- WARN_EXPR(m_status);
- ERROR_MSG("Invalid status");
- }
-}
-
-int DetermGETXGenerator::thinkTime() const
-{
- return parent_driver->m_think_time;
-}
-
-int DetermGETXGenerator::waitTime() const
-{
- return parent_driver->m_wait_time;
-}
-
-void DetermGETXGenerator::pickAddress()
-{
- assert(m_status == DetermGETXGeneratorStatus_Thinking);
-
- m_address = parent_driver->getNextStoreAddr(m_node);
-}
-
-void DetermGETXGenerator::initiateStore()
-{
- DEBUG_MSG(TESTER_COMP, MedPrio, "initiating Store");
- uint8_t *write_data = new uint8_t[64];
- for(int i=0; i < 64; i++) {
- write_data[i] = m_node;
- }
-
- char name [] = "Sequencer_";
- char port_name [13];
- sprintf(port_name, "%s%d", name, m_node);
- int64_t request_id;
- if (counter%10 == 0) {
- if (!issued_load) {
- cerr << m_node << " RMW_Read to address: " << m_address.getAddress() << endl << flush;
- request_id = libruby_issue_request(libruby_get_port_by_name(port_name), RubyRequest(m_address.getAddress(), write_data, 64, 0, RubyRequestType_RMW_Read, RubyAccessMode_Supervisor));
- issued_load = true;
- }
- else {
- cerr << m_node << " RMW_Write to address: " << m_address.getAddress() << endl << flush;
- request_id = libruby_issue_request(libruby_get_port_by_name(port_name), RubyRequest(m_address.getAddress(), write_data, 64, 0, RubyRequestType_RMW_Write, RubyAccessMode_Supervisor));
- issued_load = false;
- counter++;
- }
- }
- else {
- cerr << m_node << " ST to address: " << m_address.getAddress() << endl << flush;
- request_id = libruby_issue_request(libruby_get_port_by_name(port_name), RubyRequest(m_address.getAddress(), write_data, 64, 0, RubyRequestType_ST, RubyAccessMode_Supervisor));
- counter++;
- }
-
- // delete [] write_data;
-
- ASSERT(parent_driver->requests.find(request_id) == parent_driver->requests.end());
- parent_driver->requests.insert(make_pair(request_id, make_pair(m_node, m_address)));
-}
-
-void DetermGETXGenerator::print(ostream& out) const
-{
-}
-
diff --git a/src/mem/ruby/tester/DetermGETXGenerator.hh b/src/mem/ruby/tester/DetermGETXGenerator.hh
deleted file mode 100644
index 567177c6d..000000000
--- a/src/mem/ruby/tester/DetermGETXGenerator.hh
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met: redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer;
- * redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution;
- * neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * $Id$
- *
- * Description:
- *
- */
-
-// This Deterministic Generator generates GETX requests for all nodes in the system
-// The GETX requests are generated one at a time in round-robin fashion 0...1...2...etc.
-
-#ifndef DETERMGETXGENERATOR_H
-#define DETERMGETXGENERATOR_H
-
-#include "mem/ruby/tester/Tester_Globals.hh"
-#include "mem/ruby/common/Consumer.hh"
-#include "mem/protocol/DetermGETXGeneratorStatus.hh"
-#include "mem/ruby/tester/SpecifiedGenerator.hh"
-#include "mem/ruby/common/Global.hh"
-#include "mem/ruby/common/Address.hh"
-
-class DeterministicDriver;
-class DMAController;
-
-class DetermGETXGenerator : public SpecifiedGenerator {
-public:
- // Constructors
- DetermGETXGenerator(NodeID node, DeterministicDriver * driver);
-
- // Destructor
- ~DetermGETXGenerator();
-
- // Public Methods
- void wakeup();
- void performCallback(NodeID proc, Address address);
-
- void print(ostream& out) const;
-private:
- // Private Methods
- int thinkTime() const;
- int waitTime() const;
- void initiateStore();
- void initiateDMA();
- void pickAddress();
-
- DMAController* dma() const;
-
- // copy constructor and assignment operator
- DetermGETXGenerator(const DetermGETXGenerator& obj);
- DetermGETXGenerator& operator=(const DetermGETXGenerator& obj);
-
- DeterministicDriver * parent_driver;
- // Data Members (m_ prefix)
- DetermGETXGeneratorStatus m_status;
- int m_counter;
- bool issued_load;
- Address m_address;
- NodeID m_node;
- long int counter;
- Time m_last_transition;
-};
-
-// Output operator declaration
-ostream& operator<<(ostream& out, const DetermGETXGenerator& obj);
-
-// ******************* Definitions *******************
-
-// Output operator definition
-extern inline
-ostream& operator<<(ostream& out, const DetermGETXGenerator& obj)
-{
- obj.print(out);
- out << flush;
- return out;
-}
-
-#endif //DETERMGETXGENERATOR_H
-
diff --git a/src/mem/ruby/tester/DetermInvGenerator.cc b/src/mem/ruby/tester/DetermInvGenerator.cc
deleted file mode 100644
index bf1f3c3d1..000000000
--- a/src/mem/ruby/tester/DetermInvGenerator.cc
+++ /dev/null
@@ -1,220 +0,0 @@
-
-/*
- * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met: redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer;
- * redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution;
- * neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * $Id$
- *
- */
-
-// This Deterministic Generator generates GETS request for all nodes in the system
-// then Invalidates them with a GETX. The GETS and GETX request are generated one
-// at a time in round-robin fashion 0...1...2...etc.
-
-#include "mem/ruby/common/Global.hh"
-#include "mem/ruby/tester/DetermInvGenerator.hh"
-#include "mem/protocol/DetermInvGeneratorStatus.hh"
-#include "mem/ruby/tester/DeterministicDriver.hh"
-#include "mem/ruby/tester/Tester_Globals.hh"
-//#include "DMAController.hh"
-#include "mem/ruby/libruby.hh"
-
-DetermInvGenerator::DetermInvGenerator(NodeID node, DeterministicDriver& driver) :
- m_driver(driver)
-{
- m_status = DetermInvGeneratorStatus_Thinking;
- m_last_transition = 0;
- m_node = node;
- m_address = Address(9999); // initiate to a NULL value
- m_counter = 0;
- // don't know exactly when this node needs to request so just guess randomly
- m_driver.eventQueue->scheduleEvent(this, 1+(random() % 200));
-}
-
-DetermInvGenerator::~DetermInvGenerator()
-{
-}
-
-void DetermInvGenerator::wakeup()
-{
- DEBUG_EXPR(TESTER_COMP, MedPrio, m_node);
- DEBUG_EXPR(TESTER_COMP, MedPrio, m_status);
-
- // determine if this node is next for the load round robin request
- if (m_status == DetermInvGeneratorStatus_Thinking) {
- // is a load ready and waiting and are my transactions insync with global transactions
- if (m_driver.isLoadReady(m_node) && m_counter == m_driver.getStoresCompleted()) {
- pickLoadAddress();
- m_status = DetermInvGeneratorStatus_Load_Pending; // Load Pending
- m_last_transition = m_driver.eventQueue->getTime();
- initiateLoad(); // GETS
- } else { // I'll check again later
- m_driver.eventQueue->scheduleEvent(this, thinkTime());
- }
- } else if (m_status == DetermInvGeneratorStatus_Load_Complete) {
- if (m_driver.isStoreReady(m_node, m_address)) { // do a store in this transaction or start the next one
- if (m_driver.isLoadReady((0), m_address)) { // everyone is in S for this address i.e. back to node 0
- m_status = DetermInvGeneratorStatus_Store_Pending;
- m_last_transition = m_driver.eventQueue->getTime();
- initiateStore(); // GETX
- } else { // I'm next, I just have to wait for all loads to complete
- m_driver.eventQueue->scheduleEvent(this, thinkTime());
- }
- } else { // I'm not next to store, go back to thinking
- m_status = DetermInvGeneratorStatus_Thinking;
- m_driver.eventQueue->scheduleEvent(this, thinkTime());
- }
- } else {
- WARN_EXPR(m_status);
- ERROR_MSG("Invalid status");
- }
-
-}
-
-void DetermInvGenerator::performCallback(NodeID proc, Address address)
-{
- assert(proc == m_node);
- assert(address == m_address);
-
- DEBUG_EXPR(TESTER_COMP, LowPrio, proc);
- DEBUG_EXPR(TESTER_COMP, LowPrio, m_status);
- DEBUG_EXPR(TESTER_COMP, LowPrio, address);
-
- if (m_status == DetermInvGeneratorStatus_Load_Pending) {
- m_driver.recordLoadLatency(m_driver.eventQueue->getTime() - m_last_transition);
- //NodeID firstByte = data.readByte(); // dummy read
-
- m_driver.loadCompleted(m_node, address);
-
- if (!m_driver.isStoreReady(m_node, m_address)) { // if we don't have to store, we are done for this transaction
- m_counter++;
- }
- if (m_counter < m_driver.m_tester_length) {
- m_status = DetermInvGeneratorStatus_Load_Complete;
- m_last_transition = m_driver.eventQueue->getTime();
- m_driver.eventQueue->scheduleEvent(this, waitTime());
- } else {
- m_driver.reportDone();
- m_status = DetermInvGeneratorStatus_Done;
- m_last_transition = m_driver.eventQueue->getTime();
- }
-
- } else if (m_status == DetermInvGeneratorStatus_Store_Pending) {
- m_driver.recordStoreLatency(m_driver.eventQueue->getTime() - m_last_transition);
- //data.writeByte(m_node);
- m_driver.storeCompleted(m_node, address); // advance the store queue
-
- m_counter++;
- if (m_counter < m_driver.m_tester_length) {
- m_status = DetermInvGeneratorStatus_Thinking;
- m_last_transition = m_driver.eventQueue->getTime();
- m_driver.eventQueue->scheduleEvent(this, waitTime());
- } else {
- m_driver.reportDone();
- m_status = DetermInvGeneratorStatus_Done;
- m_last_transition = m_driver.eventQueue->getTime();
- }
- } else {
- WARN_EXPR(m_status);
- ERROR_MSG("Invalid status");
- }
-
- DEBUG_EXPR(TESTER_COMP, LowPrio, proc);
- DEBUG_EXPR(TESTER_COMP, LowPrio, m_status);
- DEBUG_EXPR(TESTER_COMP, LowPrio, address);
-
-}
-
-int DetermInvGenerator::thinkTime() const
-{
- return m_driver.m_think_time;
-}
-
-int DetermInvGenerator::waitTime() const
-{
- return m_driver.m_wait_time;
-}
-
-int DetermInvGenerator::holdTime() const
-{
- assert(0);
-}
-
-void DetermInvGenerator::pickLoadAddress()
-{
- assert(m_status == DetermInvGeneratorStatus_Thinking);
-
- m_address = m_driver.getNextLoadAddr(m_node);
-}
-
-void DetermInvGenerator::initiateLoad()
-{
- DEBUG_MSG(TESTER_COMP, MedPrio, "initiating Load");
- // sequencer()->makeRequest(CacheMsg(m_address, m_address, CacheRequestType_LD, Address(1), AccessModeType_UserMode, 1, PrefetchBit_No, Address(0), 0 /* only 1 SMT thread */));
- uint8_t * read_data = new uint8_t[64];
-
- char name [] = "Sequencer_";
- char port_name [13];
- sprintf(port_name, "%s%d", name, m_node);
-
- int64_t request_id = libruby_issue_request(libruby_get_port_by_name(port_name), RubyRequest(m_address.getAddress(), read_data, 64, 0, RubyRequestType_LD, RubyAccessMode_Supervisor));
-
- //delete [] read_data;
-
- ASSERT(m_driver.requests.find(request_id) == m_driver.requests.end());
- m_driver.requests.insert(make_pair(request_id, make_pair(m_node, m_address)));
-
-}
-
-void DetermInvGenerator::initiateStore()
-{
- DEBUG_MSG(TESTER_COMP, MedPrio, "initiating Store");
- // sequencer()->makeRequest(CacheMsg(m_address, m_address, CacheRequestType_ST, Address(3), AccessModeType_UserMode, 1, PrefetchBit_No, Address(0), 0 /* only 1 SMT thread */));
- uint8_t *write_data = new uint8_t[64];
- for(int i=0; i < 64; i++) {
- write_data[i] = m_node;
- }
-
- char name [] = "Sequencer_";
- char port_name [13];
- sprintf(port_name, "%s%d", name, m_node);
-
- int64_t request_id = libruby_issue_request(libruby_get_port_by_name(port_name), RubyRequest(m_address.getAddress(), write_data, 64, 0, RubyRequestType_ST, RubyAccessMode_Supervisor));
-
- //delete [] write_data;
-
- ASSERT(m_driver.requests.find(request_id) == m_driver.requests.end());
- m_driver.requests.insert(make_pair(request_id, make_pair(m_node, m_address)));
-
-}
-
-void DetermInvGenerator::print(ostream& out) const
-{
- out << "[DetermInvGenerator]" << endl;
-}
-
diff --git a/src/mem/ruby/tester/DetermInvGenerator.hh b/src/mem/ruby/tester/DetermInvGenerator.hh
deleted file mode 100644
index 521ac8710..000000000
--- a/src/mem/ruby/tester/DetermInvGenerator.hh
+++ /dev/null
@@ -1,105 +0,0 @@
-
-/*
- * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met: redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer;
- * redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution;
- * neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * $Id$
- *
- * Description:
- *
- */
-
-// This Deterministic Generator generates GETS request for all nodes in the system
-// then Invalidates them with a GETX. The GETS and GETX request are generated one
-// at a time in round-robin fashion 0...1...2...etc.
-
-#ifndef DETERMINVGENERATOR_H
-#define DETERMINVGENERATOR_H
-
-#include "mem/ruby/tester/Tester_Globals.hh"
-#include "mem/ruby/common/Consumer.hh"
-#include "mem/ruby/common/Address.hh"
-#include "mem/ruby/common/Global.hh"
-#include "mem/protocol/DetermInvGeneratorStatus.hh"
-#include "mem/ruby/tester/SpecifiedGenerator.hh"
-
-class DeterministicDriver;
-
-class DetermInvGenerator : public SpecifiedGenerator {
-public:
- // Constructors
- DetermInvGenerator(NodeID node, DeterministicDriver& driver);
-
- // Destructor
- ~DetermInvGenerator();
-
- // Public Methods
- void wakeup();
- void performCallback(NodeID proc, Address address);
-
- void print(ostream& out) const;
-private:
- // Private Methods
- int thinkTime() const;
- int waitTime() const;
- int holdTime() const;
- void initiateLoad();
- void initiateStore();
- void pickLoadAddress();
- void pickStoreAddress();
-
- // copy constructor and assignment operator
- DetermInvGenerator(const DetermInvGenerator& obj);
- DetermInvGenerator& operator=(const DetermInvGenerator& obj);
-
- // Data Members (m_ prefix)
- DetermInvGeneratorStatus m_status;
- int m_counter;
- Address m_address;
- NodeID m_node;
- DeterministicDriver& m_driver;
- Time m_last_transition;
-
-};
-
-// Output operator declaration
-ostream& operator<<(ostream& out, const DetermInvGenerator& obj);
-
-// ******************* Definitions *******************
-
-// Output operator definition
-extern inline
-ostream& operator<<(ostream& out, const DetermInvGenerator& obj)
-{
- obj.print(out);
- out << flush;
- return out;
-}
-
-#endif //DETERMINVGENERATOR_H
-
diff --git a/src/mem/ruby/tester/DetermSeriesGETSGenerator.cc b/src/mem/ruby/tester/DetermSeriesGETSGenerator.cc
deleted file mode 100644
index 8663fb90c..000000000
--- a/src/mem/ruby/tester/DetermSeriesGETSGenerator.cc
+++ /dev/null
@@ -1,150 +0,0 @@
-
-/*
- * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met: redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer;
- * redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution;
- * neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * $Id$
- *
- */
-
-#include "mem/ruby/tester/DetermSeriesGETSGenerator.hh"
-#include "mem/protocol/DetermSeriesGETSGeneratorStatus.hh"
-#include "mem/ruby/tester/DeterministicDriver.hh"
-
-DetermSeriesGETSGenerator::DetermSeriesGETSGenerator(NodeID node, DeterministicDriver& driver) :
- m_driver(driver)
-{
- m_status = DetermSeriesGETSGeneratorStatus_Thinking;
- m_last_transition = 0;
- m_node = node;
- m_address = Address(9999); // initialize to null value
- m_counter = 0;
-
-
- // don't know exactly when this node needs to request so just guess randomly
- m_driver.eventQueue->scheduleEvent(this, 1+(random() % 200));
-}
-
-DetermSeriesGETSGenerator::~DetermSeriesGETSGenerator()
-{
-}
-
-void DetermSeriesGETSGenerator::wakeup()
-{
- DEBUG_EXPR(TESTER_COMP, MedPrio, m_node);
- DEBUG_EXPR(TESTER_COMP, MedPrio, m_status);
-
- // determine if this node is next for the SeriesGETS round robin request
- if (m_status == DetermSeriesGETSGeneratorStatus_Thinking) {
- if (m_driver.isLoadReady(m_node)) {
- pickAddress();
- m_status = DetermSeriesGETSGeneratorStatus_Load_Pending; // Load Pending
- m_last_transition = m_driver.eventQueue->getTime();
- initiateLoad(); // SeriesGETS
- } else { // I'll check again later
- m_driver.eventQueue->scheduleEvent(this, thinkTime());
- }
- } else {
- WARN_EXPR(m_status);
- ERROR_MSG("Invalid status");
- }
-
-}
-
-void DetermSeriesGETSGenerator::performCallback(NodeID proc, Address address)
-{
- assert(proc == m_node);
- assert(address == m_address);
-
- DEBUG_EXPR(TESTER_COMP, LowPrio, proc);
- DEBUG_EXPR(TESTER_COMP, LowPrio, m_status);
- DEBUG_EXPR(TESTER_COMP, LowPrio, address);
-
- if (m_status == DetermSeriesGETSGeneratorStatus_Load_Pending) {
- m_driver.recordLoadLatency(m_driver.eventQueue->getTime() - m_last_transition);
- //data.writeByte(m_node);
- m_driver.loadCompleted(m_node, address); // advance the load queue
-
- m_counter++;
- // do we still have more requests to complete before the next proc starts?
- if (m_counter < m_driver.m_tester_length*m_driver.m_numCompletionsPerNode) {
- m_status = DetermSeriesGETSGeneratorStatus_Thinking;
- m_last_transition = m_driver.eventQueue->getTime();
- m_driver.eventQueue->scheduleEvent(this, waitTime());
- } else {
- m_driver.reportDone();
- m_status = DetermSeriesGETSGeneratorStatus_Done;
- m_last_transition = m_driver.eventQueue->getTime();
- }
-
- } else {
- WARN_EXPR(m_status);
- ERROR_MSG("Invalid status");
- }
-}
-
-int DetermSeriesGETSGenerator::thinkTime() const
-{
- return m_driver.m_think_time;
-}
-
-int DetermSeriesGETSGenerator::waitTime() const
-{
- return m_driver.m_wait_time;
-}
-
-void DetermSeriesGETSGenerator::pickAddress()
-{
- assert(m_status == DetermSeriesGETSGeneratorStatus_Thinking);
-
- m_address = m_driver.getNextLoadAddr(m_node);
-}
-
-void DetermSeriesGETSGenerator::initiateLoad()
-{
- DEBUG_MSG(TESTER_COMP, MedPrio, "initiating Load");
- //sequencer()->makeRequest(CacheMsg(m_address, m_address, CacheRequestType_IFETCH, Address(3), AccessModeType_UserMode, 1, PrefetchBit_No, Address(0), 0 /* only 1 SMT thread */));
-
- uint8_t *read_data = new uint8_t[64];
-
- char name [] = "Sequencer_";
- char port_name [13];
- sprintf(port_name, "%s%d", name, m_node);
-
- int64_t request_id = libruby_issue_request(libruby_get_port_by_name(port_name), RubyRequest(m_address.getAddress(), read_data, 64, 0, RubyRequestType_LD, RubyAccessMode_Supervisor));
-
- //delete [] read_data;
-
- ASSERT(m_driver.requests.find(request_id) == m_driver.requests.end());
- m_driver.requests.insert(make_pair(request_id, make_pair(m_node, m_address)));
-}
-
-void DetermSeriesGETSGenerator::print(ostream& out) const
-{
-}
-
diff --git a/src/mem/ruby/tester/DetermSeriesGETSGenerator.hh b/src/mem/ruby/tester/DetermSeriesGETSGenerator.hh
deleted file mode 100644
index 51d1638f6..000000000
--- a/src/mem/ruby/tester/DetermSeriesGETSGenerator.hh
+++ /dev/null
@@ -1,102 +0,0 @@
-
-/*
- * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met: redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer;
- * redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution;
- * neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * $Id$
- *
- * Description:
- *
- */
-
-// This Deterministic Generator generates a series of GETS requests for a given node.
-// Sequentially goes through all nodes in the system
-// This generator is used to tune the HW prefetcher
-// The GETS requests are generated one at a time in round-robin fashion 0...1...2...etc.
-
-#ifndef DETERMSERIESGETSGENERATOR_H
-#define DETERMSERIESGETSGENERATOR_H
-
-#include "mem/ruby/tester/Tester_Globals.hh"
-#include "mem/ruby/common/Consumer.hh"
-#include "mem/ruby/common/Address.hh"
-#include "mem/ruby/common/Global.hh"
-#include "mem/protocol/DetermSeriesGETSGeneratorStatus.hh"
-#include "mem/ruby/tester/SpecifiedGenerator.hh"
-
-class DeterministicDriver;
-
-class DetermSeriesGETSGenerator : public SpecifiedGenerator {
-public:
- // Constructors
- DetermSeriesGETSGenerator(NodeID node, DeterministicDriver& driver);
-
- // Destructor
- ~DetermSeriesGETSGenerator();
-
- // Public Methods
- void wakeup();
- void performCallback(NodeID proc, Address address);
-
- void print(ostream& out) const;
-private:
- // Private Methods
- int thinkTime() const;
- int waitTime() const;
- void initiateLoad();
- void pickAddress();
-
- // copy constructor and assignment operator
- DetermSeriesGETSGenerator(const DetermSeriesGETSGenerator& obj);
- DetermSeriesGETSGenerator& operator=(const DetermSeriesGETSGenerator& obj);
-
- // Data Members (m_ prefix)
- DetermSeriesGETSGeneratorStatus m_status;
- int m_counter;
- Address m_address;
- NodeID m_node;
- DeterministicDriver& m_driver;
- Time m_last_transition;
-};
-
-// Output operator declaration
-ostream& operator<<(ostream& out, const DetermSeriesGETSGenerator& obj);
-
-// ******************* Definitions *******************
-
-// Output operator definition
-extern inline
-ostream& operator<<(ostream& out, const DetermSeriesGETSGenerator& obj)
-{
- obj.print(out);
- out << flush;
- return out;
-}
-
-#endif //DETERMSeriesGETSGENERATOR_H
-
diff --git a/src/mem/ruby/tester/SConscript b/src/mem/ruby/tester/SConscript
index cf3d60794..72ae2984b 100644
--- a/src/mem/ruby/tester/SConscript
+++ b/src/mem/ruby/tester/SConscript
@@ -33,10 +33,6 @@ Import('*')
if not env['RUBY']:
Return()
-#Source('DetermGETXGenerator.cc')
-#Source('DetermInvGenerator.cc')
-#Source('DetermSeriesGETSGenerator.cc')
-#Source('DeterministicDriver.cc')
#Source('SpecifiedGenerator.cc')
#Source('getopt.cc')
#Source('main.cc')