config: add num-work-ids command line option
authorGedare Bloom <gedare@rtems.org>
Thu, 10 Apr 2014 18:43:33 +0000 (13:43 -0500)
committerGedare Bloom <gedare@rtems.org>
Thu, 10 Apr 2014 18:43:33 +0000 (13:43 -0500)
Adds the parameter --num-work-ids to Options.py and reads the parameter
into the System params in Simulation.py. This parameter enables setting
the number of possible work items to different than 16. Support for this
parameter already exists in src/sim/System.py, so this changeset only
affects the Python config files.

Committed by: Nilay Vaish <nilay@cs.wisc.edu>

configs/common/Options.py
configs/common/Simulation.py

index e5069dc84a9b511627f240ff337e5a16547cbfcc..39355293d5131a517e34ba0768a3ddf7eb41bf13 100644 (file)
@@ -133,6 +133,8 @@ def addCommonOptions(parser):
                                             simulate (default: run forever)""")
     parser.add_option("--work-item-id", action="store", type="int",
                       help="the specific work id for exit & checkpointing")
+    parser.add_option("--num-work-ids", action="store", type="int",
+                      help="Number of distinct work item types")
     parser.add_option("--work-begin-cpu-id-exit", action="store", type="int",
                       help="exit when work starts on the specified cpu")
     parser.add_option("--work-end-exit-count", action="store", type="int",
index c5d7aee40f922f6f0a4794d8292bd4495303cb04..5d4398c80b7709296460e1920246dd039a6329fb 100644 (file)
@@ -93,6 +93,8 @@ def setMemClass(options):
 def setWorkCountOptions(system, options):
     if options.work_item_id != None:
         system.work_item_id = options.work_item_id
+    if options.num_work_ids != None:
+        system.num_work_ids = options.num_work_ids
     if options.work_begin_cpu_id_exit != None:
         system.work_begin_cpu_id_exit = options.work_begin_cpu_id_exit
     if options.work_end_exit_count != None: