Gabe Black
0dfa59f0bb
arch,cpu,dev,sim,mem: Collect System thread elements into a subclass.
...
The System class has a few different arrays of values which each
correspond to a thread of execution based on their position. This
change collects them together into a single class to make managing them
easier and less error prone. It also collects methods for manipulating
those threads as an API for that class.
This class acts as a collection point for thread based state which the
System class can look into to get at all its state. It also acts as an
interface for interacting with threads for other classes. This forces
external consumers to use the API instead of accessing the individual
arrays which improves consistency.
Change-Id: Idc4575c5a0b56fe75f5c497809ad91c22bfe26cc
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/25144
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu >
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu >
Tested-by: kokoro <noreply+kokoro@google.com >
2020-06-09 23:37:29 +00:00
Tommaso Marinelli
872cb227fd
mem-cache: prevent prefetcher from saturating the write buffer
...
When the write buffer is full, it still has space to store an additional
number of entries (reserve) equal to the number of MSHRs so that if any
of them requires a writeback this can be handled. Even if the slave port
is blocked, a prefetcher can generate new MSHR entries that may lead to
additional writebacks and eventually saturate the reserve space. This is
solved by checking if the cache is blocked for accesses before
prefetching data.
Change-Id: Iaad04dd6786a09eab7afae4a53d1b1299c341f33
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29615
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br >
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com >
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com >
Tested-by: kokoro <noreply+kokoro@google.com >
2020-06-04 22:35:15 +00:00
Gabe Black
89f2d5eb54
misc: Make many includes explicit.
...
A future change will adjust how some includes can be included
transitively. This change fixes up those files so that they include the
headers they need directly, instead of expecting to have them by
accident through other files.
Change-Id: I1f79aa11df2b46bb7018f39c964294c41db4fdac
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29407
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com >
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com >
Maintainer: Jason Lowe-Power <power.jg@gmail.com >
Tested-by: kokoro <noreply+kokoro@google.com >
2020-06-03 19:42:46 +00:00
Daniel R. Carvalho
c764e1b3dc
mem-cache: Fixes to PIF prefetcher
...
The temporal compactor was never initialized.
There were more possible indexes to the prec/succ vectors than
entries, so a block distance of zero would seg fault.
When checking for an address the wrong vector was being used.
From the original paper, "The prediction mechanism searches for
the PC of the accessed instruction in the index table"
Change-Id: I3c3aceac3c0adbbe8aef5c634c88cb35ba7487be
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br >
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/28487
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com >
Maintainer: Jason Lowe-Power <power.jg@gmail.com >
Tested-by: kokoro <noreply+kokoro@google.com >
2020-05-04 10:29:03 +00:00
Daniel R. Carvalho
2848288097
mem-cache: Use AssociativeSet in Stride prefetcher
...
Avoid replicating associative set functionality in Stride prefetcher's
pc tables.
The indexing policy used previously had some peculiarities, so both
the extractTag and extractSet have been made virtual so that previous
behavior could be kept.
Change-Id: I19a86cb3c4b40031fef427d5f7eed9d5c5673a44
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br >
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/24603
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com >
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com >
Tested-by: kokoro <noreply+kokoro@google.com >
2020-05-01 13:38:16 +00:00
Daniel R. Carvalho
31b34874d5
mem-cache: Use SatCounter in Stride prefetcher
...
There is no need to reimplement saturating counter functionality.
Change-Id: Ie7753089873f41a378ab88fd5f095302c3428797
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br >
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/24542
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com >
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com >
Tested-by: kokoro <noreply+kokoro@google.com >
2020-05-01 13:38:16 +00:00
Daniel R. Carvalho
235f249481
mem-cache: Cleanup of SBOOE prefetcher
...
Made the latencyBuffer a CircularQueue.
Improved encapsulation of the Sandbox struct.
Fixed score() to follow function declaration guidelines.
Removed redundant fatal error checking for score threshold.
Change-Id: I1904884e96f103c67930abafc28b75796aadc406
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br >
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/24541
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com >
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com >
Tested-by: kokoro <noreply+kokoro@google.com >
2020-05-01 13:38:16 +00:00
Daniel R. Carvalho
feb2042cb1
mem-cache: Use CircularQueue in PIF prefetcher
...
Use CircularQueue for PIF's history buffer, and change the indexing
storage to a CQ iterator.
Change-Id: I75bbb75a6be41bd063f662baedbd4c9de33644de
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br >
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/24540
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com >
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com >
Tested-by: kokoro <noreply+kokoro@google.com >
2020-05-01 13:38:16 +00:00
Daniel R. Carvalho
2d5ae09fb3
mem-cache: Use CircularQueue for the STeMS's RMOB
...
Replace rmobHead functionality with a CircularQueue. As a side
effect, RMOB entry's valid bit was removed.
Change-Id: If0b39cfe15de1e47dde0689a0ebc46b623ec1e55
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br >
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/24539
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com >
Reviewed-by: Javier Bueno Hedo <javier.bueno@metempsy.com >
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com >
Tested-by: kokoro <noreply+kokoro@google.com >
2020-05-01 13:38:16 +00:00
Daniel R. Carvalho
01a8783d58
mem-cache: Fix DCPT with CircularQueue
...
This patch fixes the following bugs:
- Previously when deltaPointer was 0 or 1, getting the last or penultimate deltas
would be wrong for non-pow2 deltas.size(). For example, if the last added delta
was to position 0, the previous should be in position 19, if deltas.size() = 20.
However, 0-1=4294967295, and 4294967295%20=15.
- When searching for the previous late and penultimate, the oldest entry was being
skipped.
Change-Id: Id800b60b77531ac4c2920bb90c15cc8cebb137a9
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br >
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/24538
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com >
Reviewed-by: Javier Bueno Hedo <javier.bueno@metempsy.com >
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com >
Tested-by: kokoro <noreply+kokoro@google.com >
2020-05-01 13:38:16 +00:00
Daniel R. Carvalho
73c8c72e40
mem-cache: Fix priority of multi compressor
...
The priority queue comparator orders such that false gives the
entry a higher priority. Therefore, if it is desired to make
the entry with lowest decompression latency have higher priority,
the comparison must be inverted.
Can be tested with:
MultiCompressor(compressors=[
PerfectCompressor(decompression_latency=1),
PerfectCompressor(decompression_latency=2)])
Where it is expected that compressor0 (the one with decomp lat
of 1) is always chosen.
Change-Id: I44acbf5f51c6e47efdd2a16fba9596935cf2eb69
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br >
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/28367
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com >
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com >
Tested-by: kokoro <noreply+kokoro@google.com >
2020-04-30 22:14:09 +00:00
Daniel R. Carvalho
0be2496dd5
mem-cache: Create Prefetcher namespace
...
Create a namespace for the Prefetcher classes.
As a side effect the Prefetcher suffix has been removed from the
C++'s classes names, and the memory leaking destructor overrides
have been fixed.
Change-Id: I9bae492d2fd4734bcdfb68c164345898e65102b2
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br >
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/24537
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com >
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com >
Tested-by: kokoro <noreply+kokoro@google.com >
2020-04-17 19:18:19 +00:00
Gabe Black
4dd00b0153
arch,cpu,gpu-compute,mem: Remove asid from Request objects.
...
This is passed around a lot and set all over the place (usually to 0),
but it's never actually used for anything.
Change-Id: I38ca08387beabeaf9e339b4915ec7eba9e19eecb
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/26232
Tested-by: kokoro <noreply+kokoro@google.com >
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com >
Maintainer: Gabe Black <gabeblack@google.com >
2020-03-07 00:40:41 +00:00
Gabe Black
ebd62eff3c
arch,cpu,mem: Replace the mmmapped IPR mechanism with local accesses.
...
The new local access mechanism installs a callback in the request which
implements what the mmapped IPR was doing. That avoids having to have
stubs in ISAs that don't have mmapped IPRs, avoids having to encode
what to do to communicate from the TLB and the mmapped IPR functions,
and gets rid of another global ISA interface function and header files.
Jira Issue: https://gem5.atlassian.net/browse/GEM5-187
Change-Id: I772c2ae2ca3830a4486919ce9804560c0f2d596a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/23188
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com >
Maintainer: Gabe Black <gabeblack@google.com >
Tested-by: kokoro <noreply+kokoro@google.com >
2020-03-04 04:09:19 +00:00
Gabe Black
921a72f4f3
mem: Delete authors lists from mem files.
...
Change-Id: I439d64d01950463747446a8177086eb276b8db55
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/25443
Maintainer: Gabe Black <gabeblack@google.com >
Tested-by: kokoro <noreply+kokoro@google.com >
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br >
2020-02-17 21:51:08 +00:00
Daniel R. Carvalho
7515106ebe
mem-cache,mem-ruby: Move WeightedLRU RP
...
Move the WeightedLRUReplacementPolicy to the replacement policies folder.
Change-Id: I9902faefb6de33343bb65f994be70bd9e1dd4e14
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br >
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22445
Reviewed-by: Jason Lowe-Power <jason@lowepower.com >
Reviewed-by: John Alsop <johnathan.alsop@amd.com >
Tested-by: kokoro <noreply+kokoro@google.com >
Maintainer: Jason Lowe-Power <jason@lowepower.com >
2020-02-10 12:40:18 +00:00
Daniel R. Carvalho
519808c02f
mem-cache: Fix invalidation of prefetchers
...
Add an invalidation function to the AssociativeSet, so that entries
can be properly invalidated by also invalidating their replacement
data.
Both setInvalid and reset have been merged into invalidate to
indicate users that they are using an incorrect approach by
generating compilation errors, and to match CacheBlk's naming
convention.
Change-Id: I568076a3b5adda8b1311d9498b086c0dab457a14
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br >
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/24529
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com >
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com >
Tested-by: kokoro <noreply+kokoro@google.com >
2020-01-21 08:07:05 +00:00
Daniel R. Carvalho
54a27b007a
mem-cache: Add print function to ReplaceableEntry
...
Add a basic print function to acquire and display information about
replaceable entries.
Change-Id: I9640113d305fbe086c5bfaf8928a911bfcac50bb
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br >
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/23567
Tested-by: kokoro <noreply+kokoro@google.com >
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com >
Reviewed-by: Jason Lowe-Power <jason@lowepower.com >
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com >
Maintainer: Jason Lowe-Power <jason@lowepower.com >
2020-01-17 20:41:50 +00:00
Daniel R. Carvalho
6eabbd49eb
mem-cache: Add getter for the number of valid sub-blks
...
Add a getter function so that the number of valid sub-blocks can be
retrieved. As a side effect, make the respective counter private.
Change-Id: Icef8b51164c8e165872dcaebc65f5c330f16cb29
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br >
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22605
Tested-by: kokoro <noreply+kokoro@google.com >
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com >
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com >
2020-01-17 20:41:39 +00:00
Daniel R. Carvalho
62dfa5a1fb
mem-cache: Add multiple eviction stats
...
Add stats to inform how many blocks were evicted due to a sector
replacement/eviction.
Change-Id: I886365506016d0888f835d182b3b65a808a9dccd
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br >
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22606
Tested-by: kokoro <noreply+kokoro@google.com >
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com >
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com >
2020-01-17 16:31:03 +00:00
Daniel R. Carvalho
37bcb128fa
mem-cache: Make findVictim non-const
...
In order to acquire stats when a victim is found,
findVictim must be made const.
Change-Id: I493c7849f07625c90b2b95fd220f50751f4d0f52
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br >
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22604
Tested-by: kokoro <noreply+kokoro@google.com >
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com >
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com >
2020-01-17 16:31:03 +00:00
Daniel R. Carvalho
7ff32d7b53
mem-cache: Add more compression stats
...
Add stats to calculate the total number of compressions, decompressions
and the average compression size, in number of bits.
Change-Id: I5eb563856c1ff54216e1edcd2886332b7481cbfe
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br >
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22609
Tested-by: kokoro <noreply+kokoro@google.com >
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com >
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com >
2020-01-17 16:31:03 +00:00
Daniel R. Carvalho
7dce9e3782
mem-cache: Factor out multiple block eviction
...
Create a function to try to evict multiple blocks while checking for
transient state.
Change-Id: I6a879fa5e793cd92c4bdf4a258a133de4c865012
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br >
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22607
Tested-by: kokoro <noreply+kokoro@google.com >
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com >
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com >
2020-01-17 16:31:03 +00:00
Nikos Nikoleris
2430be2edb
mem-cache: Forward snoops when the cache is not responding
...
When the MSHR is handling a request that will make the block dirty the
current cache commits respond. When that's not the case the cache
should forward any snoops. This CL fixes MSHR::handleSnoop() to
implement this behavior.
Change-Id: I207e3ca4968fd9528fd4cdbfb3eb95f470b4744d
Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com >
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/23668
Tested-by: kokoro <noreply+kokoro@google.com >
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br >
2020-01-07 09:42:01 +00:00
Nikos Nikoleris
96e8f2ed3c
mem-cache: Ensure that responses get data from the right source
...
This CL makes sure that we use the right source for data for
responses after a response from the cache below.
Change-Id: I7329f3e6bcb7ce2054e912eb9dea48c9d169d45a
Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com >
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/23667
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br >
Tested-by: kokoro <noreply+kokoro@google.com >
2020-01-07 09:42:01 +00:00
Nikos Nikoleris
44e3c95555
mem-cache: Avoid write merging if there are reads in between
...
This CL reworks the logic in the MSHR to make sure we do not coalesce
requests unless there is a series of write requests for the whole
cache block without any other incompatible requests (e.g., read) in
between.
Change-Id: I0b3195858fb33ef85d7aae27376506057dd53ea7
Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com >
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/23666
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br >
Tested-by: kokoro <noreply+kokoro@google.com >
2020-01-06 11:09:21 +00:00
Daniel R. Carvalho
a87a3e4fad
mem-cache: Move unused prefetches counter update
...
The number of unused prefetches should be updated every time
a block is invalidated, therefore we move the update to within
the corresponding function.
Change-Id: If3ac2ea43611525bd3c36d628d88382042fcb7dc
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br >
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/18908
Tested-by: kokoro <noreply+kokoro@google.com >
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com >
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com >
2019-12-12 14:43:09 +00:00
Gabe Black
078bdc8661
mem-cache: Avoid hiding a virtual method in the dictionary compressor.
...
The non-virtual version is later used in overrides of the virtual
version whcih takes more arguments.
Change-Id: I102d1185c7a616337c2a0429daa998706189292f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/23127
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br >
Maintainer: Gabe Black <gabeblack@google.com >
Tested-by: kokoro <noreply+kokoro@google.com >
2019-11-28 07:14:57 +00:00
Gabe Black
6ff7e6db89
mem-cache: Remove a std::move clang says is unnecessary.
...
It also says it prevents an optimization.
Change-Id: I9c21dc1a0c53cf70cefd1400564de07d1e845a75
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/23124
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br >
Maintainer: Gabe Black <gabeblack@google.com >
Tested-by: kokoro <noreply+kokoro@google.com >
2019-11-28 07:14:36 +00:00
Isaac Sánchez Barrera
7e19b26f50
mem-cache: Initialize all members of QueuedPrefetcher::DeferredPacket.
...
Members `tc` and `ongoingTranslation` were uninitialized in the constructor for
`QueuedPrefetcher::DeferredPacket`. If `ongoingTranslation` is not initialized to
`false` by default, some translation requests from queued prefetchers are not
properly handled and executions are nondeterministic.
Change-Id: Ia278f9e74847d6b847984d47f6a45643bae57794
Signed-off-by: Isaac Sánchez Barrera <isaac.sanchez@bsc.es >
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22844
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com >
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com >
Tested-by: kokoro <noreply+kokoro@google.com >
2019-11-18 11:10:21 +00:00
Isaac Sánchez Barrera
ccb3c75fab
mem-cache: Fix destructor of BasePrefetcher::PrefetchInfo.
...
The destructor of `BasePrefetcher::PrefetchInfo` was calling `delete` for a
dynamically-allocated array. Changed to `delete[]` to remove potential undefined
behaviour.
Change-Id: I6f531bfb6fb7108f1d3e743ae0384d80173e15ef
Signed-off-by: Isaac Sánchez Barrera <isaac.sanchez@bsc.es >
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22843
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com >
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com >
Tested-by: kokoro <noreply+kokoro@google.com >
2019-11-18 11:10:21 +00:00
Daniel R. Carvalho
0a276fb4bb
mem-cache: Modify compressor to appease newer compilers
...
The type of the local unique_ptr variable was different from the return type.
In C++11 because of such difference, a copy-ellision would not be possible,
and that required the use of a std::move.
In C++14 the restriction of same types being required was removed, so
std::move would not be needed anymore.
With the addition of the -Wredundant-move warning in newer compilers, having
the std::move on the return became an issue, breaking compilation.
Change-Id: I45d18dfc500bb5db5fe360814feb91853c735a19
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br >
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22403
Tested-by: kokoro <noreply+kokoro@google.com >
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com >
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com >
2019-11-04 21:32:22 +00:00
Daniel R. Carvalho
b7223e0976
mem-cache: Implement a perfect compressor
...
Implement a perfect compressor that always manages to compresses data
exactly to its maximum allowed compression ratio. This allows tracking
a compression upper bound.
Change-Id: Ibc68bf2dc84b75207795d5ba6304b9ed6dbeae8f
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br >
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21160
Tested-by: kokoro <noreply+kokoro@google.com >
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com >
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu >
2019-11-04 21:32:22 +00:00
Daniel R. Carvalho
3029ef270c
mem-cache: Make BDI a multi compressor
...
BDI is a compressor containing multiple sub-compressors.
Change-Id: I98411e2ef9dcc2182801a172dfc59ed7a8ee7dd4
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br >
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21159
Tested-by: kokoro <noreply+kokoro@google.com >
Maintainer: Jason Lowe-Power <jason@lowepower.com >
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu >
2019-11-04 21:32:22 +00:00
Daniel R. Carvalho
b8a4a911ee
mem-cache: Implement a multi compressor
...
Implement a compressor that contains multiple sub-compressors and
choses the one that provides the best compression results for each
compression.
Change-Id: I758cf67c84bd85edbea16b2a07b2068b00454461
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br >
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21158
Reviewed-by: Jason Lowe-Power <jason@lowepower.com >
Maintainer: Jason Lowe-Power <jason@lowepower.com >
Tested-by: kokoro <noreply+kokoro@google.com >
2019-11-04 21:32:22 +00:00
Daniel R. Carvalho
2cb1449ede
mem-cache: Implement BDI sub-compressors
...
Implement sub-compressors of BDI as public compressors so that
they can be used separately.
Change-Id: I710e35f39f4abb82fd02fd33b1b86a3f214c12cb
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br >
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21157
Tested-by: kokoro <noreply+kokoro@google.com >
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu >
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu >
2019-11-04 21:32:22 +00:00
Daniel R. Carvalho
e415882972
mem-cache: Implement a repeated values compressor
...
The repeated values compressor can only compress data composed solely
repeated instances of the same value.
Change-Id: If2c4f47ad4af492d202ec2017e30ba52ee67e307
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br >
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21156
Tested-by: kokoro <noreply+kokoro@google.com >
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu >
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu >
2019-11-04 21:32:22 +00:00
Daniel R. Carvalho
fcc1964453
mem-cache: Implement a zero compressor
...
The zero compressor can only compress data composed solely of zero
bits.
Change-Id: I8b359c03776a8748abd144a178bda944b5a1b766
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br >
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21155
Tested-by: kokoro <noreply+kokoro@google.com >
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu >
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu >
2019-11-04 21:32:22 +00:00
Daniel R. Carvalho
93b4845ed2
mem-cache: Implement FPC-D cache compression
...
Implementation of Frequent Pattern Compression with limited Dictionary
support (FPC-D) cache compressor, as described in "Opportunistic
Compression for Direct-Mapped DRAM Caches", by Alameldeen et al.
Change-Id: I26cc1646f95400b6a006f89754f6b2952f5b4aeb
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br >
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21154
Tested-by: kokoro <noreply+kokoro@google.com >
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu >
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu >
2019-11-04 21:32:22 +00:00
Daniel R. Carvalho
fc0678daf2
mem-cache: Fix missing header in associative set
...
Add missing intmath header to AssociativeSet, so that isPowerOf2 can
be used.
error: there are no arguments to 'isPowerOf2' that depend on a template
parameter, so a declaration of 'isPowerOf2' must be available
Change-Id: Ib2b194f9e71284ee439786bdb76d99858e57e2f5
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br >
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22444
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com >
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com >
Tested-by: kokoro <noreply+kokoro@google.com >
2019-10-31 19:00:08 +00:00
Daniel R. Carvalho
248c8d36ec
mem-cache: Add a repeated value pattern to compressors
...
The repeated value pattern checks if values are composed of multiple
instances of the same value. If successful, the bits of the repeated
value are included only once in the compressed data.
Change-Id: Ia7045b4e33a91fd8d712fe1ca689f7f8cb4e5feb
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br >
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21153
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu >
Maintainer: Jason Lowe-Power <jason@lowepower.com >
Tested-by: kokoro <noreply+kokoro@google.com >
2019-10-29 21:32:02 +00:00
Daniel R. Carvalho
7244788c02
mem-cache: Inform unused bits instead of bytes in compressor pattern
...
Increase pattern precision by giving the number of unmatched bits
instead of bytes.
Change-Id: I5efbe9c31672cc973b4c89c741cdc8cc28d26285
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br >
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21152
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com >
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com >
Tested-by: kokoro <noreply+kokoro@google.com >
2019-10-29 21:32:02 +00:00
Daniel R. Carvalho
2dd82da9b8
mem-cache: Add a masked const value pattern to compressors
...
The masked pattern compares values to masked const non-dictionary values
to determine whether these match. If successful, the bits that do not
match must be added to the compressed data.
Change-Id: I4c53568694dab916136fe384cb2ee10e554f7136
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br >
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21151
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com >
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com >
Tested-by: kokoro <noreply+kokoro@google.com >
2019-10-29 21:32:02 +00:00
Daniel R. Carvalho
83219d89de
mem-cache: Add a masked pattern to compressors
...
The masked pattern compares masked values to masked dictionary entries
to determine whether these values match. If successful, the bits that
do not match must be added to the compressed data.
Change-Id: I4b1c8feb0faa99576382b54a73a20c353f965d2a
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br >
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21150
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com >
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com >
Tested-by: kokoro <noreply+kokoro@google.com >
2019-10-29 21:32:02 +00:00
Daniel R. Carvalho
7973e49187
mem-cache: Add an uncompressed pattern to compressors
...
The uncompressed pattern always stores the original data, and therefore
it is always successful. All of the derived classes of the dictionary
compressor must have this pattern as the last pattern of the pattern
factory.
Change-Id: I2a38fd56630d88ef8b918220dc4c2824a196a8a2
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br >
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21149
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com >
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com >
Tested-by: kokoro <noreply+kokoro@google.com >
2019-10-29 21:32:02 +00:00
Daniel R. Carvalho
7a8debf0fa
mem-cache: Templatize DictionaryCompressor
...
Templatize DictionaryCompressor so that the dictionary entries' sizes
can be changed.
Change-Id: I3d89e3c692a721cefcd7e3c55d2ccdefa425f614
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br >
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21148
Tested-by: kokoro <noreply+kokoro@google.com >
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu >
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com >
2019-10-29 21:32:02 +00:00
Daniel R. Carvalho
7ce9fe0af9
mem-cache: Factor out CPack's dictionary functionality
...
Factor out dictionary functionality of CPack, so that it can be
used easily for other compressors.
As a side effect, create an addToDictionary function to allow
subclasses to chose how to handle insertion.
Change-Id: I02fae4e98b02db5a40467ec470b71020d5e867cb
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br >
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21147
Tested-by: kokoro <noreply+kokoro@google.com >
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com >
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com >
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu >
2019-10-29 21:32:02 +00:00
Daniel R. Carvalho
70dc35a659
mem-cache: Use shouldAllocate() instead of CPack's decompress()
...
Split decompression functionality using the proper function to
determine if a dictionary entry should be allocated after
decompression or not.
Change-Id: I4995304f4c4508c03c9fc1685f04511622969556
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br >
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21146
Tested-by: kokoro <noreply+kokoro@google.com >
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com >
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu >
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com >
2019-10-29 21:32:02 +00:00
Daniel R. Carvalho
b42971dabd
mem-cache: Limit compression size
...
Add a threshold so that if the compressed size is greater than it,
the compression is abandoned, and the data is considered uncompressible.
Change-Id: Ic416195b06ec440a40263b75bd0f0383cde2ea6a
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br >
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21144
Tested-by: kokoro <noreply+kokoro@google.com >
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu >
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com >
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com >
2019-10-29 21:32:02 +00:00
Daniel R. Carvalho
0c5ef2d999
mem-cache: Do not try to compress dataless packets
...
Fix filling blocks so that packets that do not contain data do not
generate a compression attempt. This can happen, for example, with
invalidation responses, which will trigger a packet data access
assertion.
Change-Id: I2a1e7983657f6e5e770b148ab62c9de9ac3986ac
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br >
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22164
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com >
Reviewed-by: Jason Lowe-Power <jason@lowepower.com >
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com >
Tested-by: kokoro <noreply+kokoro@google.com >
2019-10-29 21:32:02 +00:00