mem-cache: Implement a frequency-sampling compressor
authorDaniel R. Carvalho <odanrc@yahoo.com.br>
Tue, 25 Jun 2019 15:44:19 +0000 (17:44 +0200)
committerDaniel Carvalho <odanrc@yahoo.com.br>
Wed, 16 Dec 2020 12:13:05 +0000 (12:13 +0000)
commit491b9874d2a4d543bf6098a9f37727fddf905743
treec176311910549819ad75c99817461c58f24faf62
parent32bce3301ded61a4ad62ad0503d2d0c0e628b616
mem-cache: Implement a frequency-sampling compressor

Implementation of a generic frequency-based sampling
compressor. The compressor goes through a sampling stage,
where no compression is done, and the values are simply
sampled for their frequencies. Then, after enough samples
have been taken, the compressor starts generating
compressed data.

Compression works by comparing chunks to the table of
most frequent values. In theory, a chunk that is present
in the frequency table has its value replaced by the
index of its respective entry in the table. In practice,
the value itself is stored because there is no straight-
forward way to acquire an index from an entry.

Finally, the index can be encoded so that the values
with highest frequency have smaller codeword representation.
Its Huffman coupling can be used similar to the approach
taken in "SC 2 : A Statistical Compression Cache Scheme".

Change-Id: Iae0ebda08e8c08f3b62930fd0fb7e818fd0d141f
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/37335
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
13 files changed:
src/mem/cache/base.cc
src/mem/cache/compressors/Compressors.py
src/mem/cache/compressors/SConscript
src/mem/cache/compressors/base.cc
src/mem/cache/compressors/base.hh
src/mem/cache/compressors/encoders/SConscript [new file with mode: 0644]
src/mem/cache/compressors/encoders/base.hh [new file with mode: 0644]
src/mem/cache/compressors/encoders/huffman.cc [new file with mode: 0644]
src/mem/cache/compressors/encoders/huffman.hh [new file with mode: 0644]
src/mem/cache/compressors/frequent_values.cc [new file with mode: 0644]
src/mem/cache/compressors/frequent_values.hh [new file with mode: 0644]
src/mem/cache/compressors/multi.cc
src/mem/cache/compressors/multi.hh