summaryrefslogtreecommitdiff
path: root/arch/SConscript
diff options
context:
space:
mode:
Diffstat (limited to 'arch/SConscript')
-rw-r--r--arch/SConscript25
1 files changed, 13 insertions, 12 deletions
diff --git a/arch/SConscript b/arch/SConscript
index 51f6cc023..d237b0b1f 100644
--- a/arch/SConscript
+++ b/arch/SConscript
@@ -108,26 +108,27 @@ env.Append(SCANNERS = iscan)
# output from the ISA description (*.isa) files.
#
-# several files are generated from the ISA description
-isa_desc_gen_files = Split('''
- decoder.cc
- alpha_o3_exec.cc
- fast_cpu_exec.cc
- simple_cpu_exec.cc
- full_cpu_exec.cc
- decoder.hh
- ''')
-
# Convert to File node to fix path
isa_parser = File('isa_parser.py')
+cpu_models_file = File('#m5/cpu/cpu_models.py')
+
+# This sucks in the defintions of the CpuModel objects.
+execfile(cpu_models_file.srcnode().abspath)
+
+# Several files are generated from the ISA description.
+# We always get the basic decoder and header file.
+isa_desc_gen_files = Split('decoder.cc decoder.hh')
+# We also get an execute file for each selected CPU model.
+isa_desc_gen_files += [CpuModel.dict[cpu].filename
+ for cpu in env['CPU_MODELS']]
# The emitter patches up the sources & targets to include the
# autogenerated files as targets and isa parser itself as a source.
def isa_desc_emitter(target, source, env):
- return (isa_desc_gen_files, [isa_parser] + source)
+ return (isa_desc_gen_files, [isa_parser, cpu_models_file] + source)
# Pieces are in place, so create the builder.
-isa_desc_builder = Builder(action='${SOURCES[0]} ${SOURCES[1]} $TARGET.dir',
+isa_desc_builder = Builder(action='$SOURCES $TARGET.dir $CPU_MODELS',
source_scanner = iscan,
emitter = isa_desc_emitter)