summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2019-08-16 13:21:56 -0700
committerGabe Black <gabeblack@google.com>2019-08-23 21:13:33 +0000
commit41f38a559b6b6ed50d821f16b742575d1487d1cf (patch)
tree3535860ac5b519478bcaf753084fa06b091f39b0
parentc08351f4d399f56ec6ed6c81b39e52f55a7bc56f (diff)
downloadgem5-41f38a559b6b6ed50d821f16b742575d1487d1cf.tar.xz
mem: Put gem5 protocols in their own directory.
This reduces clutter in the src/mem directory, and makes it clear that those protocols are for the classic gem5 memory system, not ruby, TLM, etc. Change-Id: I6cf6b21134d82f4f01991e4fe92dbea8c7e82081 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/20231 Tested-by: kokoro <noreply+kokoro@google.com> Maintainer: Gabe Black <gabeblack@google.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
-rw-r--r--src/mem/SConscript3
-rw-r--r--src/mem/port.hh6
-rw-r--r--src/mem/protocol/SConscript32
-rw-r--r--src/mem/protocol/atomic.cc (renamed from src/mem/atomic_protocol.cc)2
-rw-r--r--src/mem/protocol/atomic.hh (renamed from src/mem/atomic_protocol.hh)6
-rw-r--r--src/mem/protocol/functional.cc (renamed from src/mem/functional_protocol.cc)2
-rw-r--r--src/mem/protocol/functional.hh (renamed from src/mem/functional_protocol.hh)6
-rw-r--r--src/mem/protocol/timing.cc (renamed from src/mem/timing_protocol.cc)2
-rw-r--r--src/mem/protocol/timing.hh (renamed from src/mem/timing_protocol.hh)6
9 files changed, 47 insertions, 18 deletions
diff --git a/src/mem/SConscript b/src/mem/SConscript
index 9ebb07436..95d8654b1 100644
--- a/src/mem/SConscript
+++ b/src/mem/SConscript
@@ -60,14 +60,12 @@ SimObject('MemDelay.py')
Source('abstract_mem.cc')
Source('addr_mapper.cc')
-Source('atomic_protocol.cc')
Source('bridge.cc')
Source('coherent_xbar.cc')
Source('drampower.cc')
Source('dram_ctrl.cc')
Source('external_master.cc')
Source('external_slave.cc')
-Source('functional_protocol.cc')
Source('mem_object.cc')
Source('mport.cc')
Source('noncoherent_xbar.cc')
@@ -77,7 +75,6 @@ Source('packet_queue.cc')
Source('port_proxy.cc')
Source('physical.cc')
Source('secure_port_proxy.cc')
-Source('timing_protocol.cc')
Source('simple_mem.cc')
Source('snoop_filter.cc')
Source('stack_dist_calc.cc')
diff --git a/src/mem/port.hh b/src/mem/port.hh
index 16257ed4f..847bd1e7d 100644
--- a/src/mem/port.hh
+++ b/src/mem/port.hh
@@ -51,10 +51,10 @@
#define __MEM_PORT_HH__
#include "base/addr_range.hh"
-#include "mem/atomic_protocol.hh"
-#include "mem/functional_protocol.hh"
#include "mem/packet.hh"
-#include "mem/timing_protocol.hh"
+#include "mem/protocol/atomic.hh"
+#include "mem/protocol/functional.hh"
+#include "mem/protocol/timing.hh"
#include "sim/port.hh"
class SimObject;
diff --git a/src/mem/protocol/SConscript b/src/mem/protocol/SConscript
new file mode 100644
index 000000000..abab5cc7f
--- /dev/null
+++ b/src/mem/protocol/SConscript
@@ -0,0 +1,32 @@
+# Copyright 2019 Google Inc.
+#
+# 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.
+#
+# Authors: Gabe Black
+
+Import('*')
+
+Source('atomic.cc')
+Source('functional.cc')
+Source('timing.cc')
diff --git a/src/mem/atomic_protocol.cc b/src/mem/protocol/atomic.cc
index 6aecc4058..3ddd71589 100644
--- a/src/mem/atomic_protocol.cc
+++ b/src/mem/protocol/atomic.cc
@@ -42,7 +42,7 @@
* William Wang
*/
-#include "mem/atomic_protocol.hh"
+#include "mem/protocol/atomic.hh"
#include "base/trace.hh"
diff --git a/src/mem/atomic_protocol.hh b/src/mem/protocol/atomic.hh
index bb2de0a22..bbbd408d0 100644
--- a/src/mem/atomic_protocol.hh
+++ b/src/mem/protocol/atomic.hh
@@ -42,8 +42,8 @@
* William Wang
*/
-#ifndef __MEM_ATOMIC_PROTOCOL_HH__
-#define __MEM_ATOMIC_PROTOCOL_HH__
+#ifndef __MEM_GEM5_PROTOCOL_ATOMIC_HH__
+#define __MEM_GEM5_PROTOCOL_ATOMIC_HH__
#include "mem/backdoor.hh"
#include "mem/packet.hh"
@@ -117,4 +117,4 @@ class AtomicResponseProtocol
PacketPtr pkt, MemBackdoorPtr &backdoor) = 0;
};
-#endif //__MEM_ATOMIC_PROTOCOL_HH__
+#endif //__MEM_GEM5_PROTOCOL_ATOMIC_HH__
diff --git a/src/mem/functional_protocol.cc b/src/mem/protocol/functional.cc
index be129539b..6ae7c626d 100644
--- a/src/mem/functional_protocol.cc
+++ b/src/mem/protocol/functional.cc
@@ -42,7 +42,7 @@
* William Wang
*/
-#include "mem/functional_protocol.hh"
+#include "mem/protocol/functional.hh"
/* The request protocol. */
diff --git a/src/mem/functional_protocol.hh b/src/mem/protocol/functional.hh
index 443b98032..ffd27a488 100644
--- a/src/mem/functional_protocol.hh
+++ b/src/mem/protocol/functional.hh
@@ -42,8 +42,8 @@
* William Wang
*/
-#ifndef __MEM_FUNCTIONAL_PROTOCOL_HH__
-#define __MEM_FUNCTIONAL_PROTOCOL_HH__
+#ifndef __MEM_GEM5_PROTOCOL_FUNCTIONAL_HH__
+#define __MEM_GEM5_PROTOCOL_FUNCTIONAL_HH__
#include "mem/packet.hh"
@@ -89,4 +89,4 @@ class FunctionalResponseProtocol
virtual void recvFunctional(PacketPtr pkt) = 0;
};
-#endif //__MEM_FUNCTIONAL_PROTOCOL_HH__
+#endif //__MEM_GEM5_PROTOCOL_FUNCTIONAL_HH__
diff --git a/src/mem/timing_protocol.cc b/src/mem/protocol/timing.cc
index bc56ce2e3..b3efcfbfc 100644
--- a/src/mem/timing_protocol.cc
+++ b/src/mem/protocol/timing.cc
@@ -42,7 +42,7 @@
* William Wang
*/
-#include "mem/timing_protocol.hh"
+#include "mem/protocol/timing.hh"
/* The request protocol. */
diff --git a/src/mem/timing_protocol.hh b/src/mem/protocol/timing.hh
index 42235732c..108ac9796 100644
--- a/src/mem/timing_protocol.hh
+++ b/src/mem/protocol/timing.hh
@@ -42,8 +42,8 @@
* William Wang
*/
-#ifndef __MEM_TIMING_PROTOCOL_HH__
-#define __MEM_TIMING_PROTOCOL_HH__
+#ifndef __MEM_GEM5_PROTOCOL_TIMING_HH__
+#define __MEM_GEM5_PROTOCOL_TIMING_HH__
#include "mem/packet.hh"
@@ -187,4 +187,4 @@ class TimingResponseProtocol
virtual void recvRespRetry() = 0;
};
-#endif //__MEM_TIMING_PROTOCOL_HH__
+#endif //__MEM_GEM5_PROTOCOL_TIMING_HH__