113700Sjavier.bueno@metempsy.com/**
213700Sjavier.bueno@metempsy.com * Copyright (c) 2018 Metempsy Technology Consulting
313700Sjavier.bueno@metempsy.com * All rights reserved.
413700Sjavier.bueno@metempsy.com *
513700Sjavier.bueno@metempsy.com * Redistribution and use in source and binary forms, with or without
613700Sjavier.bueno@metempsy.com * modification, are permitted provided that the following conditions are
713700Sjavier.bueno@metempsy.com * met: redistributions of source code must retain the above copyright
813700Sjavier.bueno@metempsy.com * notice, this list of conditions and the following disclaimer;
913700Sjavier.bueno@metempsy.com * redistributions in binary form must reproduce the above copyright
1013700Sjavier.bueno@metempsy.com * notice, this list of conditions and the following disclaimer in the
1113700Sjavier.bueno@metempsy.com * documentation and/or other materials provided with the distribution;
1213700Sjavier.bueno@metempsy.com * neither the name of the copyright holders nor the names of its
1313700Sjavier.bueno@metempsy.com * contributors may be used to endorse or promote products derived from
1413700Sjavier.bueno@metempsy.com * this software without specific prior written permission.
1513700Sjavier.bueno@metempsy.com *
1613700Sjavier.bueno@metempsy.com * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1713700Sjavier.bueno@metempsy.com * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1813700Sjavier.bueno@metempsy.com * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1913700Sjavier.bueno@metempsy.com * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2013700Sjavier.bueno@metempsy.com * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2113700Sjavier.bueno@metempsy.com * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2213700Sjavier.bueno@metempsy.com * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2313700Sjavier.bueno@metempsy.com * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2413700Sjavier.bueno@metempsy.com * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2513700Sjavier.bueno@metempsy.com * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2613700Sjavier.bueno@metempsy.com * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2713700Sjavier.bueno@metempsy.com *
2813700Sjavier.bueno@metempsy.com * Authors: Javier Bueno
2913700Sjavier.bueno@metempsy.com */
3013700Sjavier.bueno@metempsy.com
3113700Sjavier.bueno@metempsy.com#ifndef __MEM_CACHE_PREFETCH_SLIM_AMPM_HH__
3213700Sjavier.bueno@metempsy.com#define __MEM_CACHE_PREFETCH_SLIM_AMPM_HH__
3313700Sjavier.bueno@metempsy.com
3413700Sjavier.bueno@metempsy.com#include "mem/cache/prefetch/access_map_pattern_matching.hh"
3513700Sjavier.bueno@metempsy.com#include "mem/cache/prefetch/delta_correlating_prediction_tables.hh"
3613700Sjavier.bueno@metempsy.com#include "mem/cache/prefetch/queued.hh"
3713700Sjavier.bueno@metempsy.com
3813700Sjavier.bueno@metempsy.com/**
3913700Sjavier.bueno@metempsy.com * The SlimAMPM Prefetcher
4013700Sjavier.bueno@metempsy.com * Reference:
4113700Sjavier.bueno@metempsy.com *    Towards Bandwidth-Efficient Prefetching with Slim AMPM.
4213700Sjavier.bueno@metempsy.com *    Young, Vinson, and A. Krishna.
4313700Sjavier.bueno@metempsy.com *    The 2nd Data Prefetching Championship (2015).
4413700Sjavier.bueno@metempsy.com *
4513700Sjavier.bueno@metempsy.com * This prefetcher uses two other prefetchers, the AMPM and the DCPT.
4613700Sjavier.bueno@metempsy.com */
4713700Sjavier.bueno@metempsy.com
4813700Sjavier.bueno@metempsy.comstruct SlimAMPMPrefetcherParams;
4913700Sjavier.bueno@metempsy.com
5013700Sjavier.bueno@metempsy.comclass SlimAMPMPrefetcher : public QueuedPrefetcher
5113700Sjavier.bueno@metempsy.com{
5213700Sjavier.bueno@metempsy.com   /** AMPM prefetcher object */
5313700Sjavier.bueno@metempsy.com   AccessMapPatternMatching &ampm;
5413700Sjavier.bueno@metempsy.com   /** DCPT prefetcher object */
5513700Sjavier.bueno@metempsy.com   DeltaCorrelatingPredictionTables &dcpt;
5613700Sjavier.bueno@metempsy.com public:
5713700Sjavier.bueno@metempsy.com   SlimAMPMPrefetcher(const SlimAMPMPrefetcherParams *p);
5813700Sjavier.bueno@metempsy.com   ~SlimAMPMPrefetcher()
5913700Sjavier.bueno@metempsy.com   {}
6013700Sjavier.bueno@metempsy.com
6113700Sjavier.bueno@metempsy.com   void calculatePrefetch(const PrefetchInfo &pfi,
6213700Sjavier.bueno@metempsy.com                          std::vector<AddrPriority> &addresses) override;
6313700Sjavier.bueno@metempsy.com};
6413700Sjavier.bueno@metempsy.com#endif//__MEM_CACHE_PREFETCH_SLIM_AMPM_HH__
65