impl.hh revision 5596
14776Sgblack@eecs.umich.edu/*
24776Sgblack@eecs.umich.edu * Copyright (c) 2004-2005 The Regents of The University of Michigan
34776Sgblack@eecs.umich.edu * All rights reserved.
44776Sgblack@eecs.umich.edu *
54776Sgblack@eecs.umich.edu * Redistribution and use in source and binary forms, with or without
64776Sgblack@eecs.umich.edu * modification, are permitted provided that the following conditions are
74776Sgblack@eecs.umich.edu * met: redistributions of source code must retain the above copyright
84776Sgblack@eecs.umich.edu * notice, this list of conditions and the following disclaimer;
94776Sgblack@eecs.umich.edu * redistributions in binary form must reproduce the above copyright
104776Sgblack@eecs.umich.edu * notice, this list of conditions and the following disclaimer in the
114776Sgblack@eecs.umich.edu * documentation and/or other materials provided with the distribution;
124776Sgblack@eecs.umich.edu * neither the name of the copyright holders nor the names of its
134776Sgblack@eecs.umich.edu * contributors may be used to endorse or promote products derived from
144776Sgblack@eecs.umich.edu * this software without specific prior written permission.
154776Sgblack@eecs.umich.edu *
164776Sgblack@eecs.umich.edu * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
174776Sgblack@eecs.umich.edu * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
184776Sgblack@eecs.umich.edu * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
194776Sgblack@eecs.umich.edu * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
204776Sgblack@eecs.umich.edu * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
214776Sgblack@eecs.umich.edu * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
224776Sgblack@eecs.umich.edu * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
234776Sgblack@eecs.umich.edu * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
244776Sgblack@eecs.umich.edu * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
254776Sgblack@eecs.umich.edu * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
264776Sgblack@eecs.umich.edu * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
274776Sgblack@eecs.umich.edu *
284776Sgblack@eecs.umich.edu * Authors: Gabe Black
294776Sgblack@eecs.umich.edu */
304776Sgblack@eecs.umich.edu
314776Sgblack@eecs.umich.edu#ifndef __CPU_O3_SPARC_IMPL_HH__
326216Snate@binkert.org#define __CPU_O3_SPARC_IMPL_HH__
336216Snate@binkert.org
344776Sgblack@eecs.umich.edu#include "arch/sparc/isa_traits.hh"
354776Sgblack@eecs.umich.edu
366216Snate@binkert.org#include "cpu/o3/cpu_policy.hh"
374776Sgblack@eecs.umich.edu
385034Smilesck@eecs.umich.edu
394776Sgblack@eecs.umich.edu// Forward declarations.
404776Sgblack@eecs.umich.edutemplate <class Impl>
414776Sgblack@eecs.umich.educlass BaseO3DynInst;
424776Sgblack@eecs.umich.edu
434776Sgblack@eecs.umich.edutemplate <class Impl>
444776Sgblack@eecs.umich.educlass FullO3CPU;
454776Sgblack@eecs.umich.edu
464776Sgblack@eecs.umich.edu/** Implementation specific struct that defines several key types to the
474776Sgblack@eecs.umich.edu *  CPU, the stages within the CPU, the time buffers, and the DynInst.
484776Sgblack@eecs.umich.edu *  The struct defines the ISA, the CPU policy, the specific DynInst, the
495784Sgblack@eecs.umich.edu *  specific O3CPU, and all of the structs from the time buffers to do
505784Sgblack@eecs.umich.edu *  communication.
515784Sgblack@eecs.umich.edu *  This is one of the key things that must be defined for each hardware
525784Sgblack@eecs.umich.edu *  specific CPU implementation.
534776Sgblack@eecs.umich.edu */
544776Sgblack@eecs.umich.edustruct SparcSimpleImpl
554776Sgblack@eecs.umich.edu{
564776Sgblack@eecs.umich.edu    /** The type of MachInst. */
574776Sgblack@eecs.umich.edu    typedef TheISA::MachInst MachInst;
584776Sgblack@eecs.umich.edu
594776Sgblack@eecs.umich.edu    /** The CPU policy to be used, which defines all of the CPU stages. */
604776Sgblack@eecs.umich.edu    typedef SimpleCPUPolicy<SparcSimpleImpl> CPUPol;
614776Sgblack@eecs.umich.edu
624776Sgblack@eecs.umich.edu    /** The DynInst type to be used. */
635034Smilesck@eecs.umich.edu    typedef BaseO3DynInst<SparcSimpleImpl> DynInst;
644776Sgblack@eecs.umich.edu
654776Sgblack@eecs.umich.edu    /** The refcounted DynInst pointer to be used.  In most cases this is
664776Sgblack@eecs.umich.edu     *  what should be used, and not DynInst *.
674776Sgblack@eecs.umich.edu     */
685784Sgblack@eecs.umich.edu    typedef RefCountingPtr<DynInst> DynInstPtr;
695784Sgblack@eecs.umich.edu
704776Sgblack@eecs.umich.edu    /** The O3CPU type to be used. */
714776Sgblack@eecs.umich.edu    typedef FullO3CPU<SparcSimpleImpl> O3CPU;
724776Sgblack@eecs.umich.edu
734776Sgblack@eecs.umich.edu    /** Same typedef, but for CPUType.  BaseDynInst may not always use
744776Sgblack@eecs.umich.edu     * an O3 CPU, so it's clearer to call it CPUType instead in that
754776Sgblack@eecs.umich.edu     * case.
764776Sgblack@eecs.umich.edu     */
774776Sgblack@eecs.umich.edu    typedef O3CPU CPUType;
784776Sgblack@eecs.umich.edu
794776Sgblack@eecs.umich.edu    enum {
804776Sgblack@eecs.umich.edu      MaxWidth = 8,
815784Sgblack@eecs.umich.edu      MaxThreads = 4
824776Sgblack@eecs.umich.edu    };
834776Sgblack@eecs.umich.edu};
844776Sgblack@eecs.umich.edu
854776Sgblack@eecs.umich.edu/** The O3Impl to be used. */
864776Sgblack@eecs.umich.edutypedef SparcSimpleImpl O3CPUImpl;
876216Snate@binkert.org
88#endif // __CPU_O3_SPARC_IMPL_HH__
89