Split off instantiation into separate CC files for each of the models. This makes it easier to be able to specify only certain CPU models.
src/cpu/SConscript:
Split off instantiations into separate CC files. This makes it easier to split them per CPU model.
src/cpu/base_dyn_inst_impl.hh:
Move instantations out of impl.hh file and into a cc file.
src/cpu/checker/cpu_impl.hh:
Move instantiations over to .cc files inside each CPU's directory. Makes it easier to only use what's actually included.
src/cpu/o3/bpred_unit.cc:
Pull Ozone instantiations out of this .cc file; put them into the ozone's CC file.
src/cpu/o3/checker_builder.cc:
Instantiate Checker for O3 CPU.
src/cpu/ozone/checker_builder.cc:
Instantiate Checker for Ozone CPU.
--HG--
rename : src/cpu/base_dyn_inst.cc => src/cpu/base_dyn_inst_impl.hh
rename : src/cpu/checker/cpu.cc => src/cpu/checker/cpu_impl.hh
rename : src/cpu/checker/o3_builder.cc => src/cpu/o3/checker_builder.cc
rename : src/cpu/checker/ozone_builder.cc => src/cpu/ozone/checker_builder.cc
extra : convert_revision : 4e5f928b165379c06d31071c544ea46cf0b8fa71
This commit is contained in:
@@ -122,11 +122,11 @@ if 'FastCPU' in env['CPU_MODELS']:
|
||||
|
||||
if 'AlphaO3CPU' in env['CPU_MODELS']:
|
||||
sources += Split('''
|
||||
base_dyn_inst.cc
|
||||
o3/2bit_local_pred.cc
|
||||
o3/alpha_dyn_inst.cc
|
||||
o3/alpha_cpu.cc
|
||||
o3/alpha_cpu_builder.cc
|
||||
o3/base_dyn_inst.cc
|
||||
o3/bpred_unit.cc
|
||||
o3/btb.cc
|
||||
o3/commit.cc
|
||||
@@ -149,7 +149,7 @@ if 'AlphaO3CPU' in env['CPU_MODELS']:
|
||||
o3/tournament_pred.cc
|
||||
''')
|
||||
if 'CheckerCPU' in env['CPU_MODELS']:
|
||||
sources += Split('checker/o3_builder.cc')
|
||||
sources += Split('o3/checker_builder.cc')
|
||||
|
||||
if 'OzoneSimpleCPU' in env['CPU_MODELS']:
|
||||
sources += Split('''
|
||||
@@ -161,18 +161,19 @@ if 'OzoneSimpleCPU' in env['CPU_MODELS']:
|
||||
ozone/inst_queue.cc
|
||||
ozone/rename_table.cc
|
||||
''')
|
||||
if 'CheckerCPU' in env['CPU_MODELS']:
|
||||
sources += Split('checker/ozone_builder.cc')
|
||||
|
||||
if 'OzoneCPU' in env['CPU_MODELS']:
|
||||
sources += Split('''
|
||||
ozone/base_dyn_inst.cc
|
||||
ozone/bpred_unit.cc
|
||||
ozone/lsq_unit.cc
|
||||
ozone/lw_back_end.cc
|
||||
ozone/lw_lsq.cc
|
||||
''')
|
||||
if 'CheckerCPU' in env['CPU_MODELS']:
|
||||
sources += Split('ozone/checker_builder.cc')
|
||||
|
||||
if 'CheckerCPU' in env['CPU_MODELS']:
|
||||
sources += Split('checker/cpu.cc')
|
||||
checker_supports = False
|
||||
for i in CheckerSupportedCPUList:
|
||||
if i in env['CPU_MODELS']:
|
||||
|
||||
@@ -41,10 +41,6 @@
|
||||
#include "mem/request.hh"
|
||||
|
||||
#include "cpu/base_dyn_inst.hh"
|
||||
#include "cpu/o3/alpha_impl.hh"
|
||||
#include "cpu/o3/alpha_cpu.hh"
|
||||
//#include "cpu/ozone/simple_impl.hh"
|
||||
//#include "cpu/ozone/ozone_impl.hh"
|
||||
|
||||
using namespace std;
|
||||
using namespace TheISA;
|
||||
@@ -301,25 +297,3 @@ BaseDynInst<Impl>::eaSrcsReady()
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Forward declaration
|
||||
template class BaseDynInst<AlphaSimpleImpl>;
|
||||
|
||||
template <>
|
||||
int
|
||||
BaseDynInst<AlphaSimpleImpl>::instcount = 0;
|
||||
/*
|
||||
// Forward declaration
|
||||
template class BaseDynInst<SimpleImpl>;
|
||||
|
||||
template <>
|
||||
int
|
||||
BaseDynInst<SimpleImpl>::instcount = 0;
|
||||
|
||||
// Forward declaration
|
||||
template class BaseDynInst<OzoneImpl>;
|
||||
|
||||
template <>
|
||||
int
|
||||
BaseDynInst<OzoneImpl>::instcount = 0;
|
||||
*/
|
||||
@@ -43,16 +43,10 @@
|
||||
#include "sim/sim_object.hh"
|
||||
#include "sim/stats.hh"
|
||||
|
||||
#include "cpu/o3/alpha_dyn_inst.hh"
|
||||
#include "cpu/o3/alpha_impl.hh"
|
||||
|
||||
//#include "cpu/ozone/dyn_inst.hh"
|
||||
//#include "cpu/ozone/ozone_impl.hh"
|
||||
//#include "cpu/ozone/simple_impl.hh"
|
||||
|
||||
#if FULL_SYSTEM
|
||||
#include "sim/system.hh"
|
||||
#include "arch/vtophys.hh"
|
||||
#include "kern/kernel_stats.hh"
|
||||
#endif // FULL_SYSTEM
|
||||
|
||||
using namespace std;
|
||||
@@ -826,9 +820,3 @@ Checker<DynInstPtr>::dumpInsts()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//template
|
||||
//class Checker<RefCountingPtr<OzoneDynInst<OzoneImpl> > >;
|
||||
// Manually instantiate checker
|
||||
template
|
||||
class Checker<RefCountingPtr<AlphaDynInst<AlphaSimpleImpl> > >;
|
||||
40
src/cpu/o3/base_dyn_inst.cc
Normal file
40
src/cpu/o3/base_dyn_inst.cc
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright (c) 2006 The Regents of The University of Michigan
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met: redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer;
|
||||
* redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution;
|
||||
* neither the name of the copyright holders nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Authors: Kevin Lim
|
||||
*/
|
||||
|
||||
#include "cpu/base_dyn_inst_impl.hh"
|
||||
#include "cpu/o3/alpha_cpu.hh"
|
||||
#include "cpu/o3/alpha_impl.hh"
|
||||
|
||||
// Explicit instantiation
|
||||
template class BaseDynInst<AlphaSimpleImpl>;
|
||||
|
||||
template <>
|
||||
int
|
||||
BaseDynInst<AlphaSimpleImpl>::instcount = 0;
|
||||
@@ -31,9 +31,5 @@
|
||||
#include "cpu/o3/bpred_unit_impl.hh"
|
||||
#include "cpu/o3/alpha_impl.hh"
|
||||
#include "cpu/o3/alpha_dyn_inst.hh"
|
||||
//#include "cpu/ozone/ozone_impl.hh"
|
||||
//#include "cpu/ozone/simple_impl.hh"
|
||||
|
||||
template class BPredUnit<AlphaSimpleImpl>;
|
||||
//template class BPredUnit<OzoneImpl>;
|
||||
//template class BPredUnit<SimpleImpl>;
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "cpu/checker/cpu.hh"
|
||||
#include "cpu/checker/cpu_impl.hh"
|
||||
#include "cpu/inst_seq.hh"
|
||||
#include "cpu/o3/alpha_dyn_inst.hh"
|
||||
#include "cpu/o3/alpha_impl.hh"
|
||||
@@ -40,6 +40,9 @@
|
||||
|
||||
class MemObject;
|
||||
|
||||
template
|
||||
class Checker<RefCountingPtr<AlphaDynInst<AlphaSimpleImpl> > >;
|
||||
|
||||
/**
|
||||
* Specific non-templated derived class used for SimObject configuration.
|
||||
*/
|
||||
36
src/cpu/ozone/bpred_unit.cc
Normal file
36
src/cpu/ozone/bpred_unit.cc
Normal file
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2006 The Regents of The University of Michigan
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met: redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer;
|
||||
* redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution;
|
||||
* neither the name of the copyright holders nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Authors: Kevin Lim
|
||||
*/
|
||||
|
||||
#include "cpu/o3/bpred_unit_impl.hh"
|
||||
#include "cpu/ozone/ozone_impl.hh"
|
||||
#include "cpu/ozone/simple_impl.hh"
|
||||
|
||||
template class BPredUnit<OzoneImpl>;
|
||||
template class BPredUnit<SimpleImpl>;
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "cpu/checker/cpu.hh"
|
||||
#include "cpu/checker/cpu_impl.hh"
|
||||
#include "cpu/inst_seq.hh"
|
||||
#include "cpu/ozone/dyn_inst.hh"
|
||||
#include "cpu/ozone/ozone_impl.hh"
|
||||
@@ -39,6 +39,9 @@
|
||||
#include "sim/process.hh"
|
||||
#include "sim/sim_object.hh"
|
||||
|
||||
template
|
||||
class Checker<RefCountingPtr<OzoneDynInst<OzoneImpl> > >;
|
||||
|
||||
/**
|
||||
* Specific non-templated derived class used for SimObject configuration.
|
||||
*/
|
||||
39
src/cpu/ozone/ozone_base_dyn_inst.cc
Normal file
39
src/cpu/ozone/ozone_base_dyn_inst.cc
Normal file
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Copyright (c) 2006 The Regents of The University of Michigan
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met: redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer;
|
||||
* redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution;
|
||||
* neither the name of the copyright holders nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Authors: Kevin Lim
|
||||
*/
|
||||
|
||||
#include "cpu/base_dyn_inst_impl.hh"
|
||||
#include "cpu/ozone/ozone_impl.hh"
|
||||
|
||||
// Explicit instantiation
|
||||
template class BaseDynInst<OzoneImpl>;
|
||||
|
||||
template <>
|
||||
int
|
||||
BaseDynInst<OzoneImpl>::instcount = 0;
|
||||
39
src/cpu/ozone/simple_base_dyn_inst.cc
Normal file
39
src/cpu/ozone/simple_base_dyn_inst.cc
Normal file
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Copyright (c) 2006 The Regents of The University of Michigan
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met: redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer;
|
||||
* redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution;
|
||||
* neither the name of the copyright holders nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Authors: Kevin Lim
|
||||
*/
|
||||
|
||||
#include "cpu/base_dyn_inst_impl.hh"
|
||||
#include "cpu/ozone/simple_impl.hh"
|
||||
|
||||
// Explicit instantiation
|
||||
template class BaseDynInst<SimpleImpl>;
|
||||
|
||||
template <>
|
||||
int
|
||||
BaseDynInst<SimpleImpl>::instcount = 0;
|
||||
Reference in New Issue
Block a user