114034Sjavier.bueno@metempsy.com/*
214034Sjavier.bueno@metempsy.com * Copyright 2019 Texas A&M University
314034Sjavier.bueno@metempsy.com *
414034Sjavier.bueno@metempsy.com * Redistribution and use in source and binary forms, with or without
514034Sjavier.bueno@metempsy.com * modification, are permitted provided that the following conditions are met:
614034Sjavier.bueno@metempsy.com *
714034Sjavier.bueno@metempsy.com * 1. Redistributions of source code must retain the above copyright notice,
814034Sjavier.bueno@metempsy.com *    this list of conditions and the following disclaimer.
914034Sjavier.bueno@metempsy.com *
1014034Sjavier.bueno@metempsy.com * 2. Redistributions in binary form must reproduce the above copyright notice,
1114034Sjavier.bueno@metempsy.com *    this list of conditions and the following disclaimer in the documentation
1214034Sjavier.bueno@metempsy.com *    and/or other materials provided with the distribution.
1314034Sjavier.bueno@metempsy.com *
1414034Sjavier.bueno@metempsy.com * 3. Neither the name of the copyright holder nor the names of its
1514034Sjavier.bueno@metempsy.com *    contributors may be used to endorse or promote products derived from this
1614034Sjavier.bueno@metempsy.com *    software without specific prior written permission.
1714034Sjavier.bueno@metempsy.com *
1814034Sjavier.bueno@metempsy.com *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1914034Sjavier.bueno@metempsy.com *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2014034Sjavier.bueno@metempsy.com *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2114034Sjavier.bueno@metempsy.com *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2214034Sjavier.bueno@metempsy.com *  HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2314034Sjavier.bueno@metempsy.com *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2414034Sjavier.bueno@metempsy.com *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2514034Sjavier.bueno@metempsy.com *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2614034Sjavier.bueno@metempsy.com *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2714034Sjavier.bueno@metempsy.com *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2814034Sjavier.bueno@metempsy.com *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2914034Sjavier.bueno@metempsy.com *
3014034Sjavier.bueno@metempsy.com *  Author: Daniel A. Jiménez
3114034Sjavier.bueno@metempsy.com *  Adapted to gem5 by: Javier Bueno Hedo
3214034Sjavier.bueno@metempsy.com *
3314034Sjavier.bueno@metempsy.com */
3414034Sjavier.bueno@metempsy.com
3514034Sjavier.bueno@metempsy.com/*
3614034Sjavier.bueno@metempsy.com * Multiperspective Perceptron Predictor (by Daniel A. Jiménez)
3714034Sjavier.bueno@metempsy.com * - 64KB version
3814034Sjavier.bueno@metempsy.com */
3914034Sjavier.bueno@metempsy.com
4014034Sjavier.bueno@metempsy.com#include "cpu/pred/multiperspective_perceptron_64KB.hh"
4114034Sjavier.bueno@metempsy.com
4214034Sjavier.bueno@metempsy.comMultiperspectivePerceptron64KB::MultiperspectivePerceptron64KB(
4314034Sjavier.bueno@metempsy.com        const MultiperspectivePerceptron64KBParams *p)
4414034Sjavier.bueno@metempsy.com    : MultiperspectivePerceptron(p)
4514034Sjavier.bueno@metempsy.com{
4614034Sjavier.bueno@metempsy.com}
4714034Sjavier.bueno@metempsy.com
4814034Sjavier.bueno@metempsy.comvoid
4914034Sjavier.bueno@metempsy.comMultiperspectivePerceptron64KB::createSpecs() {
5014034Sjavier.bueno@metempsy.com    addSpec(new ACYCLIC(10, -1, -1, 1.0, 0, 6, *this));
5114034Sjavier.bueno@metempsy.com    addSpec(new BLURRYPATH(10, 7, -1, 1.0, 0, 6, *this));
5214034Sjavier.bueno@metempsy.com    addSpec(new GHIST(0, 19, 1.3125, 0, 6, *this));
5314034Sjavier.bueno@metempsy.com    addSpec(new GHIST(0, 65, 0.85, 0, 6, *this));
5414034Sjavier.bueno@metempsy.com    addSpec(new GHIST(111, 222, 1.0, 0, 6, *this));
5514034Sjavier.bueno@metempsy.com    addSpec(new GHIST(115, 206, 1.0, 0, 6, *this));
5614034Sjavier.bueno@metempsy.com    addSpec(new GHIST(190, 336, 1.0, 0, 6, *this));
5714034Sjavier.bueno@metempsy.com    addSpec(new GHIST(21, 64, 1.0, 0, 6, *this));
5814034Sjavier.bueno@metempsy.com    addSpec(new GHIST(48, 119, 1.0, 0, 6, *this));
5914034Sjavier.bueno@metempsy.com    addSpec(new GHIST(67, 203, 0.75, 0, 6, *this));
6014034Sjavier.bueno@metempsy.com    addSpec(new GHIST(75, 150, 1.0, 0, 6, *this));
6114034Sjavier.bueno@metempsy.com    addSpec(new GHISTMODPATH(1, 5, 4, 1.45, 1913, 6, *this));
6214034Sjavier.bueno@metempsy.com    addSpec(new GHISTMODPATH(3, 13, 1, 1.0, 0, 6, *this));
6314034Sjavier.bueno@metempsy.com    addSpec(new GHISTPATH(105, 4, 0, 1.0, 0, 6, *this));
6414034Sjavier.bueno@metempsy.com    addSpec(new GHISTPATH(11, 2, -1, 1.25, 0, 6, *this));
6514034Sjavier.bueno@metempsy.com    addSpec(new GHISTPATH(15, 4, -1, 1.125, 0, 6, *this));
6614034Sjavier.bueno@metempsy.com    addSpec(new GHISTPATH(23, 4, -1, 1.0, 0, 6, *this));
6714034Sjavier.bueno@metempsy.com    addSpec(new GHISTPATH(31, 1, -1, 1.0, 0, 6, *this));
6814034Sjavier.bueno@metempsy.com    addSpec(new GHISTPATH(32, 2, -1, 1.0, 0, 6, *this));
6914034Sjavier.bueno@metempsy.com    addSpec(new GHISTPATH(36, 4, -1, 1.0, 0, 6, *this));
7014034Sjavier.bueno@metempsy.com    addSpec(new GHISTPATH(51, 1, 0, 1.0, 0, 6, *this));
7114034Sjavier.bueno@metempsy.com    addSpec(new GHISTPATH(7, 1, -1, 1.5, 0, 6, *this));
7214034Sjavier.bueno@metempsy.com    addSpec(new GHISTPATH(72, 1, -1, 1.0, 0, 6, *this));
7314034Sjavier.bueno@metempsy.com    addSpec(new GHISTPATH(86, 4, 0, 1.0, 0, 6, *this));
7414034Sjavier.bueno@metempsy.com    addSpec(new IMLI(1, 1.8125, 0, 6, *this));
7514034Sjavier.bueno@metempsy.com    addSpec(new IMLI(4, 1.78125, 1536, 6, *this));
7614034Sjavier.bueno@metempsy.com    addSpec(new LOCAL(-1, 1.0, 1024, 6, *this));
7714034Sjavier.bueno@metempsy.com    addSpec(new LOCAL(-1, 2.0, 3467, 6, *this));
7814034Sjavier.bueno@metempsy.com    addSpec(new MODHIST(1, 16, 0.9375, 0, 6, *this));
7914034Sjavier.bueno@metempsy.com    addSpec(new MODPATH(3, 20, 1, 1.0, 0, 6, *this));
8014034Sjavier.bueno@metempsy.com    addSpec(new PATH(13, 2, -1, 1.4375, 0, 6, *this));
8114034Sjavier.bueno@metempsy.com    addSpec(new PATH(27, 5, -1, 1.0, 0, 6, *this));
8214034Sjavier.bueno@metempsy.com    addSpec(new RECENCY(10, 3, -1, 0.55, 1024, 6, *this));
8314034Sjavier.bueno@metempsy.com    addSpec(new RECENCY(14, 4, -1, 1.3125, 0, 6, *this));
8414034Sjavier.bueno@metempsy.com    addSpec(new RECENCYPOS(31, 1.5, 0, 6, *this));
8514034Sjavier.bueno@metempsy.com    addSpec(new SGHISTPATH(1, 2, 5, 1.25, 768, 6, *this));
8614034Sjavier.bueno@metempsy.com    addSpec(new SGHISTPATH(1, 5, 2, 1.3125, 972, 6, *this));
8714034Sjavier.bueno@metempsy.com}
8814034Sjavier.bueno@metempsy.com
8914034Sjavier.bueno@metempsy.com    MultiperspectivePerceptron64KB*
9014034Sjavier.bueno@metempsy.comMultiperspectivePerceptron64KBParams::create()
9114034Sjavier.bueno@metempsy.com{
9214034Sjavier.bueno@metempsy.com    return new MultiperspectivePerceptron64KB(this);
9314034Sjavier.bueno@metempsy.com}
94