impl.hh revision 5595
12373SN/A/* 22373SN/A * Copyright (c) 2004-2005 The Regents of The University of Michigan 32373SN/A * All rights reserved. 42373SN/A * 52373SN/A * Redistribution and use in source and binary forms, with or without 62373SN/A * modification, are permitted provided that the following conditions are 72373SN/A * met: redistributions of source code must retain the above copyright 82373SN/A * notice, this list of conditions and the following disclaimer; 92373SN/A * redistributions in binary form must reproduce the above copyright 102373SN/A * notice, this list of conditions and the following disclaimer in the 112373SN/A * documentation and/or other materials provided with the distribution; 122373SN/A * neither the name of the copyright holders nor the names of its 132373SN/A * contributors may be used to endorse or promote products derived from 142373SN/A * this software without specific prior written permission. 152373SN/A * 162373SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 172373SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 182373SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 192373SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 202373SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 212373SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 222373SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 232373SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 242373SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 252373SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 262373SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 272665Ssaidi@eecs.umich.edu * 282665Ssaidi@eecs.umich.edu * Authors: Gabe Black 292373SN/A */ 302373SN/A 312373SN/A#ifndef __CPU_O3_SPARC_IMPL_HH__ 322373SN/A#define __CPU_O3_SPARC_IMPL_HH__ 332373SN/A 342373SN/A#include "arch/sparc/isa_traits.hh" 352373SN/A 362373SN/A#include "cpu/o3/cpu_policy.hh" 372373SN/A 382373SN/A 392373SN/A// Forward declarations. 406227Snate@binkert.orgtemplate <class Impl> 412373SN/Aclass SparcDynInst; 426227Snate@binkert.org 432373SN/Atemplate <class Impl> 442373SN/Aclass FullO3CPU; 452373SN/A 462373SN/A/** Implementation specific struct that defines several key types to the 472373SN/A * CPU, the stages within the CPU, the time buffers, and the DynInst. 482373SN/A * The struct defines the ISA, the CPU policy, the specific DynInst, the 492373SN/A * specific O3CPU, and all of the structs from the time buffers to do 502373SN/A * communication. 512373SN/A * This is one of the key things that must be defined for each hardware 522373SN/A * specific CPU implementation. 532373SN/A */ 542373SN/Astruct SparcSimpleImpl 552373SN/A{ 562373SN/A /** The type of MachInst. */ 572373SN/A typedef TheISA::MachInst MachInst; 582373SN/A 592373SN/A /** The CPU policy to be used, which defines all of the CPU stages. */ 602373SN/A typedef SimpleCPUPolicy<SparcSimpleImpl> CPUPol; 612373SN/A 622373SN/A /** The DynInst type to be used. */ 632373SN/A typedef SparcDynInst<SparcSimpleImpl> DynInst; 642373SN/A 656227Snate@binkert.org /** The refcounted DynInst pointer to be used. In most cases this is 662373SN/A * what should be used, and not DynInst *. 676227Snate@binkert.org */ 682565SN/A typedef RefCountingPtr<DynInst> DynInstPtr; 692565SN/A 702373SN/A /** The O3CPU type to be used. */ 716227Snate@binkert.org typedef FullO3CPU<SparcSimpleImpl> O3CPU; 722373SN/A 732373SN/A /** Same typedef, but for CPUType. BaseDynInst may not always use 742373SN/A * an O3 CPU, so it's clearer to call it CPUType instead in that 752373SN/A * case. 762982Sstever@eecs.umich.edu */ 772373SN/A typedef O3CPU CPUType; 782373SN/A 792373SN/A enum { 802373SN/A MaxWidth = 8, 816227Snate@binkert.org MaxThreads = 4 822565SN/A }; 832373SN/A}; 842373SN/A 852418SN/A/** The O3Impl to be used. */ 862373SN/Atypedef SparcSimpleImpl O3CPUImpl; 872373SN/A 882373SN/A#endif // __CPU_O3_SPARC_IMPL_HH__ 892373SN/A