From 226981b2a65ee4c544bc595d7718de8225fda0b0 Mon Sep 17 00:00:00 2001 From: Polina Dudnik Date: Mon, 13 Jul 2009 11:13:29 -0500 Subject: Reintegrated Derek's functional implementation of atomics with a minor change: don't clear lock on failure --- src/mem/ruby/common/DataBlock.hh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/mem/ruby/common') diff --git a/src/mem/ruby/common/DataBlock.hh b/src/mem/ruby/common/DataBlock.hh index 2a0811f76..c7dba8ae8 100644 --- a/src/mem/ruby/common/DataBlock.hh +++ b/src/mem/ruby/common/DataBlock.hh @@ -56,6 +56,9 @@ class DataBlock { uint8 getByte(int whichByte) const; const uint8* getData(int offset, int len) const; void setByte(int whichByte, uint8 data); + const uint8* getBlock() const; + uint8* copyData(uint8* dest, int offset, int size) const; + void setBlock(uint8* data) { setData(data, 0, System::getBlockSizeBytes()); } void setData(uint8* data, int offset, int len); void copyPartial(const DataBlock & dblk, int offset, int len); bool equal(const DataBlock& obj) const; @@ -146,6 +149,21 @@ void DataBlock::copyPartial(const DataBlock & dblk, int offset, int len) setData(&dblk.m_data[offset], offset, len); } +inline +const uint8* DataBlock::getBlock() const +{ + return m_data; +} + +inline +uint8* DataBlock::copyData(uint8* dest, int offset, int size) const +{ + assert(offset + size <= RubySystem::getBlockSizeBytes()); + memcpy(dest, m_data + offset, size); + return dest; +} + + // ******************* Definitions ******************* // Output operator definition -- cgit v1.2.3 From c66af9f47400a7768de7cd6cb47fe757a601e445 Mon Sep 17 00:00:00 2001 From: Polina Dudnik Date: Mon, 13 Jul 2009 11:59:13 -0500 Subject: Minor fixes for compiling --- src/mem/ruby/common/DataBlock.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mem/ruby/common') diff --git a/src/mem/ruby/common/DataBlock.hh b/src/mem/ruby/common/DataBlock.hh index c7dba8ae8..01194c0ac 100644 --- a/src/mem/ruby/common/DataBlock.hh +++ b/src/mem/ruby/common/DataBlock.hh @@ -58,7 +58,7 @@ class DataBlock { void setByte(int whichByte, uint8 data); const uint8* getBlock() const; uint8* copyData(uint8* dest, int offset, int size) const; - void setBlock(uint8* data) { setData(data, 0, System::getBlockSizeBytes()); } + void setBlock(uint8* data) { setData(data, 0, RubySystem::getBlockSizeBytes()); } void setData(uint8* data, int offset, int len); void copyPartial(const DataBlock & dblk, int offset, int len); bool equal(const DataBlock& obj) const; -- cgit v1.2.3 From 5f551d9ca2b61fc97b9530334e538195a84589b3 Mon Sep 17 00:00:00 2001 From: Polina Dudnik Date: Mon, 13 Jul 2009 17:22:29 -0500 Subject: 1. Got rid of unused functions in DirectoryMemory 2. Reintroduced RMW_Read and RMW_Write 3. Defined -2 in the Sequencer as well as made a note about mandatory queue Did not address the issues in the slicc because remaking the atomics altogether to allow multiple processors to issue atomic requests at once --- src/mem/ruby/common/DataBlock.hh | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'src/mem/ruby/common') diff --git a/src/mem/ruby/common/DataBlock.hh b/src/mem/ruby/common/DataBlock.hh index 01194c0ac..2a0811f76 100644 --- a/src/mem/ruby/common/DataBlock.hh +++ b/src/mem/ruby/common/DataBlock.hh @@ -56,9 +56,6 @@ class DataBlock { uint8 getByte(int whichByte) const; const uint8* getData(int offset, int len) const; void setByte(int whichByte, uint8 data); - const uint8* getBlock() const; - uint8* copyData(uint8* dest, int offset, int size) const; - void setBlock(uint8* data) { setData(data, 0, RubySystem::getBlockSizeBytes()); } void setData(uint8* data, int offset, int len); void copyPartial(const DataBlock & dblk, int offset, int len); bool equal(const DataBlock& obj) const; @@ -149,21 +146,6 @@ void DataBlock::copyPartial(const DataBlock & dblk, int offset, int len) setData(&dblk.m_data[offset], offset, len); } -inline -const uint8* DataBlock::getBlock() const -{ - return m_data; -} - -inline -uint8* DataBlock::copyData(uint8* dest, int offset, int size) const -{ - assert(offset + size <= RubySystem::getBlockSizeBytes()); - memcpy(dest, m_data + offset, size); - return dest; -} - - // ******************* Definitions ******************* // Output operator definition -- cgit v1.2.3 From 23a405f5d8f025784bf447f49a3d1e938577ef2b Mon Sep 17 00:00:00 2001 From: Polina Dudnik Date: Wed, 15 Jul 2009 10:46:22 -0500 Subject: Tester update --- src/mem/ruby/common/Driver.hh | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'src/mem/ruby/common') diff --git a/src/mem/ruby/common/Driver.hh b/src/mem/ruby/common/Driver.hh index 9aa756386..9d17fcadb 100644 --- a/src/mem/ruby/common/Driver.hh +++ b/src/mem/ruby/common/Driver.hh @@ -40,13 +40,8 @@ #include "mem/ruby/common/Global.hh" #include "mem/ruby/common/Consumer.hh" #include "mem/ruby/system/NodeID.hh" -#include "mem/protocol/CacheRequestType.hh" +#include "mem/ruby/common/Address.hh" -class RubySystem; -class SubBlock; -class Address; -class MachineID; -class SimicsHypervisor; class Driver { public: @@ -58,15 +53,12 @@ public: // Public Methods virtual void get_network_config() {} - virtual void dmaHitCallback() = 0; - virtual void hitCallback(NodeID proc, SubBlock& data, CacheRequestType type, int thread) = 0; // Called by sequencer - virtual void conflictCallback(NodeID proc, SubBlock& data, CacheRequestType type, int thread) { assert(0); }; // Called by sequencer + virtual void dmaHitCallback() {}; + virtual void hitCallback(int64_t id) = 0; // Called by sequencer + virtual void go() = 0; virtual integer_t getInstructionCount(int procID) const { return 1; } virtual integer_t getCycleCount(int procID) const { return 1; } virtual void addThreadDependency(int procID, int requestor_thread, int conflict_thread) const { assert(0);} - virtual int inTransaction(int procID, int thread ) const{ - cout << "Driver.hh inTransaction " << endl; -return false; } //called by Sequencer virtual void printDebug(){} //called by Sequencer virtual void printStats(ostream& out) const = 0; @@ -74,7 +66,6 @@ return false; } //called by Sequencer virtual void printConfig(ostream& out) const = 0; - //virtual void abortCallback(NodeID proc){} virtual integer_t readPhysicalMemory(int procID, physical_address_t address, int len ){ ASSERT(0); return 0; } -- cgit v1.2.3