Compressors.py revision 14089:fe1e5813d62c
12810SN/A# Copyright (c) 2018 Inria
22810SN/A# All rights reserved.
32810SN/A#
42810SN/A# Redistribution and use in source and binary forms, with or without
52810SN/A# modification, are permitted provided that the following conditions are
62810SN/A# met: redistributions of source code must retain the above copyright
72810SN/A# notice, this list of conditions and the following disclaimer;
82810SN/A# redistributions in binary form must reproduce the above copyright
92810SN/A# notice, this list of conditions and the following disclaimer in the
102810SN/A# documentation and/or other materials provided with the distribution;
112810SN/A# neither the name of the copyright holders nor the names of its
122810SN/A# contributors may be used to endorse or promote products derived from
132810SN/A# this software without specific prior written permission.
142810SN/A#
152810SN/A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
162810SN/A# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
172810SN/A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
182810SN/A# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
192810SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
202810SN/A# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
212810SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
222810SN/A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
232810SN/A# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
242810SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
252810SN/A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
262810SN/A#
272810SN/A# Authors: Daniel Carvalho
282810SN/A
292810SN/Afrom m5.params import *
302810SN/Afrom m5.proxy import *
312810SN/Afrom m5.SimObject import SimObject
322810SN/A
332810SN/Aclass BaseCacheCompressor(SimObject):
342810SN/A    type = 'BaseCacheCompressor'
352810SN/A    abstract = True
362810SN/A    cxx_header = "mem/cache/compressors/base.hh"
372810SN/A
382810SN/A    block_size = Param.Int(Parent.cache_line_size, "Block size in bytes")
392810SN/A
402810SN/Aclass BDI(BaseCacheCompressor):
418229Snate@binkert.org    type = 'BDI'
428229Snate@binkert.org    cxx_class = 'BDI'
432810SN/A    cxx_header = "mem/cache/compressors/bdi.hh"
442810SN/A
452810SN/A    use_more_compressors = Param.Bool(True, "True if should use all possible" \
462810SN/A        "combinations of base and delta for the compressors. False if using" \
472810SN/A        "only the lowest possible delta size for each base size.");
482810SN/A
492810SN/Aclass CPack(BaseCacheCompressor):
502810SN/A    type = 'CPack'
512810SN/A    cxx_class = 'CPack'
522810SN/A    cxx_header = "mem/cache/compressors/cpack.hh"
532810SN/A