Rework the way SCons recurses into subdirectories, making it
automatic. The point is that now a subdirectory can be added to the build process just by creating a SConscript file in it. The process has two passes. On the first pass, all subdirs of the root of the tree are searched for SConsopts files. These files contain any command line options that ought to be added for a particular subdirectory. On the second pass, all subdirs of the src directory are searched for SConscript files. These files describe how to build any given subdirectory. I have added a Source() function. Any file (relative to the directory in which the SConscript resides) passed to that function is added to the build. Clean up everything to take advantage of Source(). function is added to the list of files to be built. --HG-- extra : convert_revision : 103f6b490d2eb224436688c89cdc015211c4fd30
This commit is contained in:
parent
bf4dade64a
commit
1aef5c06a3
33 changed files with 1080 additions and 738 deletions
45
SConstruct
45
SConstruct
|
@ -63,10 +63,10 @@
|
||||||
#
|
#
|
||||||
###################################################
|
###################################################
|
||||||
|
|
||||||
# Python library imports
|
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
from os.path import join as joinpath
|
from os.path import join as joinpath
|
||||||
|
|
||||||
# Check for recent-enough Python and SCons versions. If your system's
|
# Check for recent-enough Python and SCons versions. If your system's
|
||||||
|
@ -182,6 +182,7 @@ for t in abs_targets:
|
||||||
env = Environment(ENV = os.environ, # inherit user's environment vars
|
env = Environment(ENV = os.environ, # inherit user's environment vars
|
||||||
ROOT = ROOT,
|
ROOT = ROOT,
|
||||||
SRCDIR = SRCDIR)
|
SRCDIR = SRCDIR)
|
||||||
|
Export('env')
|
||||||
|
|
||||||
#Parse CC/CXX early so that we use the correct compiler for
|
#Parse CC/CXX early so that we use the correct compiler for
|
||||||
# to test for dependencies/versions/libraries/includes
|
# to test for dependencies/versions/libraries/includes
|
||||||
|
@ -363,30 +364,42 @@ if have_mysql:
|
||||||
env = conf.Finish()
|
env = conf.Finish()
|
||||||
|
|
||||||
# Define the universe of supported ISAs
|
# Define the universe of supported ISAs
|
||||||
env['ALL_ISA_LIST'] = ['alpha', 'sparc', 'mips', 'x86']
|
all_isa_list = [ ]
|
||||||
|
Export('all_isa_list')
|
||||||
|
|
||||||
# Define the universe of supported CPU models
|
# Define the universe of supported CPU models
|
||||||
env['ALL_CPU_LIST'] = ['AtomicSimpleCPU', 'TimingSimpleCPU',
|
all_cpu_list = [ ]
|
||||||
'O3CPU', 'OzoneCPU']
|
default_cpus = [ ]
|
||||||
|
Export('all_cpu_list', 'default_cpus')
|
||||||
if os.path.isdir(joinpath(SRCDIR, 'encumbered/cpu/full')):
|
|
||||||
env['ALL_CPU_LIST'] += ['FullCPU']
|
|
||||||
|
|
||||||
# Sticky options get saved in the options file so they persist from
|
# Sticky options get saved in the options file so they persist from
|
||||||
# one invocation to the next (unless overridden, in which case the new
|
# one invocation to the next (unless overridden, in which case the new
|
||||||
# value becomes sticky).
|
# value becomes sticky).
|
||||||
sticky_opts = Options(args=ARGUMENTS)
|
sticky_opts = Options(args=ARGUMENTS)
|
||||||
|
Export('sticky_opts')
|
||||||
|
|
||||||
|
# Non-sticky options only apply to the current build.
|
||||||
|
nonsticky_opts = Options(args=ARGUMENTS)
|
||||||
|
Export('nonsticky_opts')
|
||||||
|
|
||||||
|
# Walk the tree and execute all SConsopts scripts that wil add to the
|
||||||
|
# above options
|
||||||
|
for root, dirs, files in os.walk('.'):
|
||||||
|
if 'SConsopts' in files:
|
||||||
|
SConscript(os.path.join(root, 'SConsopts'))
|
||||||
|
|
||||||
|
all_isa_list.sort()
|
||||||
|
all_cpu_list.sort()
|
||||||
|
default_cpus.sort()
|
||||||
|
|
||||||
sticky_opts.AddOptions(
|
sticky_opts.AddOptions(
|
||||||
EnumOption('TARGET_ISA', 'Target ISA', 'alpha', env['ALL_ISA_LIST']),
|
EnumOption('TARGET_ISA', 'Target ISA', 'alpha', all_isa_list),
|
||||||
BoolOption('FULL_SYSTEM', 'Full-system support', False),
|
BoolOption('FULL_SYSTEM', 'Full-system support', False),
|
||||||
# There's a bug in scons 0.96.1 that causes ListOptions with list
|
# There's a bug in scons 0.96.1 that causes ListOptions with list
|
||||||
# values (more than one value) not to be able to be restored from
|
# values (more than one value) not to be able to be restored from
|
||||||
# a saved option file. If this causes trouble then upgrade to
|
# a saved option file. If this causes trouble then upgrade to
|
||||||
# scons 0.96.90 or later.
|
# scons 0.96.90 or later.
|
||||||
ListOption('CPU_MODELS', 'CPU models', 'AtomicSimpleCPU,TimingSimpleCPU,O3CPU',
|
ListOption('CPU_MODELS', 'CPU models', default_cpus, all_cpu_list),
|
||||||
env['ALL_CPU_LIST']),
|
|
||||||
BoolOption('ALPHA_TLASER',
|
|
||||||
'Model Alpha TurboLaser platform (vs. Tsunami)', False),
|
|
||||||
BoolOption('NO_FAST_ALLOC', 'Disable fast object allocator', False),
|
BoolOption('NO_FAST_ALLOC', 'Disable fast object allocator', False),
|
||||||
BoolOption('EFENCE', 'Link with Electric Fence malloc debugger',
|
BoolOption('EFENCE', 'Link with Electric Fence malloc debugger',
|
||||||
False),
|
False),
|
||||||
|
@ -408,8 +421,6 @@ sticky_opts.AddOptions(
|
||||||
'%s:%s' % (sys.prefix, sys.exec_prefix))
|
'%s:%s' % (sys.prefix, sys.exec_prefix))
|
||||||
)
|
)
|
||||||
|
|
||||||
# Non-sticky options only apply to the current build.
|
|
||||||
nonsticky_opts = Options(args=ARGUMENTS)
|
|
||||||
nonsticky_opts.AddOptions(
|
nonsticky_opts.AddOptions(
|
||||||
BoolOption('update_ref', 'Update test reference outputs', False)
|
BoolOption('update_ref', 'Update test reference outputs', False)
|
||||||
)
|
)
|
||||||
|
@ -514,6 +525,7 @@ env.SConscript('ext/libelf/SConscript',
|
||||||
#
|
#
|
||||||
###################################################
|
###################################################
|
||||||
|
|
||||||
|
env['ALL_ISA_LIST'] = all_isa_list
|
||||||
def make_switching_dir(dirname, switch_headers, env):
|
def make_switching_dir(dirname, switch_headers, env):
|
||||||
# Generate the header. target[0] is the full path of the output
|
# Generate the header. target[0] is the full path of the output
|
||||||
# header to generate. 'source' is a dummy variable, since we get the
|
# header to generate. 'source' is a dummy variable, since we get the
|
||||||
|
@ -524,7 +536,7 @@ def make_switching_dir(dirname, switch_headers, env):
|
||||||
f = open(fname, 'w')
|
f = open(fname, 'w')
|
||||||
f.write('#include "arch/isa_specific.hh"\n')
|
f.write('#include "arch/isa_specific.hh"\n')
|
||||||
cond = '#if'
|
cond = '#if'
|
||||||
for isa in env['ALL_ISA_LIST']:
|
for isa in all_isa_list:
|
||||||
f.write('%s THE_ISA == %s_ISA\n#include "%s/%s/%s"\n'
|
f.write('%s THE_ISA == %s_ISA\n#include "%s/%s/%s"\n'
|
||||||
% (cond, isa.upper(), dirname, isa, basename))
|
% (cond, isa.upper(), dirname, isa, basename))
|
||||||
cond = '#elif'
|
cond = '#elif'
|
||||||
|
@ -545,8 +557,7 @@ def make_switching_dir(dirname, switch_headers, env):
|
||||||
# Instantiate actions for each header
|
# Instantiate actions for each header
|
||||||
for hdr in switch_headers:
|
for hdr in switch_headers:
|
||||||
env.Command(hdr, [], switch_hdr_action)
|
env.Command(hdr, [], switch_hdr_action)
|
||||||
|
Export('make_switching_dir')
|
||||||
env.make_switching_dir = make_switching_dir
|
|
||||||
|
|
||||||
###################################################
|
###################################################
|
||||||
#
|
#
|
||||||
|
|
251
src/SConscript
251
src/SConscript
|
@ -30,195 +30,27 @@
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
from os.path import isfile, join as joinpath
|
|
||||||
|
from os.path import join as joinpath
|
||||||
|
|
||||||
# This file defines how to build a particular configuration of M5
|
# This file defines how to build a particular configuration of M5
|
||||||
# based on variable settings in the 'env' build environment.
|
# based on variable settings in the 'env' build environment.
|
||||||
|
|
||||||
# Import build environment variable from SConstruct.
|
Import('*')
|
||||||
Import('env')
|
|
||||||
|
|
||||||
###################################################
|
sources = []
|
||||||
#
|
def Source(*args):
|
||||||
# Define needed sources.
|
for arg in args:
|
||||||
#
|
if isinstance(arg, (list, tuple)):
|
||||||
###################################################
|
# Recurse to load a list
|
||||||
|
Source(*arg)
|
||||||
|
elif isinstance(arg, str):
|
||||||
|
sources.extend([ File(f) for f in Split(arg) ])
|
||||||
|
else:
|
||||||
|
sources.append(File(arg))
|
||||||
|
|
||||||
# Base sources used by all configurations.
|
Export('env')
|
||||||
|
Export('Source')
|
||||||
base_sources = Split('''
|
|
||||||
base/annotate.cc
|
|
||||||
base/bigint.cc
|
|
||||||
base/circlebuf.cc
|
|
||||||
base/cprintf.cc
|
|
||||||
base/fast_alloc.cc
|
|
||||||
base/fifo_buffer.cc
|
|
||||||
base/hostinfo.cc
|
|
||||||
base/hybrid_pred.cc
|
|
||||||
base/inifile.cc
|
|
||||||
base/intmath.cc
|
|
||||||
base/match.cc
|
|
||||||
base/misc.cc
|
|
||||||
base/output.cc
|
|
||||||
base/pollevent.cc
|
|
||||||
base/range.cc
|
|
||||||
base/random.cc
|
|
||||||
base/remote_gdb.cc
|
|
||||||
base/sat_counter.cc
|
|
||||||
base/socket.cc
|
|
||||||
base/statistics.cc
|
|
||||||
base/str.cc
|
|
||||||
base/time.cc
|
|
||||||
base/trace.cc
|
|
||||||
base/traceflags.cc
|
|
||||||
base/userinfo.cc
|
|
||||||
base/compression/lzss_compression.cc
|
|
||||||
base/loader/aout_object.cc
|
|
||||||
base/loader/ecoff_object.cc
|
|
||||||
base/loader/elf_object.cc
|
|
||||||
base/loader/raw_object.cc
|
|
||||||
base/loader/object_file.cc
|
|
||||||
base/loader/symtab.cc
|
|
||||||
base/stats/events.cc
|
|
||||||
base/stats/output.cc
|
|
||||||
base/stats/statdb.cc
|
|
||||||
base/stats/visit.cc
|
|
||||||
base/stats/text.cc
|
|
||||||
|
|
||||||
cpu/activity.cc
|
|
||||||
cpu/base.cc
|
|
||||||
cpu/cpuevent.cc
|
|
||||||
cpu/exetrace.cc
|
|
||||||
cpu/func_unit.cc
|
|
||||||
cpu/op_class.cc
|
|
||||||
cpu/pc_event.cc
|
|
||||||
cpu/quiesce_event.cc
|
|
||||||
cpu/static_inst.cc
|
|
||||||
cpu/simple_thread.cc
|
|
||||||
cpu/thread_state.cc
|
|
||||||
|
|
||||||
mem/bridge.cc
|
|
||||||
mem/bus.cc
|
|
||||||
mem/dram.cc
|
|
||||||
mem/mem_object.cc
|
|
||||||
mem/packet.cc
|
|
||||||
mem/physical.cc
|
|
||||||
mem/port.cc
|
|
||||||
mem/tport.cc
|
|
||||||
|
|
||||||
mem/cache/base_cache.cc
|
|
||||||
mem/cache/cache.cc
|
|
||||||
mem/cache/coherence/coherence_protocol.cc
|
|
||||||
mem/cache/coherence/uni_coherence.cc
|
|
||||||
mem/cache/miss/blocking_buffer.cc
|
|
||||||
mem/cache/miss/miss_buffer.cc
|
|
||||||
mem/cache/miss/miss_queue.cc
|
|
||||||
mem/cache/miss/mshr.cc
|
|
||||||
mem/cache/miss/mshr_queue.cc
|
|
||||||
mem/cache/prefetch/base_prefetcher.cc
|
|
||||||
mem/cache/prefetch/ghb_prefetcher.cc
|
|
||||||
mem/cache/prefetch/stride_prefetcher.cc
|
|
||||||
mem/cache/prefetch/tagged_prefetcher.cc
|
|
||||||
mem/cache/tags/base_tags.cc
|
|
||||||
mem/cache/tags/fa_lru.cc
|
|
||||||
mem/cache/tags/iic.cc
|
|
||||||
mem/cache/tags/lru.cc
|
|
||||||
mem/cache/tags/repl/gen.cc
|
|
||||||
mem/cache/tags/repl/repl.cc
|
|
||||||
mem/cache/tags/split.cc
|
|
||||||
mem/cache/tags/split_lifo.cc
|
|
||||||
mem/cache/tags/split_lru.cc
|
|
||||||
|
|
||||||
mem/cache/cache_builder.cc
|
|
||||||
|
|
||||||
python/swig/init.cc
|
|
||||||
python/swig/core_wrap.cc
|
|
||||||
python/swig/debug_wrap.cc
|
|
||||||
python/swig/event_wrap.cc
|
|
||||||
python/swig/random_wrap.cc
|
|
||||||
python/swig/sim_object_wrap.cc
|
|
||||||
python/swig/stats_wrap.cc
|
|
||||||
python/swig/trace_wrap.cc
|
|
||||||
python/swig/pyevent.cc
|
|
||||||
python/swig/pyobject.cc
|
|
||||||
|
|
||||||
sim/async.cc
|
|
||||||
sim/builder.cc
|
|
||||||
sim/core.cc
|
|
||||||
sim/debug.cc
|
|
||||||
sim/eventq.cc
|
|
||||||
sim/faults.cc
|
|
||||||
sim/main.cc
|
|
||||||
sim/param.cc
|
|
||||||
sim/root.cc
|
|
||||||
sim/serialize.cc
|
|
||||||
sim/sim_events.cc
|
|
||||||
sim/sim_object.cc
|
|
||||||
sim/simulate.cc
|
|
||||||
sim/startup.cc
|
|
||||||
sim/stat_control.cc
|
|
||||||
sim/system.cc
|
|
||||||
''')
|
|
||||||
|
|
||||||
trace_reader_sources = Split('''
|
|
||||||
cpu/trace/reader/mem_trace_reader.cc
|
|
||||||
cpu/trace/reader/ibm_reader.cc
|
|
||||||
cpu/trace/reader/itx_reader.cc
|
|
||||||
cpu/trace/reader/m5_reader.cc
|
|
||||||
cpu/trace/opt_cpu.cc
|
|
||||||
cpu/trace/trace_cpu.cc
|
|
||||||
''')
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# MySql sources
|
|
||||||
mysql_sources = Split('''
|
|
||||||
base/mysql.cc
|
|
||||||
base/stats/mysql.cc
|
|
||||||
''')
|
|
||||||
|
|
||||||
# Full-system sources
|
|
||||||
full_system_sources = Split('''
|
|
||||||
base/crc.cc
|
|
||||||
base/inet.cc
|
|
||||||
|
|
||||||
cpu/intr_control.cc
|
|
||||||
cpu/profile.cc
|
|
||||||
|
|
||||||
dev/uart.cc
|
|
||||||
dev/uart8250.cc
|
|
||||||
|
|
||||||
mem/vport.cc
|
|
||||||
|
|
||||||
sim/pseudo_inst.cc
|
|
||||||
''')
|
|
||||||
#dev/sinic.cc
|
|
||||||
#dev/i8254xGBe.cc
|
|
||||||
|
|
||||||
if env['TARGET_ISA'] == 'alpha':
|
|
||||||
full_system_sources += Split('''
|
|
||||||
kern/tru64/dump_mbuf.cc
|
|
||||||
kern/tru64/printf.cc
|
|
||||||
kern/tru64/tru64_events.cc
|
|
||||||
kern/tru64/tru64_syscalls.cc
|
|
||||||
''')
|
|
||||||
|
|
||||||
# Syscall emulation (non-full-system) sources
|
|
||||||
syscall_emulation_sources = Split('''
|
|
||||||
mem/translating_port.cc
|
|
||||||
mem/page_table.cc
|
|
||||||
sim/process.cc
|
|
||||||
sim/syscall_emul.cc
|
|
||||||
''')
|
|
||||||
|
|
||||||
#if env['TARGET_ISA'] == 'alpha':
|
|
||||||
# syscall_emulation_sources += Split('''
|
|
||||||
# kern/tru64/tru64.cc
|
|
||||||
# ''')
|
|
||||||
|
|
||||||
memtest_sources = Split('''
|
|
||||||
cpu/memtest/memtest.cc
|
|
||||||
''')
|
|
||||||
|
|
||||||
# Include file paths are rooted in this directory. SCons will
|
# Include file paths are rooted in this directory. SCons will
|
||||||
# automatically expand '.' to refer to both the source directory and
|
# automatically expand '.' to refer to both the source directory and
|
||||||
|
@ -229,52 +61,23 @@ env.Append(CPPPATH=Dir('.'))
|
||||||
# Add a flag defining what THE_ISA should be for all compilation
|
# Add a flag defining what THE_ISA should be for all compilation
|
||||||
env.Append(CPPDEFINES=[('THE_ISA','%s_ISA' % env['TARGET_ISA'].upper())])
|
env.Append(CPPDEFINES=[('THE_ISA','%s_ISA' % env['TARGET_ISA'].upper())])
|
||||||
|
|
||||||
arch_sources = SConscript(os.path.join('arch', 'SConscript'), exports = 'env')
|
# Walk the tree and execute all SConscripts
|
||||||
|
scripts = []
|
||||||
|
srcdir = env['SRCDIR']
|
||||||
|
for root, dirs, files in os.walk(srcdir, topdown=True):
|
||||||
|
if root == srcdir:
|
||||||
|
# we don't want to recurse back into this SConscript
|
||||||
|
continue
|
||||||
|
|
||||||
cpu_sources = SConscript(os.path.join('cpu', 'SConscript'), exports = 'env')
|
if 'SConscript' in files:
|
||||||
|
# strip off the srcdir part since scons will try to find the
|
||||||
if env['FULL_SYSTEM']:
|
# script in the build directory
|
||||||
dev_sources = SConscript(os.path.join('dev', 'SConscript'),
|
base = root[len(srcdir) + 1:]
|
||||||
exports = 'env')
|
SConscript(joinpath(base, 'SConscript'))
|
||||||
full_system_sources += dev_sources
|
|
||||||
|
|
||||||
kern_sources = SConscript(os.path.join('kern', 'SConscript'),
|
|
||||||
exports = 'env')
|
|
||||||
full_system_sources += kern_sources
|
|
||||||
|
|
||||||
# Set up complete list of sources based on configuration.
|
|
||||||
sources = base_sources + arch_sources + cpu_sources
|
|
||||||
|
|
||||||
# encumbered should be last because we're adding to some of the other groups
|
|
||||||
if isfile(joinpath(env['SRCDIR'], 'encumbered/SConscript')):
|
|
||||||
sources += SConscript('encumbered/SConscript', exports = 'env')
|
|
||||||
|
|
||||||
|
|
||||||
if env['FULL_SYSTEM']:
|
|
||||||
sources += full_system_sources
|
|
||||||
else:
|
|
||||||
sources += syscall_emulation_sources
|
|
||||||
|
|
||||||
if env['USE_MYSQL']:
|
|
||||||
sources += mysql_sources
|
|
||||||
|
|
||||||
for opt in env.ExportOptions:
|
for opt in env.ExportOptions:
|
||||||
env.ConfigFile(opt)
|
env.ConfigFile(opt)
|
||||||
|
|
||||||
###################################################
|
|
||||||
#
|
|
||||||
# Special build rules.
|
|
||||||
#
|
|
||||||
###################################################
|
|
||||||
|
|
||||||
# base/traceflags.{cc,hh} are generated from base/traceflags.py.
|
|
||||||
# $TARGET.base will expand to "<build-dir>/base/traceflags".
|
|
||||||
env.Command(Split('base/traceflags.hh base/traceflags.cc'),
|
|
||||||
'base/traceflags.py',
|
|
||||||
'python $SOURCE $TARGET.base')
|
|
||||||
|
|
||||||
SConscript('python/SConscript', exports = ['env'])
|
|
||||||
|
|
||||||
# This function adds the specified sources to the given build
|
# This function adds the specified sources to the given build
|
||||||
# environment, and returns a list of all the corresponding SCons
|
# environment, and returns a list of all the corresponding SCons
|
||||||
# Object nodes (including an extra one for date.cc). We explicitly
|
# Object nodes (including an extra one for date.cc). We explicitly
|
||||||
|
|
|
@ -28,13 +28,9 @@
|
||||||
#
|
#
|
||||||
# Authors: Steve Reinhardt
|
# Authors: Steve Reinhardt
|
||||||
|
|
||||||
import os.path, sys
|
import sys
|
||||||
|
|
||||||
# Import build environment variable from SConstruct.
|
Import('*')
|
||||||
Import('env')
|
|
||||||
|
|
||||||
# Right now there are no source files immediately in this directory
|
|
||||||
sources = []
|
|
||||||
|
|
||||||
#################################################################
|
#################################################################
|
||||||
#
|
#
|
||||||
|
@ -66,7 +62,7 @@ isa_switch_hdrs = Split('''
|
||||||
''')
|
''')
|
||||||
|
|
||||||
# Set up this directory to support switching headers
|
# Set up this directory to support switching headers
|
||||||
env.make_switching_dir('arch', isa_switch_hdrs, env)
|
make_switching_dir('arch', isa_switch_hdrs, env)
|
||||||
|
|
||||||
#################################################################
|
#################################################################
|
||||||
#
|
#
|
||||||
|
@ -100,7 +96,7 @@ execfile(cpu_models_file.srcnode().abspath)
|
||||||
|
|
||||||
# Several files are generated from the ISA description.
|
# Several files are generated from the ISA description.
|
||||||
# We always get the basic decoder and header file.
|
# We always get the basic decoder and header file.
|
||||||
isa_desc_gen_files = Split('decoder.cc decoder.hh')
|
isa_desc_gen_files = [ 'decoder.cc', 'decoder.hh' ]
|
||||||
# We also get an execute file for each selected CPU model.
|
# We also get an execute file for each selected CPU model.
|
||||||
isa_desc_gen_files += [CpuModel.dict[cpu].filename
|
isa_desc_gen_files += [CpuModel.dict[cpu].filename
|
||||||
for cpu in env['CPU_MODELS']]
|
for cpu in env['CPU_MODELS']]
|
||||||
|
@ -128,14 +124,3 @@ else:
|
||||||
emitter = isa_desc_emitter)
|
emitter = isa_desc_emitter)
|
||||||
|
|
||||||
env.Append(BUILDERS = { 'ISADesc' : isa_desc_builder })
|
env.Append(BUILDERS = { 'ISADesc' : isa_desc_builder })
|
||||||
|
|
||||||
#
|
|
||||||
# Now include other ISA-specific sources from the ISA subdirectories.
|
|
||||||
#
|
|
||||||
|
|
||||||
isa = env['TARGET_ISA'] # someday this may be a list of ISAs
|
|
||||||
|
|
||||||
# Let the target architecture define what additional sources it needs
|
|
||||||
sources += SConscript(os.path.join(isa, 'SConscript'), exports = 'env')
|
|
||||||
|
|
||||||
Return('sources')
|
|
||||||
|
|
|
@ -29,76 +29,45 @@
|
||||||
# Authors: Gabe Black
|
# Authors: Gabe Black
|
||||||
# Steve Reinhardt
|
# Steve Reinhardt
|
||||||
|
|
||||||
import os
|
Import('*')
|
||||||
import sys
|
|
||||||
from os.path import isdir
|
|
||||||
|
|
||||||
# This file defines how to build a particular configuration of M5
|
if env['TARGET_ISA'] == 'alpha':
|
||||||
# based on variable settings in the 'env' build environment.
|
Source('faults.cc')
|
||||||
|
Source('floatregfile.cc')
|
||||||
|
Source('intregfile.cc')
|
||||||
|
Source('miscregfile.cc')
|
||||||
|
Source('regfile.cc')
|
||||||
|
Source('remote_gdb.cc')
|
||||||
|
|
||||||
# Import build environment variable from SConstruct.
|
if env['FULL_SYSTEM']:
|
||||||
Import('env')
|
Source('arguments.cc')
|
||||||
|
Source('ev5.cc')
|
||||||
|
Source('idle_event.cc')
|
||||||
|
Source('ipr.cc')
|
||||||
|
Source('kernel_stats.cc')
|
||||||
|
Source('osfpal.cc')
|
||||||
|
Source('pagetable.cc')
|
||||||
|
Source('stacktrace.cc')
|
||||||
|
Source('system.cc')
|
||||||
|
Source('tlb.cc')
|
||||||
|
Source('vtophys.cc')
|
||||||
|
|
||||||
###################################################
|
Source('freebsd/system.cc')
|
||||||
#
|
Source('linux/system.cc')
|
||||||
# Define needed sources.
|
Source('tru64/system.cc')
|
||||||
#
|
|
||||||
###################################################
|
|
||||||
|
|
||||||
# Base sources used by all configurations.
|
else:
|
||||||
base_sources = Split('''
|
Source('process.cc')
|
||||||
faults.cc
|
|
||||||
floatregfile.cc
|
|
||||||
intregfile.cc
|
|
||||||
miscregfile.cc
|
|
||||||
regfile.cc
|
|
||||||
remote_gdb.cc
|
|
||||||
''')
|
|
||||||
|
|
||||||
# Full-system sources
|
Source('linux/linux.cc')
|
||||||
full_system_sources = Split('''
|
Source('linux/process.cc')
|
||||||
arguments.cc
|
|
||||||
ev5.cc
|
|
||||||
freebsd/system.cc
|
|
||||||
idle_event.cc
|
|
||||||
ipr.cc
|
|
||||||
kernel_stats.cc
|
|
||||||
linux/system.cc
|
|
||||||
osfpal.cc
|
|
||||||
pagetable.cc
|
|
||||||
stacktrace.cc
|
|
||||||
system.cc
|
|
||||||
tlb.cc
|
|
||||||
tru64/system.cc
|
|
||||||
vtophys.cc
|
|
||||||
''')
|
|
||||||
|
|
||||||
|
Source('tru64/tru64.cc')
|
||||||
|
Source('tru64/process.cc')
|
||||||
|
|
||||||
# Syscall emulation (non-full-system) sources
|
# Add in files generated by the ISA description.
|
||||||
syscall_emulation_sources = Split('''
|
isa_desc_files = env.ISADesc('isa/main.isa')
|
||||||
linux/linux.cc
|
# Only non-header files need to be compiled.
|
||||||
linux/process.cc
|
for f in isa_desc_files:
|
||||||
tru64/tru64.cc
|
if not f.path.endswith('.hh'):
|
||||||
tru64/process.cc
|
Source(f)
|
||||||
process.cc
|
|
||||||
''')
|
|
||||||
|
|
||||||
# Set up complete list of sources based on configuration.
|
|
||||||
sources = base_sources
|
|
||||||
|
|
||||||
if env['FULL_SYSTEM']:
|
|
||||||
sources += full_system_sources
|
|
||||||
else:
|
|
||||||
sources += syscall_emulation_sources
|
|
||||||
|
|
||||||
# Convert file names to SCons File objects. This takes care of the
|
|
||||||
# path relative to the top of the directory tree.
|
|
||||||
sources = [File(s) for s in sources]
|
|
||||||
|
|
||||||
# Add in files generated by the ISA description.
|
|
||||||
isa_desc_files = env.ISADesc('isa/main.isa')
|
|
||||||
# Only non-header files need to be compiled.
|
|
||||||
isa_desc_sources = [f for f in isa_desc_files if not f.path.endswith('.hh')]
|
|
||||||
sources += isa_desc_sources
|
|
||||||
|
|
||||||
Return('sources')
|
|
||||||
|
|
37
src/arch/alpha/SConsopts
Normal file
37
src/arch/alpha/SConsopts
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
# -*- mode:python -*-
|
||||||
|
|
||||||
|
# Copyright (c) 2004-2005 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: Nathan Binkert
|
||||||
|
|
||||||
|
Import('*')
|
||||||
|
|
||||||
|
all_isa_list.append('alpha')
|
||||||
|
|
||||||
|
# Alpha can be compiled with Turbolaser support instead of Tsunami
|
||||||
|
sticky_opts.Add(BoolOption('ALPHA_TLASER',
|
||||||
|
'Model Alpha TurboLaser platform (vs. Tsunami)', False))
|
|
@ -30,54 +30,25 @@
|
||||||
# Steve Reinhardt
|
# Steve Reinhardt
|
||||||
# Korey Sewell
|
# Korey Sewell
|
||||||
|
|
||||||
import os
|
Import('*')
|
||||||
import sys
|
|
||||||
from os.path import isdir
|
|
||||||
|
|
||||||
# Import build environment variable from SConstruct.
|
if env['TARGET_ISA'] == 'mips':
|
||||||
Import('env')
|
Source('faults.cc')
|
||||||
|
Source('isa_traits.cc')
|
||||||
|
Source('utility.cc')
|
||||||
|
|
||||||
###################################################
|
if env['FULL_SYSTEM']:
|
||||||
#
|
|
||||||
# Define needed sources.
|
|
||||||
#
|
|
||||||
###################################################
|
|
||||||
|
|
||||||
# Base sources used by all configurations.
|
|
||||||
base_sources = Split('''
|
|
||||||
faults.cc
|
|
||||||
isa_traits.cc
|
|
||||||
utility.cc
|
|
||||||
''')
|
|
||||||
|
|
||||||
# Full-system sources
|
|
||||||
full_system_sources = Split('''
|
|
||||||
#Insert Full-System Files Here
|
#Insert Full-System Files Here
|
||||||
''')
|
pass
|
||||||
|
else:
|
||||||
|
Source('process.cc')
|
||||||
|
|
||||||
# Syscall emulation (non-full-system) sources
|
Source('linux/linux.cc')
|
||||||
syscall_emulation_sources = Split('''
|
Source('linux/process.cc')
|
||||||
linux/linux.cc
|
|
||||||
linux/process.cc
|
|
||||||
process.cc
|
|
||||||
''')
|
|
||||||
|
|
||||||
# Set up complete list of sources based on configuration.
|
# Add in files generated by the ISA description.
|
||||||
sources = base_sources
|
isa_desc_files = env.ISADesc('isa/main.isa')
|
||||||
|
# Only non-header files need to be compiled.
|
||||||
if env['FULL_SYSTEM']:
|
for f in isa_desc_files:
|
||||||
sources += full_system_sources
|
if not f.path.endswith('.hh'):
|
||||||
else:
|
Source(f)
|
||||||
sources += syscall_emulation_sources
|
|
||||||
|
|
||||||
# Convert file names to SCons File objects. This takes care of the
|
|
||||||
# path relative to the top of the directory tree.
|
|
||||||
sources = [File(s) for s in sources]
|
|
||||||
|
|
||||||
# Add in files generated by the ISA description.
|
|
||||||
isa_desc_files = env.ISADesc('isa/main.isa')
|
|
||||||
# Only non-header files need to be compiled.
|
|
||||||
isa_desc_sources = [f for f in isa_desc_files if not f.path.endswith('.hh')]
|
|
||||||
sources += isa_desc_sources
|
|
||||||
|
|
||||||
Return('sources')
|
|
||||||
|
|
33
src/arch/mips/SConsopts
Normal file
33
src/arch/mips/SConsopts
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
# -*- mode:python -*-
|
||||||
|
|
||||||
|
# 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: Nathan Binkert
|
||||||
|
|
||||||
|
Import('*')
|
||||||
|
|
||||||
|
all_isa_list.append('mips')
|
|
@ -29,66 +29,38 @@
|
||||||
# Authors: Gabe Black
|
# Authors: Gabe Black
|
||||||
# Steve Reinhardt
|
# Steve Reinhardt
|
||||||
|
|
||||||
import os
|
Import('*')
|
||||||
import sys
|
|
||||||
from os.path import isdir
|
|
||||||
|
|
||||||
# Import build environment variable from SConstruct.
|
if env['TARGET_ISA'] == 'sparc':
|
||||||
Import('env')
|
Source('asi.cc')
|
||||||
|
Source('faults.cc')
|
||||||
|
Source('floatregfile.cc')
|
||||||
|
Source('intregfile.cc')
|
||||||
|
Source('miscregfile.cc')
|
||||||
|
Source('regfile.cc')
|
||||||
|
Source('remote_gdb.cc')
|
||||||
|
|
||||||
###################################################
|
if env['FULL_SYSTEM']:
|
||||||
#
|
Source('arguments.cc')
|
||||||
# Define needed sources.
|
Source('pagetable.cc')
|
||||||
#
|
Source('stacktrace.cc')
|
||||||
###################################################
|
Source('system.cc')
|
||||||
|
Source('tlb.cc')
|
||||||
|
Source('ua2005.cc')
|
||||||
|
Source('vtophys.cc')
|
||||||
|
else:
|
||||||
|
Source('process.cc')
|
||||||
|
|
||||||
# Base sources used by all configurations.
|
Source('linux/linux.cc')
|
||||||
base_sources = Split('''
|
Source('linux/process.cc')
|
||||||
asi.cc
|
Source('linux/syscalls.cc')
|
||||||
faults.cc
|
|
||||||
floatregfile.cc
|
|
||||||
intregfile.cc
|
|
||||||
miscregfile.cc
|
|
||||||
regfile.cc
|
|
||||||
remote_gdb.cc
|
|
||||||
''')
|
|
||||||
|
|
||||||
# Full-system sources
|
Source('solaris/process.cc')
|
||||||
full_system_sources = Split('''
|
Source('solaris/solaris.cc')
|
||||||
arguments.cc
|
|
||||||
pagetable.cc
|
|
||||||
stacktrace.cc
|
|
||||||
system.cc
|
|
||||||
tlb.cc
|
|
||||||
ua2005.cc
|
|
||||||
vtophys.cc
|
|
||||||
''')
|
|
||||||
|
|
||||||
# Syscall emulation (non-full-system) sources
|
# Add in files generated by the ISA description.
|
||||||
syscall_emulation_sources = Split('''
|
isa_desc_files = env.ISADesc('isa/main.isa')
|
||||||
linux/linux.cc
|
# Only non-header files need to be compiled.
|
||||||
linux/process.cc
|
for f in isa_desc_files:
|
||||||
linux/syscalls.cc
|
if not f.path.endswith('.hh'):
|
||||||
process.cc
|
Source(f)
|
||||||
solaris/process.cc
|
|
||||||
solaris/solaris.cc
|
|
||||||
''')
|
|
||||||
|
|
||||||
sources = base_sources
|
|
||||||
|
|
||||||
if env['FULL_SYSTEM']:
|
|
||||||
sources += full_system_sources
|
|
||||||
else:
|
|
||||||
sources += syscall_emulation_sources
|
|
||||||
|
|
||||||
# Convert file names to SCons File objects. This takes care of the
|
|
||||||
# path relative to the top of the directory tree.
|
|
||||||
sources = [File(s) for s in sources]
|
|
||||||
|
|
||||||
# Add in files generated by the ISA description.
|
|
||||||
isa_desc_files = env.ISADesc('isa/main.isa')
|
|
||||||
# Only non-header files need to be compiled.
|
|
||||||
isa_desc_sources = [f for f in isa_desc_files if not f.path.endswith('.hh')]
|
|
||||||
sources += isa_desc_sources
|
|
||||||
|
|
||||||
Return('sources')
|
|
||||||
|
|
33
src/arch/sparc/SConsopts
Normal file
33
src/arch/sparc/SConsopts
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
# -*- mode:python -*-
|
||||||
|
|
||||||
|
# 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: Nathan Binkert
|
||||||
|
|
||||||
|
Import('*')
|
||||||
|
|
||||||
|
all_isa_list.append('sparc')
|
|
@ -83,55 +83,28 @@
|
||||||
#
|
#
|
||||||
# Authors: Gabe Black
|
# Authors: Gabe Black
|
||||||
|
|
||||||
import os
|
Import('*')
|
||||||
import sys
|
|
||||||
from os.path import isdir
|
|
||||||
|
|
||||||
# Import build environment variable from SConstruct.
|
if env['TARGET_ISA'] == 'x86':
|
||||||
Import('env')
|
Source('floatregfile.cc')
|
||||||
|
Source('intregfile.cc')
|
||||||
|
Source('miscregfile.cc')
|
||||||
|
Source('regfile.cc')
|
||||||
|
Source('remote_gdb.cc')
|
||||||
|
|
||||||
###################################################
|
if env['FULL_SYSTEM']:
|
||||||
#
|
# Full-system sources
|
||||||
# Define needed sources.
|
pass
|
||||||
#
|
else:
|
||||||
###################################################
|
Source('process.cc')
|
||||||
|
|
||||||
# Base sources used by all configurations.
|
Source('linux/linux.cc')
|
||||||
base_sources = Split('''
|
Source('linux/process.cc')
|
||||||
floatregfile.cc
|
Source('linux/syscalls.cc')
|
||||||
intregfile.cc
|
|
||||||
miscregfile.cc
|
|
||||||
regfile.cc
|
|
||||||
remote_gdb.cc
|
|
||||||
''')
|
|
||||||
|
|
||||||
# Full-system sources
|
# Add in files generated by the ISA description.
|
||||||
full_system_sources = Split('''
|
isa_desc_files = env.ISADesc('isa/main.isa')
|
||||||
''')
|
# Only non-header files need to be compiled.
|
||||||
|
for f in isa_desc_files:
|
||||||
# Syscall emulation (non-full-system) sources
|
if not f.path.endswith('.hh'):
|
||||||
syscall_emulation_sources = Split('''
|
Source(f)
|
||||||
linux/linux.cc
|
|
||||||
linux/process.cc
|
|
||||||
linux/syscalls.cc
|
|
||||||
process.cc
|
|
||||||
''')
|
|
||||||
|
|
||||||
sources = base_sources
|
|
||||||
|
|
||||||
if env['FULL_SYSTEM']:
|
|
||||||
sources += full_system_sources
|
|
||||||
else:
|
|
||||||
sources += syscall_emulation_sources
|
|
||||||
|
|
||||||
# Convert file names to SCons File objects. This takes care of the
|
|
||||||
# path relative to the top of the directory tree.
|
|
||||||
sources = [File(s) for s in sources]
|
|
||||||
|
|
||||||
# Add in files generated by the ISA description.
|
|
||||||
isa_desc_files = env.ISADesc('isa/main.isa')
|
|
||||||
# Only non-header files need to be compiled.
|
|
||||||
isa_desc_sources = [f for f in isa_desc_files if not f.path.endswith('.hh')]
|
|
||||||
sources += isa_desc_sources
|
|
||||||
|
|
||||||
Return('sources')
|
|
||||||
|
|
60
src/arch/x86/SConsopts
Normal file
60
src/arch/x86/SConsopts
Normal file
|
@ -0,0 +1,60 @@
|
||||||
|
# -*- mode:python -*-
|
||||||
|
|
||||||
|
# Copyright (c) 2007 The Hewlett-Packard Development Company
|
||||||
|
# All rights reserved.
|
||||||
|
#
|
||||||
|
# Redistribution and use of this software in source and binary forms,
|
||||||
|
# with or without modification, are permitted provided that the
|
||||||
|
# following conditions are met:
|
||||||
|
#
|
||||||
|
# The software must be used only for Non-Commercial Use which means any
|
||||||
|
# use which is NOT directed to receiving any direct monetary
|
||||||
|
# compensation for, or commercial advantage from such use. Illustrative
|
||||||
|
# examples of non-commercial use are academic research, personal study,
|
||||||
|
# teaching, education and corporate research & development.
|
||||||
|
# Illustrative examples of commercial use are distributing products for
|
||||||
|
# commercial advantage and providing services using the software for
|
||||||
|
# commercial advantage.
|
||||||
|
#
|
||||||
|
# If you wish to use this software or functionality therein that may be
|
||||||
|
# covered by patents for commercial use, please contact:
|
||||||
|
# Director of Intellectual Property Licensing
|
||||||
|
# Office of Strategy and Technology
|
||||||
|
# Hewlett-Packard Company
|
||||||
|
# 1501 Page Mill Road
|
||||||
|
# Palo Alto, California 94304
|
||||||
|
#
|
||||||
|
# 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 HOLDER(s), HEWLETT-PACKARD COMPANY, nor the names of its
|
||||||
|
# contributors may be used to endorse or promote products derived from
|
||||||
|
# this software without specific prior written permission. No right of
|
||||||
|
# sublicense is granted herewith. Derivatives of the software and
|
||||||
|
# output created using the software may be prepared, but only for
|
||||||
|
# Non-Commercial Uses. Derivatives of the software may be shared with
|
||||||
|
# others provided: (i) the others agree to abide by the list of
|
||||||
|
# conditions herein which includes the Non-Commercial Use restrictions;
|
||||||
|
# and (ii) such Derivatives of the software include the above copyright
|
||||||
|
# notice to acknowledge the contribution from this software where
|
||||||
|
# applicable, this list of conditions and the disclaimer below.
|
||||||
|
#
|
||||||
|
# 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: Gabe Black
|
||||||
|
|
||||||
|
Import('*')
|
||||||
|
|
||||||
|
all_isa_list.append('x86')
|
83
src/base/SConscript
Normal file
83
src/base/SConscript
Normal file
|
@ -0,0 +1,83 @@
|
||||||
|
# -*- mode:python -*-
|
||||||
|
|
||||||
|
# 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: Nathan Binkert
|
||||||
|
|
||||||
|
Import('*')
|
||||||
|
|
||||||
|
# base/traceflags.{cc,hh} are generated from base/traceflags.py.
|
||||||
|
# $TARGET.base will expand to "<build-dir>/base/traceflags".
|
||||||
|
env.Command(['traceflags.hh', 'traceflags.cc'], 'traceflags.py',
|
||||||
|
'python $SOURCE $TARGET.base')
|
||||||
|
|
||||||
|
Source('annotate.cc')
|
||||||
|
Source('bigint.cc')
|
||||||
|
Source('circlebuf.cc')
|
||||||
|
Source('cprintf.cc')
|
||||||
|
Source('crc.cc')
|
||||||
|
Source('fast_alloc.cc')
|
||||||
|
Source('fifo_buffer.cc')
|
||||||
|
Source('hostinfo.cc')
|
||||||
|
Source('hybrid_pred.cc')
|
||||||
|
Source('inet.cc')
|
||||||
|
Source('inifile.cc')
|
||||||
|
Source('intmath.cc')
|
||||||
|
Source('match.cc')
|
||||||
|
Source('misc.cc')
|
||||||
|
Source('output.cc')
|
||||||
|
Source('pollevent.cc')
|
||||||
|
Source('random.cc')
|
||||||
|
Source('range.cc')
|
||||||
|
Source('remote_gdb.cc')
|
||||||
|
Source('sat_counter.cc')
|
||||||
|
Source('socket.cc')
|
||||||
|
Source('statistics.cc')
|
||||||
|
Source('str.cc')
|
||||||
|
Source('time.cc')
|
||||||
|
Source('trace.cc')
|
||||||
|
Source('traceflags.cc')
|
||||||
|
Source('userinfo.cc')
|
||||||
|
|
||||||
|
Source('compression/lzss_compression.cc')
|
||||||
|
|
||||||
|
Source('loader/aout_object.cc')
|
||||||
|
Source('loader/ecoff_object.cc')
|
||||||
|
Source('loader/elf_object.cc')
|
||||||
|
Source('loader/object_file.cc')
|
||||||
|
Source('loader/raw_object.cc')
|
||||||
|
Source('loader/symtab.cc')
|
||||||
|
|
||||||
|
Source('stats/events.cc')
|
||||||
|
Source('stats/output.cc')
|
||||||
|
Source('stats/statdb.cc')
|
||||||
|
Source('stats/text.cc')
|
||||||
|
Source('stats/visit.cc')
|
||||||
|
|
||||||
|
if env['USE_MYSQL']:
|
||||||
|
Source('mysql.cc')
|
||||||
|
Source('stats/mysql.cc')
|
|
@ -28,11 +28,7 @@
|
||||||
#
|
#
|
||||||
# Authors: Steve Reinhardt
|
# Authors: Steve Reinhardt
|
||||||
|
|
||||||
import os
|
Import('*')
|
||||||
import os.path
|
|
||||||
|
|
||||||
# Import build environment variable from SConstruct.
|
|
||||||
Import('env')
|
|
||||||
|
|
||||||
#################################################################
|
#################################################################
|
||||||
#
|
#
|
||||||
|
@ -107,89 +103,24 @@ env.Depends('static_inst_exec_sigs.hh', Value(env['CPU_MODELS']))
|
||||||
# and one of these are not being used.
|
# and one of these are not being used.
|
||||||
CheckerSupportedCPUList = ['O3CPU', 'OzoneCPU']
|
CheckerSupportedCPUList = ['O3CPU', 'OzoneCPU']
|
||||||
|
|
||||||
#################################################################
|
Source('activity.cc')
|
||||||
#
|
Source('base.cc')
|
||||||
# Include CPU-model-specific files based on set of models
|
Source('cpuevent.cc')
|
||||||
# specified in CPU_MODELS build option.
|
Source('exetrace.cc')
|
||||||
#
|
Source('func_unit.cc')
|
||||||
#################################################################
|
Source('op_class.cc')
|
||||||
|
Source('pc_event.cc')
|
||||||
|
Source('quiesce_event.cc')
|
||||||
|
Source('static_inst.cc')
|
||||||
|
Source('simple_thread.cc')
|
||||||
|
Source('thread_state.cc')
|
||||||
|
|
||||||
# Keep a list of CPU models that support SMT
|
if env['FULL_SYSTEM']:
|
||||||
env['SMT_CPU_MODELS'] = []
|
Source('intr_control.cc')
|
||||||
|
Source('profile.cc')
|
||||||
sources = []
|
|
||||||
|
|
||||||
need_simple_base = False
|
|
||||||
if 'AtomicSimpleCPU' in env['CPU_MODELS']:
|
|
||||||
need_simple_base = True
|
|
||||||
sources += Split('simple/atomic.cc')
|
|
||||||
|
|
||||||
if 'TimingSimpleCPU' in env['CPU_MODELS']:
|
|
||||||
need_simple_base = True
|
|
||||||
sources += Split('simple/timing.cc')
|
|
||||||
|
|
||||||
if need_simple_base:
|
|
||||||
sources += Split('simple/base.cc')
|
|
||||||
|
|
||||||
if 'FastCPU' in env['CPU_MODELS']:
|
|
||||||
sources += Split('fast/cpu.cc')
|
|
||||||
|
|
||||||
need_bp_unit = False
|
|
||||||
if 'O3CPU' in env['CPU_MODELS']:
|
|
||||||
need_bp_unit = True
|
|
||||||
sources += SConscript('o3/SConscript', exports = 'env')
|
|
||||||
sources += Split('''
|
|
||||||
o3/base_dyn_inst.cc
|
|
||||||
o3/bpred_unit.cc
|
|
||||||
o3/commit.cc
|
|
||||||
o3/decode.cc
|
|
||||||
o3/fetch.cc
|
|
||||||
o3/free_list.cc
|
|
||||||
o3/fu_pool.cc
|
|
||||||
o3/cpu.cc
|
|
||||||
o3/iew.cc
|
|
||||||
o3/inst_queue.cc
|
|
||||||
o3/lsq_unit.cc
|
|
||||||
o3/lsq.cc
|
|
||||||
o3/mem_dep_unit.cc
|
|
||||||
o3/rename.cc
|
|
||||||
o3/rename_map.cc
|
|
||||||
o3/rob.cc
|
|
||||||
o3/scoreboard.cc
|
|
||||||
o3/store_set.cc
|
|
||||||
''')
|
|
||||||
sources += Split('memtest/memtest.cc')
|
|
||||||
if env['USE_CHECKER']:
|
|
||||||
sources += Split('o3/checker_builder.cc')
|
|
||||||
else:
|
|
||||||
env['SMT_CPU_MODELS'].append('O3CPU') # Checker doesn't support SMT right now
|
|
||||||
|
|
||||||
if 'OzoneCPU' in env['CPU_MODELS']:
|
|
||||||
need_bp_unit = True
|
|
||||||
sources += Split('''
|
|
||||||
ozone/base_dyn_inst.cc
|
|
||||||
ozone/bpred_unit.cc
|
|
||||||
ozone/cpu.cc
|
|
||||||
ozone/cpu_builder.cc
|
|
||||||
ozone/dyn_inst.cc
|
|
||||||
ozone/front_end.cc
|
|
||||||
ozone/lw_back_end.cc
|
|
||||||
ozone/lw_lsq.cc
|
|
||||||
ozone/rename_table.cc
|
|
||||||
''')
|
|
||||||
if env['USE_CHECKER']:
|
|
||||||
sources += Split('ozone/checker_builder.cc')
|
|
||||||
|
|
||||||
if need_bp_unit:
|
|
||||||
sources += Split('''
|
|
||||||
o3/2bit_local_pred.cc
|
|
||||||
o3/btb.cc
|
|
||||||
o3/ras.cc
|
|
||||||
o3/tournament_pred.cc
|
|
||||||
''')
|
|
||||||
|
|
||||||
if env['USE_CHECKER']:
|
if env['USE_CHECKER']:
|
||||||
sources += Split('checker/cpu.cc')
|
Source('checker/cpu.cc')
|
||||||
checker_supports = False
|
checker_supports = False
|
||||||
for i in CheckerSupportedCPUList:
|
for i in CheckerSupportedCPUList:
|
||||||
if i in env['CPU_MODELS']:
|
if i in env['CPU_MODELS']:
|
||||||
|
@ -200,14 +131,3 @@ if env['USE_CHECKER']:
|
||||||
print i,
|
print i,
|
||||||
print ", please set USE_CHECKER=False or use one of those CPU models"
|
print ", please set USE_CHECKER=False or use one of those CPU models"
|
||||||
Exit(1)
|
Exit(1)
|
||||||
|
|
||||||
|
|
||||||
# FullCPU sources are included from src/SConscript since they're not
|
|
||||||
# below this point in the file hierarchy.
|
|
||||||
|
|
||||||
# Convert file names to SCons File objects. This takes care of the
|
|
||||||
# path relative to the top of the directory tree.
|
|
||||||
sources = [File(s) for s in sources]
|
|
||||||
|
|
||||||
Return('sources')
|
|
||||||
|
|
||||||
|
|
34
src/cpu/memtest/SConscript
Normal file
34
src/cpu/memtest/SConscript
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
# -*- mode:python -*-
|
||||||
|
|
||||||
|
# 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: Nathan Binkert
|
||||||
|
|
||||||
|
Import('*')
|
||||||
|
|
||||||
|
if 'O3CPU' in env['CPU_MODELS']:
|
||||||
|
Source('memtest.cc')
|
|
@ -26,52 +26,56 @@
|
||||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#
|
#
|
||||||
# Authors: Korey Sewell
|
# Authors: Nathan Binkert
|
||||||
|
|
||||||
import os
|
|
||||||
import os.path
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
# Import build environment variable from SConstruct.
|
Import('*')
|
||||||
Import('env')
|
|
||||||
|
|
||||||
|
if 'O3CPU' in env['CPU_MODELS']:
|
||||||
|
Source('base_dyn_inst.cc')
|
||||||
|
Source('bpred_unit.cc')
|
||||||
|
Source('commit.cc')
|
||||||
|
Source('cpu.cc')
|
||||||
|
Source('decode.cc')
|
||||||
|
Source('fetch.cc')
|
||||||
|
Source('free_list.cc')
|
||||||
|
Source('fu_pool.cc')
|
||||||
|
Source('iew.cc')
|
||||||
|
Source('inst_queue.cc')
|
||||||
|
Source('lsq.cc')
|
||||||
|
Source('lsq_unit.cc')
|
||||||
|
Source('mem_dep_unit.cc')
|
||||||
|
Source('rename.cc')
|
||||||
|
Source('rename_map.cc')
|
||||||
|
Source('rob.cc')
|
||||||
|
Source('scoreboard.cc')
|
||||||
|
Source('store_set.cc')
|
||||||
|
|
||||||
#################################################################
|
if env['TARGET_ISA'] == 'alpha':
|
||||||
#
|
Source('alpha/cpu.cc')
|
||||||
# Include ISA-specific files for the O3 CPU-model
|
Source('alpha/cpu_builder.cc')
|
||||||
#
|
Source('alpha/dyn_inst.cc')
|
||||||
#################################################################
|
Source('alpha/thread_context.cc')
|
||||||
|
elif env['TARGET_ISA'] == 'mips':
|
||||||
sources = []
|
Source('mips/cpu.cc')
|
||||||
|
Source('mips/cpu_builder.cc')
|
||||||
if env['TARGET_ISA'] == 'alpha':
|
Source('mips/dyn_inst.cc')
|
||||||
sources += Split('''
|
Source('mips/thread_context.cc')
|
||||||
alpha/dyn_inst.cc
|
elif env['TARGET_ISA'] == 'sparc':
|
||||||
alpha/cpu.cc
|
Source('sparc/cpu.cc')
|
||||||
alpha/thread_context.cc
|
Source('sparc/cpu_builder.cc')
|
||||||
alpha/cpu_builder.cc
|
Source('sparc/dyn_inst.cc')
|
||||||
''')
|
Source('sparc/thread_context.cc')
|
||||||
elif env['TARGET_ISA'] == 'mips':
|
else:
|
||||||
sources += Split('''
|
|
||||||
mips/dyn_inst.cc
|
|
||||||
mips/cpu.cc
|
|
||||||
mips/thread_context.cc
|
|
||||||
mips/cpu_builder.cc
|
|
||||||
''')
|
|
||||||
elif env['TARGET_ISA'] == 'sparc':
|
|
||||||
sources += Split('''
|
|
||||||
sparc/dyn_inst.cc
|
|
||||||
sparc/cpu.cc
|
|
||||||
sparc/thread_context.cc
|
|
||||||
sparc/cpu_builder.cc
|
|
||||||
''')
|
|
||||||
else:
|
|
||||||
sys.exit('O3 CPU does not support the \'%s\' ISA' % env['TARGET_ISA'])
|
sys.exit('O3 CPU does not support the \'%s\' ISA' % env['TARGET_ISA'])
|
||||||
|
|
||||||
|
if env['USE_CHECKER']:
|
||||||
|
Source('checker_builder.cc')
|
||||||
|
|
||||||
# Convert file names to SCons File objects. This takes care of the
|
if 'O3CPU' in env['CPU_MODELS'] or 'OzoneCPU' in env['CPU_MODELS']:
|
||||||
# path relative to the top of the directory tree.
|
Source('2bit_local_pred.cc')
|
||||||
sources = [File(s) for s in sources]
|
Source('btb.cc')
|
||||||
|
Source('ras.cc')
|
||||||
Return('sources')
|
Source('tournament_pred.cc')
|
||||||
|
|
||||||
|
|
34
src/cpu/o3/SConsopts
Normal file
34
src/cpu/o3/SConsopts
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
# -*- mode:python -*-
|
||||||
|
|
||||||
|
# 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: Nathan Binkert
|
||||||
|
|
||||||
|
Import('*')
|
||||||
|
|
||||||
|
all_cpu_list.append('O3CPU')
|
||||||
|
default_cpus.append('O3CPU')
|
45
src/cpu/ozone/SConscript
Normal file
45
src/cpu/ozone/SConscript
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
# -*- mode:python -*-
|
||||||
|
|
||||||
|
# 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: Nathan Binkert
|
||||||
|
|
||||||
|
Import('*')
|
||||||
|
|
||||||
|
if 'OzoneCPU' in env['CPU_MODELS']:
|
||||||
|
need_bp_unit = True
|
||||||
|
Source('base_dyn_inst.cc')
|
||||||
|
Source('bpred_unit.cc')
|
||||||
|
Source('cpu.cc')
|
||||||
|
Source('cpu_builder.cc')
|
||||||
|
Source('dyn_inst.cc')
|
||||||
|
Source('front_end.cc')
|
||||||
|
Source('lw_back_end.cc')
|
||||||
|
Source('lw_lsq.cc')
|
||||||
|
Source('rename_table.cc')
|
||||||
|
if env['USE_CHECKER']:
|
||||||
|
Source('checker_builder.cc')
|
33
src/cpu/ozone/SConsopts
Normal file
33
src/cpu/ozone/SConsopts
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
# -*- mode:python -*-
|
||||||
|
|
||||||
|
# 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: Nathan Binkert
|
||||||
|
|
||||||
|
Import('*')
|
||||||
|
|
||||||
|
all_cpu_list.append('OzoneCPU')
|
43
src/cpu/simple/SConscript
Normal file
43
src/cpu/simple/SConscript
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
# -*- mode:python -*-
|
||||||
|
|
||||||
|
# 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: Nathan Binkert
|
||||||
|
|
||||||
|
Import('*')
|
||||||
|
|
||||||
|
need_simple_base = False
|
||||||
|
if 'AtomicSimpleCPU' in env['CPU_MODELS']:
|
||||||
|
need_simple_base = True
|
||||||
|
Source('atomic.cc')
|
||||||
|
|
||||||
|
if 'TimingSimpleCPU' in env['CPU_MODELS']:
|
||||||
|
need_simple_base = True
|
||||||
|
Source('timing.cc')
|
||||||
|
|
||||||
|
if need_simple_base:
|
||||||
|
Source('base.cc')
|
34
src/cpu/simple/SConsopts
Normal file
34
src/cpu/simple/SConsopts
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
# -*- mode:python -*-
|
||||||
|
|
||||||
|
# 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: Nathan Binkert
|
||||||
|
|
||||||
|
Import('*')
|
||||||
|
|
||||||
|
all_cpu_list.extend(('AtomicSimpleCPU', 'TimingSimpleCPU'))
|
||||||
|
default_cpus.extend(('AtomicSimpleCPU', 'TimingSimpleCPU'))
|
40
src/cpu/trace/SConscript
Normal file
40
src/cpu/trace/SConscript
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
# -*- mode:python -*-
|
||||||
|
|
||||||
|
# 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: Nathan Binkert
|
||||||
|
|
||||||
|
Import('*')
|
||||||
|
|
||||||
|
if False:
|
||||||
|
Source('opt_cpu.cc')
|
||||||
|
Source('trace_cpu.cc')
|
||||||
|
|
||||||
|
Source('reader/mem_trace_reader.cc')
|
||||||
|
Source('reader/ibm_reader.cc')
|
||||||
|
Source('reader/itx_reader.cc')
|
||||||
|
Source('reader/m5_reader.cc')
|
|
@ -29,51 +29,29 @@
|
||||||
# Authors: Steve Reinhardt
|
# Authors: Steve Reinhardt
|
||||||
# Gabe Black
|
# Gabe Black
|
||||||
|
|
||||||
import os.path, sys
|
Import('*')
|
||||||
|
|
||||||
# Import build environment variable from SConstruct.
|
if env['FULL_SYSTEM']:
|
||||||
Import('env')
|
Source('baddev.cc')
|
||||||
|
Source('disk_image.cc')
|
||||||
# Right now there are no source files immediately in this directory
|
Source('etherbus.cc')
|
||||||
sources = []
|
Source('etherdump.cc')
|
||||||
|
Source('etherint.cc')
|
||||||
#
|
Source('etherlink.cc')
|
||||||
# Now include other ISA-specific sources from the ISA subdirectories.
|
Source('etherpkt.cc')
|
||||||
#
|
Source('ethertap.cc')
|
||||||
|
#Source('i8254xGBe.cc')
|
||||||
isa = env['TARGET_ISA'] # someday this may be a list of ISAs
|
Source('ide_ctrl.cc')
|
||||||
|
Source('ide_disk.cc')
|
||||||
#
|
Source('io_device.cc')
|
||||||
# These source files can be used by any architecture
|
Source('isa_fake.cc')
|
||||||
#
|
Source('ns_gige.cc')
|
||||||
|
Source('pciconfigall.cc')
|
||||||
sources += Split('''
|
Source('pcidev.cc')
|
||||||
baddev.cc
|
Source('pktfifo.cc')
|
||||||
disk_image.cc
|
Source('platform.cc')
|
||||||
etherbus.cc
|
Source('simconsole.cc')
|
||||||
etherdump.cc
|
Source('simple_disk.cc')
|
||||||
etherint.cc
|
#Source('sinic.cc')
|
||||||
etherlink.cc
|
Source('uart.cc')
|
||||||
etherpkt.cc
|
Source('uart8250.cc')
|
||||||
ethertap.cc
|
|
||||||
ide_ctrl.cc
|
|
||||||
ide_disk.cc
|
|
||||||
io_device.cc
|
|
||||||
isa_fake.cc
|
|
||||||
ns_gige.cc
|
|
||||||
pciconfigall.cc
|
|
||||||
pcidev.cc
|
|
||||||
pktfifo.cc
|
|
||||||
platform.cc
|
|
||||||
simconsole.cc
|
|
||||||
simple_disk.cc
|
|
||||||
''')
|
|
||||||
|
|
||||||
# Let the target architecture define what additional sources it needs
|
|
||||||
sources += SConscript(os.path.join(isa, 'SConscript'), exports = 'env')
|
|
||||||
|
|
||||||
# Convert file names to SCons File objects. This takes care of the
|
|
||||||
# path relative to the top of the directory tree.
|
|
||||||
sources = [File(s) for s in sources]
|
|
||||||
|
|
||||||
Return('sources')
|
|
||||||
|
|
|
@ -29,40 +29,11 @@
|
||||||
# Authors: Steve Reinhardt
|
# Authors: Steve Reinhardt
|
||||||
# Gabe Black
|
# Gabe Black
|
||||||
|
|
||||||
import os.path, sys
|
Import('*')
|
||||||
|
|
||||||
# Import build environment variable from SConstruct.
|
if env['FULL_SYSTEM'] and env['TARGET_ISA'] == 'alpha':
|
||||||
Import('env')
|
Source('console.cc')
|
||||||
|
Source('tsunami.cc')
|
||||||
sources = Split('''
|
Source('tsunami_cchip.cc')
|
||||||
console.cc
|
Source('tsunami_io.cc')
|
||||||
tsunami.cc
|
Source('tsunami_pchip.cc')
|
||||||
tsunami_cchip.cc
|
|
||||||
tsunami_io.cc
|
|
||||||
tsunami_pchip.cc
|
|
||||||
''')
|
|
||||||
# baddev.cc
|
|
||||||
# disk_image.cc
|
|
||||||
# etherbus.cc
|
|
||||||
# etherdump.cc
|
|
||||||
# etherint.cc
|
|
||||||
# etherlink.cc
|
|
||||||
# etherpkt.cc
|
|
||||||
# ethertap.cc
|
|
||||||
# ide_ctrl.cc
|
|
||||||
# ide_disk.cc
|
|
||||||
# io_device.cc
|
|
||||||
# isa_fake.cc
|
|
||||||
# ns_gige.cc
|
|
||||||
# pciconfigall.cc
|
|
||||||
# pcidev.cc
|
|
||||||
# pktfifo.cc
|
|
||||||
# platform.cc
|
|
||||||
# simconsole.cc
|
|
||||||
# simple_disk.cc
|
|
||||||
|
|
||||||
# Convert file names to SCons File objects. This takes care of the
|
|
||||||
# path relative to the top of the directory tree.
|
|
||||||
sources = [File(s) for s in sources]
|
|
||||||
|
|
||||||
Return('sources')
|
|
||||||
|
|
|
@ -29,22 +29,10 @@
|
||||||
# Authors: Steve Reinhardt
|
# Authors: Steve Reinhardt
|
||||||
# Gabe Black
|
# Gabe Black
|
||||||
|
|
||||||
import os.path, sys
|
Import('*')
|
||||||
|
|
||||||
# Import build environment variable from SConstruct.
|
if env['FULL_SYSTEM'] and env['TARGET_ISA'] == 'sparc':
|
||||||
Import('env')
|
Source('dtod.cc')
|
||||||
|
Source('iob.cc')
|
||||||
sources = []
|
Source('t1000.cc')
|
||||||
|
Source('mm_disk.cc')
|
||||||
sources += Split('''
|
|
||||||
dtod.cc
|
|
||||||
iob.cc
|
|
||||||
t1000.cc
|
|
||||||
mm_disk.cc
|
|
||||||
''')
|
|
||||||
|
|
||||||
# Convert file names to SCons File objects. This takes care of the
|
|
||||||
# path relative to the top of the directory tree.
|
|
||||||
sources = [File(s) for s in sources]
|
|
||||||
|
|
||||||
Return('sources')
|
|
||||||
|
|
|
@ -28,21 +28,18 @@
|
||||||
#
|
#
|
||||||
# Authors: Steve Reinhardt
|
# Authors: Steve Reinhardt
|
||||||
|
|
||||||
import os.path, sys
|
Import('*')
|
||||||
|
|
||||||
# Import build environment variable from SConstruct.
|
if env['FULL_SYSTEM']:
|
||||||
Import('env')
|
Source('kernel_stats.cc')
|
||||||
|
Source('system_events.cc')
|
||||||
|
|
||||||
sources = Split('''
|
Source('linux/events.cc')
|
||||||
kernel_stats.cc
|
Source('linux/linux_syscalls.cc')
|
||||||
system_events.cc
|
Source('linux/printk.cc')
|
||||||
linux/events.cc
|
|
||||||
linux/linux_syscalls.cc
|
|
||||||
linux/printk.cc
|
|
||||||
''')
|
|
||||||
|
|
||||||
# Convert file names to SCons File objects. This takes care of the
|
if env['TARGET_ISA'] == 'alpha':
|
||||||
# path relative to the top of the directory tree.
|
Source('tru64/dump_mbuf.cc')
|
||||||
sources = [File(s) for s in sources]
|
Source('tru64/printf.cc')
|
||||||
|
Source('tru64/tru64_events.cc')
|
||||||
Return('sources')
|
Source('tru64/tru64_syscalls.cc')
|
||||||
|
|
46
src/mem/SConscript
Normal file
46
src/mem/SConscript
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
# -*- mode:python -*-
|
||||||
|
|
||||||
|
# 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: Nathan Binkert
|
||||||
|
|
||||||
|
Import('*')
|
||||||
|
|
||||||
|
Source('bridge.cc')
|
||||||
|
Source('bus.cc')
|
||||||
|
Source('dram.cc')
|
||||||
|
Source('mem_object.cc')
|
||||||
|
Source('packet.cc')
|
||||||
|
Source('physical.cc')
|
||||||
|
Source('port.cc')
|
||||||
|
Source('tport.cc')
|
||||||
|
|
||||||
|
if env['FULL_SYSTEM']:
|
||||||
|
Source('vport.cc')
|
||||||
|
else:
|
||||||
|
Source('page_table.cc')
|
||||||
|
Source('translating_port.cc')
|
35
src/mem/cache/SConscript
vendored
Normal file
35
src/mem/cache/SConscript
vendored
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
# -*- mode:python -*-
|
||||||
|
|
||||||
|
# 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: Nathan Binkert
|
||||||
|
|
||||||
|
Import('*')
|
||||||
|
|
||||||
|
Source('base_cache.cc')
|
||||||
|
Source('cache.cc')
|
||||||
|
Source('cache_builder.cc')
|
35
src/mem/cache/coherence/SConscript
vendored
Normal file
35
src/mem/cache/coherence/SConscript
vendored
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
# -*- mode:python -*-
|
||||||
|
|
||||||
|
# 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: Nathan Binkert
|
||||||
|
|
||||||
|
Import('*')
|
||||||
|
|
||||||
|
Source('coherence_protocol.cc')
|
||||||
|
Source('uni_coherence.cc')
|
||||||
|
|
37
src/mem/cache/miss/SConscript
vendored
Normal file
37
src/mem/cache/miss/SConscript
vendored
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
# -*- mode:python -*-
|
||||||
|
|
||||||
|
# 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: Nathan Binkert
|
||||||
|
|
||||||
|
Import('*')
|
||||||
|
|
||||||
|
Source('blocking_buffer.cc')
|
||||||
|
Source('miss_buffer.cc')
|
||||||
|
Source('miss_queue.cc')
|
||||||
|
Source('mshr.cc')
|
||||||
|
Source('mshr_queue.cc')
|
37
src/mem/cache/prefetch/SConscript
vendored
Normal file
37
src/mem/cache/prefetch/SConscript
vendored
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
# -*- mode:python -*-
|
||||||
|
|
||||||
|
# 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: Nathan Binkert
|
||||||
|
|
||||||
|
Import('*')
|
||||||
|
|
||||||
|
Source('base_prefetcher.cc')
|
||||||
|
Source('ghb_prefetcher.cc')
|
||||||
|
Source('stride_prefetcher.cc')
|
||||||
|
Source('tagged_prefetcher.cc')
|
||||||
|
|
42
src/mem/cache/tags/SConscript
vendored
Normal file
42
src/mem/cache/tags/SConscript
vendored
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
# -*- mode:python -*-
|
||||||
|
|
||||||
|
# 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: Nathan Binkert
|
||||||
|
|
||||||
|
Import('*')
|
||||||
|
|
||||||
|
Source('base_tags.cc')
|
||||||
|
Source('fa_lru.cc')
|
||||||
|
Source('iic.cc')
|
||||||
|
Source('lru.cc')
|
||||||
|
Source('split.cc')
|
||||||
|
Source('split_lifo.cc')
|
||||||
|
Source('split_lru.cc')
|
||||||
|
|
||||||
|
Source('repl/gen.cc')
|
||||||
|
Source('repl/repl.cc')
|
|
@ -29,14 +29,14 @@
|
||||||
# Authors: Steve Reinhardt
|
# Authors: Steve Reinhardt
|
||||||
# Nathan Binkert
|
# Nathan Binkert
|
||||||
|
|
||||||
import os, os.path, re, sys
|
import os
|
||||||
from zipfile import PyZipFile
|
import zipfile
|
||||||
|
|
||||||
# handy function for path joins
|
# handy function for path joins
|
||||||
def join(*args):
|
def join(*args):
|
||||||
return os.path.normpath(os.path.join(*args))
|
return os.path.normpath(os.path.join(*args))
|
||||||
|
|
||||||
Import('env')
|
Import('*')
|
||||||
|
|
||||||
# This SConscript is in charge of collecting .py files and generating
|
# This SConscript is in charge of collecting .py files and generating
|
||||||
# a zip archive that is appended to the m5 binary.
|
# a zip archive that is appended to the m5 binary.
|
||||||
|
@ -106,6 +106,11 @@ def swig_it(module):
|
||||||
'$SWIG $SWIGFLAGS -outdir ${TARGETS[1].dir} '
|
'$SWIG $SWIGFLAGS -outdir ${TARGETS[1].dir} '
|
||||||
'-o ${TARGETS[0]} $SOURCES')
|
'-o ${TARGETS[0]} $SOURCES')
|
||||||
swig_modules.append(module)
|
swig_modules.append(module)
|
||||||
|
Source('swig/%s_wrap.cc' % module)
|
||||||
|
|
||||||
|
Source('swig/init.cc')
|
||||||
|
Source('swig/pyevent.cc')
|
||||||
|
Source('swig/pyobject.cc')
|
||||||
|
|
||||||
swig_it('core')
|
swig_it('core')
|
||||||
swig_it('debug')
|
swig_it('debug')
|
||||||
|
@ -144,7 +149,7 @@ env.Command('swig/init.cc', swig_cc_files, MakeSwigInit)
|
||||||
# Action function to build the zip archive. Uses the PyZipFile module
|
# Action function to build the zip archive. Uses the PyZipFile module
|
||||||
# included in the standard Python library.
|
# included in the standard Python library.
|
||||||
def buildPyZip(target, source, env):
|
def buildPyZip(target, source, env):
|
||||||
pzf = PyZipFile(str(target[0]), 'w')
|
pzf = zipfile.PyZipFile(str(target[0]), 'w')
|
||||||
for s in source:
|
for s in source:
|
||||||
pzf.writepy(str(s))
|
pzf.writepy(str(s))
|
||||||
|
|
||||||
|
|
54
src/sim/SConscript
Normal file
54
src/sim/SConscript
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
# -*- mode:python -*-
|
||||||
|
|
||||||
|
# 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: Nathan Binkert
|
||||||
|
|
||||||
|
Import('*')
|
||||||
|
|
||||||
|
Source('async.cc')
|
||||||
|
Source('builder.cc')
|
||||||
|
Source('core.cc')
|
||||||
|
Source('debug.cc')
|
||||||
|
Source('eventq.cc')
|
||||||
|
Source('faults.cc')
|
||||||
|
Source('main.cc')
|
||||||
|
Source('param.cc')
|
||||||
|
Source('root.cc')
|
||||||
|
Source('serialize.cc')
|
||||||
|
Source('sim_events.cc')
|
||||||
|
Source('sim_object.cc')
|
||||||
|
Source('simulate.cc')
|
||||||
|
Source('startup.cc')
|
||||||
|
Source('stat_control.cc')
|
||||||
|
Source('system.cc')
|
||||||
|
|
||||||
|
if env['FULL_SYSTEM']:
|
||||||
|
Source('pseudo_inst.cc')
|
||||||
|
else:
|
||||||
|
Source('process.cc')
|
||||||
|
Source('syscall_emul.cc')
|
Loading…
Reference in a new issue