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 * - 8KB version 3814034Sjavier.bueno@metempsy.com */ 3914034Sjavier.bueno@metempsy.com 4014034Sjavier.bueno@metempsy.com#include "cpu/pred/multiperspective_perceptron_8KB.hh" 4114034Sjavier.bueno@metempsy.com 4214034Sjavier.bueno@metempsy.comMultiperspectivePerceptron8KB::MultiperspectivePerceptron8KB( 4314034Sjavier.bueno@metempsy.com const MultiperspectivePerceptron8KBParams *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.comMultiperspectivePerceptron8KB::createSpecs() { 5014034Sjavier.bueno@metempsy.com addSpec(new BIAS(2.40625, 0, 6, *this)); 5114034Sjavier.bueno@metempsy.com addSpec(new GHIST(0, 19, 1.4375, 0, 6, *this)); 5214034Sjavier.bueno@metempsy.com addSpec(new GHIST(0, 65, 1.0, 0, 6, *this)); 5314034Sjavier.bueno@metempsy.com addSpec(new GHIST(21, 64, 1.0, 0, 6, *this)); 5414034Sjavier.bueno@metempsy.com addSpec(new GHIST(75, 150, 1.0625, 0, 6, *this)); 5514034Sjavier.bueno@metempsy.com addSpec(new GHISTMODPATH(0, 7, 3, 1.625, 0, 6, *this)); 5614034Sjavier.bueno@metempsy.com addSpec(new GHISTPATH(11, 2, -1, 1.25, 0, 6, *this)); 5714034Sjavier.bueno@metempsy.com addSpec(new GHISTPATH(15, 4, -1, 1.125, 0, 6, *this)); 5814034Sjavier.bueno@metempsy.com addSpec(new GHISTPATH(31, 1, -1, 1.40625, 0, 6, *this)); 5914034Sjavier.bueno@metempsy.com addSpec(new GHISTPATH(7, 1, -1, 1.5, 600, 6, *this)); 6014034Sjavier.bueno@metempsy.com addSpec(new IMLI(4, 1.28125, 375, 6, *this)); 6114034Sjavier.bueno@metempsy.com addSpec(new LOCAL(-1, 1.5625, 512, 6, *this)); 6214034Sjavier.bueno@metempsy.com addSpec(new RECENCY(14, 4, -1, 1.25, 0, 6, *this)); 6314034Sjavier.bueno@metempsy.com addSpec(new RECENCYPOS(31, 1.875, 0, 6, *this)); 6414034Sjavier.bueno@metempsy.com addSpec(new SGHISTPATH(0, 4, 3, 1.65625, 0, 6, *this)); 6514034Sjavier.bueno@metempsy.com addSpec(new SGHISTPATH(1, 2, 5, 2.53125, 0, 5, *this)); 6614034Sjavier.bueno@metempsy.com} 6714034Sjavier.bueno@metempsy.com 6814034Sjavier.bueno@metempsy.com MultiperspectivePerceptron8KB* 6914034Sjavier.bueno@metempsy.comMultiperspectivePerceptron8KBParams::create() 7014034Sjavier.bueno@metempsy.com{ 7114034Sjavier.bueno@metempsy.com return new MultiperspectivePerceptron8KB(this); 7214034Sjavier.bueno@metempsy.com} 73