cpu_policy.hh revision 8229
11689SN/A/*
21689SN/A * Copyright (c) 2004-2005 The Regents of The University of Michigan
31689SN/A * All rights reserved.
41689SN/A *
51689SN/A * Redistribution and use in source and binary forms, with or without
61689SN/A * modification, are permitted provided that the following conditions are
71689SN/A * met: redistributions of source code must retain the above copyright
81689SN/A * notice, this list of conditions and the following disclaimer;
91689SN/A * redistributions in binary form must reproduce the above copyright
101689SN/A * notice, this list of conditions and the following disclaimer in the
111689SN/A * documentation and/or other materials provided with the distribution;
121689SN/A * neither the name of the copyright holders nor the names of its
131689SN/A * contributors may be used to endorse or promote products derived from
141689SN/A * this software without specific prior written permission.
151689SN/A *
161689SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
171689SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
181689SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
191689SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
201689SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
211689SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
221689SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
231689SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
241689SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
251689SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
261689SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
272665Ssaidi@eecs.umich.edu *
282665Ssaidi@eecs.umich.edu * Authors: Kevin Lim
291689SN/A */
301689SN/A
312292SN/A#ifndef __CPU_O3_CPU_POLICY_HH__
322292SN/A#define __CPU_O3_CPU_POLICY_HH__
331060SN/A
341717SN/A#include "cpu/o3/bpred_unit.hh"
358229Snate@binkert.org#include "cpu/o3/comm.hh"
368229Snate@binkert.org#include "cpu/o3/commit.hh"
378229Snate@binkert.org#include "cpu/o3/decode.hh"
388229Snate@binkert.org#include "cpu/o3/fetch.hh"
391717SN/A#include "cpu/o3/free_list.hh"
408229Snate@binkert.org#include "cpu/o3/iew.hh"
411717SN/A#include "cpu/o3/inst_queue.hh"
422292SN/A#include "cpu/o3/lsq.hh"
432292SN/A#include "cpu/o3/lsq_unit.hh"
441717SN/A#include "cpu/o3/mem_dep_unit.hh"
451717SN/A#include "cpu/o3/regfile.hh"
468229Snate@binkert.org#include "cpu/o3/rename.hh"
471717SN/A#include "cpu/o3/rename_map.hh"
481717SN/A#include "cpu/o3/rob.hh"
491717SN/A#include "cpu/o3/store_set.hh"
501061SN/A
512348SN/A/**
522348SN/A * Struct that defines the key classes to be used by the CPU.  All
532348SN/A * classes use the typedefs defined here to determine what are the
542348SN/A * classes of the other stages and communication buffers.  In order to
552348SN/A * change a structure such as the IQ, simply change the typedef here
562348SN/A * to use the desired class instead, and recompile.  In order to
572348SN/A * create a different CPU to be used simultaneously with this one, see
582348SN/A * the alpha_impl.hh file for instructions.
592348SN/A */
601060SN/Atemplate<class Impl>
611060SN/Astruct SimpleCPUPolicy
621060SN/A{
632348SN/A    /** Typedef for the branch prediction unit (which includes the BP,
642348SN/A     * RAS, and BTB).
652348SN/A     */
665553Snate@binkert.org    typedef ::BPredUnit<Impl> BPredUnit;
672348SN/A    /** Typedef for the register file.  Most classes assume a unified
682348SN/A     * physical register file.
692348SN/A     */
701060SN/A    typedef PhysRegFile<Impl> RegFile;
712348SN/A    /** Typedef for the freelist of registers. */
721060SN/A    typedef SimpleFreeList FreeList;
732348SN/A    /** Typedef for the rename map. */
741060SN/A    typedef SimpleRenameMap RenameMap;
752348SN/A    /** Typedef for the ROB. */
765553Snate@binkert.org    typedef ::ROB<Impl> ROB;
772348SN/A    /** Typedef for the instruction queue/scheduler. */
781060SN/A    typedef InstructionQueue<Impl> IQ;
792348SN/A    /** Typedef for the memory dependence unit. */
805553Snate@binkert.org    typedef ::MemDepUnit<StoreSet, Impl> MemDepUnit;
812348SN/A    /** Typedef for the LSQ. */
825553Snate@binkert.org    typedef ::LSQ<Impl> LSQ;
832348SN/A    /** Typedef for the thread-specific LSQ units. */
845553Snate@binkert.org    typedef ::LSQUnit<Impl> LSQUnit;
851060SN/A
862348SN/A    /** Typedef for fetch. */
872292SN/A    typedef DefaultFetch<Impl> Fetch;
882348SN/A    /** Typedef for decode. */
892292SN/A    typedef DefaultDecode<Impl> Decode;
902348SN/A    /** Typedef for rename. */
912292SN/A    typedef DefaultRename<Impl> Rename;
922348SN/A    /** Typedef for Issue/Execute/Writeback. */
932292SN/A    typedef DefaultIEW<Impl> IEW;
942348SN/A    /** Typedef for commit. */
952292SN/A    typedef DefaultCommit<Impl> Commit;
961061SN/A
971061SN/A    /** The struct for communication between fetch and decode. */
982292SN/A    typedef DefaultFetchDefaultDecode<Impl> FetchStruct;
991061SN/A
1001061SN/A    /** The struct for communication between decode and rename. */
1012292SN/A    typedef DefaultDecodeDefaultRename<Impl> DecodeStruct;
1021061SN/A
1031061SN/A    /** The struct for communication between rename and IEW. */
1042292SN/A    typedef DefaultRenameDefaultIEW<Impl> RenameStruct;
1051061SN/A
1061061SN/A    /** The struct for communication between IEW and commit. */
1072292SN/A    typedef DefaultIEWDefaultCommit<Impl> IEWStruct;
1081061SN/A
1091061SN/A    /** The struct for communication within the IEW stage. */
1105553Snate@binkert.org    typedef ::IssueStruct<Impl> IssueStruct;
1111061SN/A
1121061SN/A    /** The struct for all backwards communication. */
1132292SN/A    typedef TimeBufStruct<Impl> TimeStruct;
1141061SN/A
1151060SN/A};
1161060SN/A
1172292SN/A#endif //__CPU_O3_CPU_POLICY_HH__
118