changeset 353abb676fa2 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=353abb676fa2
description:
        Scons: Drop RUBY as compile time option.
        This patch drops RUBY as a compile time option. Instead the PROTOCOL 
option
        is used to figure out whether or not to build Ruby. If the specified 
protocol
        is 'None', then Ruby is not compiled.

diffstat:

 SConstruct                              |   6 +++++-
 build_opts/ALPHA_SE_MESI_CMP_directory  |   1 -
 build_opts/ALPHA_SE_MOESI_CMP_directory |   1 -
 build_opts/ALPHA_SE_MOESI_CMP_token     |   1 -
 build_opts/ALPHA_SE_MOESI_hammer        |   1 -
 build_opts/ALPHA_SE_Network_test        |   1 -
 configs/example/se.py                   |   9 ++++-----
 src/mem/protocol/SConsopts              |  13 ++-----------
 tests/SConscript                        |  10 ----------
 9 files changed, 11 insertions(+), 32 deletions(-)

diffs (134 lines):

diff -r 818aea9960f5 -r 353abb676fa2 SConstruct
--- a/SConstruct        Sun Jul 31 19:21:17 2011 -0700
+++ b/SConstruct        Tue Aug 02 00:10:08 2011 -0500
@@ -810,7 +810,6 @@
     BoolVariable('USE_FENV', 'Use <fenv.h> IEEE mode control', have_fenv),
     BoolVariable('USE_CHECKER', 'Use checker for detailed CPU models', False),
     BoolVariable('CP_ANNOTATE', 'Enable critical path annotation capability', 
False),
-    BoolVariable('RUBY', 'Build with Ruby', False),
     )
 
 # These variables get exported to #defines in config/*.hh (see src/SConscript).
@@ -985,6 +984,11 @@
     if env['USE_SSE2']:
         env.Append(CCFLAGS=['-msse2'])
 
+    if env['PROTOCOL'] != 'None':
+        env['RUBY'] = True
+    else:
+        env['RUBY'] = False
+
     # The src/SConscript file sets up the build rules in 'env' according
     # to the configured variables.  It returns a list of environments,
     # one for each variant build (debug, opt, etc.)
diff -r 818aea9960f5 -r 353abb676fa2 build_opts/ALPHA_SE_MESI_CMP_directory
--- a/build_opts/ALPHA_SE_MESI_CMP_directory    Sun Jul 31 19:21:17 2011 -0700
+++ b/build_opts/ALPHA_SE_MESI_CMP_directory    Tue Aug 02 00:10:08 2011 -0500
@@ -2,4 +2,3 @@
 SS_COMPATIBLE_FP = 1
 CPU_MODELS = 'AtomicSimpleCPU,TimingSimpleCPU,O3CPU,InOrderCPU'
 PROTOCOL = 'MESI_CMP_directory'
-RUBY = True
diff -r 818aea9960f5 -r 353abb676fa2 build_opts/ALPHA_SE_MOESI_CMP_directory
--- a/build_opts/ALPHA_SE_MOESI_CMP_directory   Sun Jul 31 19:21:17 2011 -0700
+++ b/build_opts/ALPHA_SE_MOESI_CMP_directory   Tue Aug 02 00:10:08 2011 -0500
@@ -2,4 +2,3 @@
 SS_COMPATIBLE_FP = 1
 CPU_MODELS = 'AtomicSimpleCPU,TimingSimpleCPU,O3CPU,InOrderCPU'
 PROTOCOL = 'MOESI_CMP_directory'
-RUBY = True
diff -r 818aea9960f5 -r 353abb676fa2 build_opts/ALPHA_SE_MOESI_CMP_token
--- a/build_opts/ALPHA_SE_MOESI_CMP_token       Sun Jul 31 19:21:17 2011 -0700
+++ b/build_opts/ALPHA_SE_MOESI_CMP_token       Tue Aug 02 00:10:08 2011 -0500
@@ -2,4 +2,3 @@
 SS_COMPATIBLE_FP = 1
 CPU_MODELS = 'AtomicSimpleCPU,TimingSimpleCPU,O3CPU,InOrderCPU'
 PROTOCOL = 'MOESI_CMP_token'
