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).
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.)
SS_COMPATIBLE_FP = 1
CPU_MODELS = 'AtomicSimpleCPU,TimingSimpleCPU,O3CPU,InOrderCPU'
PROTOCOL = 'MESI_CMP_directory'
-RUBY = True
SS_COMPATIBLE_FP = 1
CPU_MODELS = 'AtomicSimpleCPU,TimingSimpleCPU,O3CPU,InOrderCPU'
PROTOCOL = 'MOESI_CMP_directory'
-RUBY = True
SS_COMPATIBLE_FP = 1
CPU_MODELS = 'AtomicSimpleCPU,TimingSimpleCPU,O3CPU,InOrderCPU'
PROTOCOL = 'MOESI_CMP_token'
-RUBY = True
SS_COMPATIBLE_FP = 1
CPU_MODELS = 'AtomicSimpleCPU,TimingSimpleCPU,O3CPU,InOrderCPU'
PROTOCOL = 'MOESI_hammer'
-RUBY = True
SS_COMPATIBLE_FP = 1
CPU_MODELS = 'AtomicSimpleCPU,TimingSimpleCPU,O3CPU,InOrderCPU'
PROTOCOL = 'Network_test'
-RUBY = True
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()
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)
'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: