cpu_policy.hh revision 9919:803903a8dac1
112863Sgabeblack@google.com/* 212863Sgabeblack@google.com * Copyright (c) 2004-2005 The Regents of The University of Michigan 312863Sgabeblack@google.com * Copyright (c) 2013 Advanced Micro Devices, Inc. 412863Sgabeblack@google.com * All rights reserved. 512863Sgabeblack@google.com * 612863Sgabeblack@google.com * Redistribution and use in source and binary forms, with or without 712863Sgabeblack@google.com * modification, are permitted provided that the following conditions are 812863Sgabeblack@google.com * met: redistributions of source code must retain the above copyright 912863Sgabeblack@google.com * notice, this list of conditions and the following disclaimer; 1012863Sgabeblack@google.com * redistributions in binary form must reproduce the above copyright 1112863Sgabeblack@google.com * notice, this list of conditions and the following disclaimer in the 1212863Sgabeblack@google.com * documentation and/or other materials provided with the distribution; 1312863Sgabeblack@google.com * neither the name of the copyright holders nor the names of its 1412863Sgabeblack@google.com * contributors may be used to endorse or promote products derived from 1512863Sgabeblack@google.com * this software without specific prior written permission. 1612863Sgabeblack@google.com * 1712863Sgabeblack@google.com * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1812863Sgabeblack@google.com * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1912863Sgabeblack@google.com * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 2012863Sgabeblack@google.com * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 2112863Sgabeblack@google.com * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 2212863Sgabeblack@google.com * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 2312863Sgabeblack@google.com * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2412863Sgabeblack@google.com * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2512863Sgabeblack@google.com * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2612863Sgabeblack@google.com * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 2712863Sgabeblack@google.com * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2812863Sgabeblack@google.com * 2912863Sgabeblack@google.com * Authors: Kevin Lim 3012863Sgabeblack@google.com */ 3112863Sgabeblack@google.com 3212863Sgabeblack@google.com#ifndef __CPU_O3_CPU_POLICY_HH__ 3312950Sgabeblack@google.com#define __CPU_O3_CPU_POLICY_HH__ 3413046Sgabeblack@google.com 3513035Sgabeblack@google.com#include "cpu/o3/comm.hh" 3613035Sgabeblack@google.com#include "cpu/o3/commit.hh" 3713035Sgabeblack@google.com#include "cpu/o3/decode.hh" 3813053Sgabeblack@google.com#include "cpu/o3/fetch.hh" 3912950Sgabeblack@google.com#include "cpu/o3/free_list.hh" 4012950Sgabeblack@google.com#include "cpu/o3/iew.hh" 4112950Sgabeblack@google.com#include "cpu/o3/inst_queue.hh" 4212950Sgabeblack@google.com#include "cpu/o3/lsq.hh" 4313053Sgabeblack@google.com#include "cpu/o3/lsq_unit.hh" 4413053Sgabeblack@google.com#include "cpu/o3/mem_dep_unit.hh" 4513053Sgabeblack@google.com#include "cpu/o3/regfile.hh" 4613053Sgabeblack@google.com#include "cpu/o3/rename.hh" 4713059Sgabeblack@google.com#include "cpu/o3/rename_map.hh" 4813053Sgabeblack@google.com#include "cpu/o3/rob.hh" 4913053Sgabeblack@google.com#include "cpu/o3/store_set.hh" 5013053Sgabeblack@google.com 5112950Sgabeblack@google.com/** 5212863Sgabeblack@google.com * Struct that defines the key classes to be used by the CPU. All 5312863Sgabeblack@google.com * classes use the typedefs defined here to determine what are the 5413035Sgabeblack@google.com * classes of the other stages and communication buffers. In order to 5513035Sgabeblack@google.com * change a structure such as the IQ, simply change the typedef here 5613035Sgabeblack@google.com * to use the desired class instead, and recompile. In order to 5713035Sgabeblack@google.com * create a different CPU to be used simultaneously with this one, see 5813035Sgabeblack@google.com * the alpha_impl.hh file for instructions. 5913035Sgabeblack@google.com */ 6013035Sgabeblack@google.comtemplate<class Impl> 6113035Sgabeblack@google.comstruct SimpleCPUPolicy 6213035Sgabeblack@google.com{ 6313035Sgabeblack@google.com /** Typedef for the freelist of registers. */ 6413035Sgabeblack@google.com typedef UnifiedFreeList FreeList; 6513035Sgabeblack@google.com /** Typedef for the rename map. */ 6613035Sgabeblack@google.com typedef UnifiedRenameMap RenameMap; 6713035Sgabeblack@google.com /** Typedef for the ROB. */ 6813035Sgabeblack@google.com typedef ::ROB<Impl> ROB; 6913035Sgabeblack@google.com /** Typedef for the instruction queue/scheduler. */ 7013035Sgabeblack@google.com typedef InstructionQueue<Impl> IQ; 7112863Sgabeblack@google.com /** Typedef for the memory dependence unit. */ 7212863Sgabeblack@google.com typedef ::MemDepUnit<StoreSet, Impl> MemDepUnit; 7312863Sgabeblack@google.com /** Typedef for the LSQ. */ 7412863Sgabeblack@google.com typedef ::LSQ<Impl> LSQ; 7512950Sgabeblack@google.com /** Typedef for the thread-specific LSQ units. */ 7612950Sgabeblack@google.com typedef ::LSQUnit<Impl> LSQUnit; 7713191Sgabeblack@google.com 7813191Sgabeblack@google.com /** Typedef for fetch. */ 7912863Sgabeblack@google.com typedef DefaultFetch<Impl> Fetch; 8013035Sgabeblack@google.com /** Typedef for decode. */ 8113035Sgabeblack@google.com typedef DefaultDecode<Impl> Decode; 8212863Sgabeblack@google.com /** Typedef for rename. */ 8312950Sgabeblack@google.com typedef DefaultRename<Impl> Rename; 8412982Sgabeblack@google.com /** Typedef for Issue/Execute/Writeback. */ 8512982Sgabeblack@google.com typedef DefaultIEW<Impl> IEW; 8613268Sgabeblack@google.com /** Typedef for commit. */ 8713268Sgabeblack@google.com typedef DefaultCommit<Impl> Commit; 8813268Sgabeblack@google.com 8913268Sgabeblack@google.com /** The struct for communication between fetch and decode. */ 9013268Sgabeblack@google.com typedef DefaultFetchDefaultDecode<Impl> FetchStruct; 9113268Sgabeblack@google.com 9212950Sgabeblack@google.com /** The struct for communication between decode and rename. */ 9312863Sgabeblack@google.com typedef DefaultDecodeDefaultRename<Impl> DecodeStruct; 9412950Sgabeblack@google.com 9513191Sgabeblack@google.com /** The struct for communication between rename and IEW. */ 9613191Sgabeblack@google.com typedef DefaultRenameDefaultIEW<Impl> RenameStruct; 9712950Sgabeblack@google.com 9812950Sgabeblack@google.com /** The struct for communication between IEW and commit. */ 9912950Sgabeblack@google.com typedef DefaultIEWDefaultCommit<Impl> IEWStruct; 10012950Sgabeblack@google.com 10112950Sgabeblack@google.com /** The struct for communication within the IEW stage. */ 10212950Sgabeblack@google.com typedef ::IssueStruct<Impl> IssueStruct; 10312950Sgabeblack@google.com 10412950Sgabeblack@google.com /** The struct for all backwards communication. */ 10512950Sgabeblack@google.com typedef TimeBufStruct<Impl> TimeStruct; 10612950Sgabeblack@google.com 10712950Sgabeblack@google.com}; 10812950Sgabeblack@google.com 10912950Sgabeblack@google.com#endif //__CPU_O3_CPU_POLICY_HH__ 11012950Sgabeblack@google.com