-RUBY = True
diff -r 818aea9960f5 -r 353abb676fa2 build_opts/ALPHA_SE_MOESI_hammer
--- a/build_opts/ALPHA_SE_MOESI_hammer  Sun Jul 31 19:21:17 2011 -0700
+++ b/build_opts/ALPHA_SE_MOESI_hammer  Tue Aug 02 00:10:08 2011 -0500
@@ -2,4 +2,3 @@
 SS_COMPATIBLE_FP = 1
 CPU_MODELS = 'AtomicSimpleCPU,TimingSimpleCPU,O3CPU,InOrderCPU'
 PROTOCOL = 'MOESI_hammer'
-RUBY = True
diff -r 818aea9960f5 -r 353abb676fa2 build_opts/ALPHA_SE_Network_test
--- a/build_opts/ALPHA_SE_Network_test  Sun Jul 31 19:21:17 2011 -0700
+++ b/build_opts/ALPHA_SE_Network_test  Tue Aug 02 00:10:08 2011 -0500
@@ -2,4 +2,3 @@
 SS_COMPATIBLE_FP = 1
 CPU_MODELS = 'AtomicSimpleCPU,TimingSimpleCPU,O3CPU,InOrderCPU'
 PROTOCOL = 'Network_test'
-RUBY = True
diff -r 818aea9960f5 -r 353abb676fa2 configs/example/se.py
--- a/configs/example/se.py     Sun Jul 31 19:21:17 2011 -0700
+++ b/configs/example/se.py     Tue Aug 02 00:10:08 2011 -0500
@@ -71,13 +71,12 @@
 parser.add_option("--output", default="", help="Redirect stdout to a file.")
 parser.add_option("--errout", default="", help="Redirect stderr to a file.")
 
-if 'PROTOCOL' in buildEnv:
-    parser.add_option("--ruby", action="store_true")
-
 execfile(os.path.join(config_root, "common", "Options.py"))
 
-if '--ruby' in sys.argv:
-    Ruby.define_options(parser)
+if buildEnv['PROTOCOL'] != 'None':
+    parser.add_option("--ruby", action="store_true")
+    if '--ruby' in sys.argv:
+        Ruby.define_options(parser)
 
 (options, args) = parser.parse_args()
 
diff -r 818aea9960f5 -r 353abb676fa2 src/mem/protocol/SConsopts
--- a/src/mem/protocol/SConsopts        Sun Jul 31 19:21:17 2011 -0700
+++ b/src/mem/protocol/SConsopts        Tue Aug 02 00:10:08 2011 -0500
@@ -34,24 +34,15 @@
 
 all_protocols = [
     'MESI_CMP_directory',
-    'MESI_SCMP_bankdirectory',
-    'MESI_SCMP_bankdirectory_m',
     'MI_example',
     'MOESI_CMP_directory',
-    'MOESI_CMP_directory_m',
     'MOESI_CMP_token',
-    'MOESI_SMP_directory',
-    'MOESI_SMP_token',
-    'MOSI_SMP_bcast',
-    'MOSI_SMP_bcast_1level',
-    'MOSI_SMP_bcast_m',
-    'MOSI_SMP_directory_1level',
-    'MSI_MOSI_CMP_directory',
     'MOESI_hammer',
     'Network_test',
+    'None'
     ]
 
-opt = EnumVariable('PROTOCOL', 'Coherence protocol for Ruby', 'MI_example',
+opt = EnumVariable('PROTOCOL', 'Coherence protocol for Ruby', 'None',
                    all_protocols)
 
 sticky_vars.AddVariables(opt)
diff -r 818aea9960f5 -r 353abb676fa2 tests/SConscript
--- a/tests/SConscript  Sun Jul 31 19:21:17 2011 -0700
+++ b/tests/SConscript  Tue Aug 02 00:10:08 2011 -0500
@@ -289,16 +289,6 @@
                 'inorder-timing', 'rubytest']
 
 if env['RUBY']:
-    # With Ruby, A protocol must be specified in the environment
-    assert(env['PROTOCOL'])
-
-    #
-    # Is there a way to determine what is Protocol EnumVariable
-    # default and eliminate the need to hard code the default protocol below?
-    #
-    # If the binary includes the default ruby protocol, run both ruby and
-    # non-ruby versions of the tests.  Otherwise just run the ruby versions.
-    #
     if env['PROTOCOL'] == 'MI_example':
         configs += [c + "-ruby" for c in configs]
     else:
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to