diff options
author | Andreas Hansson <andreas.hansson@arm.com> | 2013-07-18 08:31:16 -0400 |
---|---|---|
committer | Andreas Hansson <andreas.hansson@arm.com> | 2013-07-18 08:31:16 -0400 |
commit | d4273cc9a6f3c00566e97ebcd71509ed14477b37 (patch) | |
tree | 9b50625fc5d2bb457a959f379a45687903660237 /src/sim/system.cc | |
parent | 4e8ecd7c6fd0447f563179b5a8fdbb13b562ca9e (diff) | |
download | gem5-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/sim/system.cc')
-rw-r--r-- | src/sim/system.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/sim/system.cc b/src/sim/system.cc index 03f8f8180..f9799d26f 100644 --- a/src/sim/system.cc +++ b/src/sim/system.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2012 ARM Limited + * Copyright (c) 2011-2013 ARM Limited * All rights reserved * * The license below extends only to copyright in the software and shall @@ -78,12 +78,13 @@ System::System(Params *p) _numContexts(0), pagePtr(0), init_param(p->init_param), - physProxy(_systemPort), - virtProxy(_systemPort), + physProxy(_systemPort, p->cache_line_size), + virtProxy(_systemPort, p->cache_line_size), loadAddrMask(p->load_addr_mask), nextPID(0), physmem(name() + ".physmem", p->memories), memoryMode(p->mem_mode), + _cacheLineSize(p->cache_line_size), workItemsBegin(0), workItemsEnd(0), numWorkIds(p->num_work_ids), @@ -100,6 +101,11 @@ System::System(Params *p) debugSymbolTable = new SymbolTable; } + // check if the cache line size is a value known to work + if (!(_cacheLineSize == 16 || _cacheLineSize == 32 || + _cacheLineSize == 64 || _cacheLineSize == 128)) + warn_once("Cache line size is neither 16, 32, 64 nor 128 bytes.\n"); + // Get the generic system master IDs MasterID tmp_id M5_VAR_USED; tmp_id = getMasterId("writebacks"); |