summaryrefslogtreecommitdiff
path: root/src/mem/bus.cc
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2013-07-18 08:31:16 -0400
committerAndreas Hansson <andreas.hansson@arm.com>2013-07-18 08:31:16 -0400
commitd4273cc9a6f3c00566e97ebcd71509ed14477b37 (patch)
tree9b50625fc5d2bb457a959f379a45687903660237 /src/mem/bus.cc
parent4e8ecd7c6fd0447f563179b5a8fdbb13b562ca9e (diff)
downloadgem5-d4273cc9a6f3c00566e97ebcd71509ed14477b37.tar.xz
mem: Set the cache line size on a system level
This patch removes the notion of a peer block size and instead sets the cache line size on the system level. Previously the size was set per cache, and communicated through the interconnect. There were plenty checks to ensure that everyone had the same size specified, and these checks are now removed. Another benefit that is not yet harnessed is that the cache line size is now known at construction time, rather than after the port binding. Hence, the block size can be locally stored and does not have to be queried every time it is used. A follow-on patch updates the configuration scripts accordingly.
Diffstat (limited to 'src/mem/bus.cc')
-rw-r--r--src/mem/bus.cc32
1 files changed, 1 insertions, 31 deletions
diff --git a/src/mem/bus.cc b/src/mem/bus.cc
index d94bd6a28..5ab7e5b04 100644
--- a/src/mem/bus.cc
+++ b/src/mem/bus.cc
@@ -60,8 +60,7 @@ BaseBus::BaseBus(const BaseBusParams *p)
gotAddrRanges(p->port_default_connection_count +
p->port_master_connection_count, false),
gotAllAddrRanges(false), defaultPortID(InvalidPortID),
- useDefaultRange(p->use_default_range),
- blockSize(p->block_size)
+ useDefaultRange(p->use_default_range)
{}
BaseBus::~BaseBus()
@@ -80,29 +79,6 @@ BaseBus::~BaseBus()
void
BaseBus::init()
{
- // determine the maximum peer block size, look at both the
- // connected master and slave modules
- uint32_t peer_block_size = 0;
-
- for (MasterPortConstIter m = masterPorts.begin(); m != masterPorts.end();
- ++m) {
- peer_block_size = std::max((*m)->peerBlockSize(), peer_block_size);
- }
-
- for (SlavePortConstIter s = slavePorts.begin(); s != slavePorts.end();
- ++s) {
- peer_block_size = std::max((*s)->peerBlockSize(), peer_block_size);
- }
-
- // if the peers do not have a block size, use the default value
- // set through the bus parameters
- if (peer_block_size != 0)
- blockSize = peer_block_size;
-
- // check if the block size is a value known to work
- if (!(blockSize == 16 || blockSize == 32 || blockSize == 64 ||
- blockSize == 128))
- warn_once("Block size is neither 16, 32, 64 or 128 bytes.\n");
}
BaseMasterPort &
@@ -559,12 +535,6 @@ BaseBus::getAddrRanges() const
return busRanges;
}
-unsigned
-BaseBus::deviceBlockSize() const
-{
- return blockSize;
-}
-
void
BaseBus::regStats()
{