|
|
@@ -36,7 +36,7 @@ def create_graph(file, title=None):
|
|
|
|
|
|
subprocess.run(cmd, shell=True)
|
|
|
|
|
|
-def run_devstone(model_type, depth, width, mode, out, memory, stats, *, classic=False, number=1, gen_mode="uniform"):
|
|
|
+def run_devstone(model_type, depth, width, mode, out, memory, stats, DCP, *, classic=False, number=1, gen_mode="uniform"):
|
|
|
"""Runs the devstone_driver.py script and returns timing results as floats."""
|
|
|
SCRIPT_PATH = PyPDEVS
|
|
|
if mode == "minimal":
|
|
|
@@ -50,6 +50,9 @@ def run_devstone(model_type, depth, width, mode, out, memory, stats, *, classic=
|
|
|
"-i", str(INT_CYCLES),
|
|
|
"-e", str(EXT_CYCLES),
|
|
|
]
|
|
|
+ if DCP:
|
|
|
+ cmd.extend(["--DCP", DCP])
|
|
|
+
|
|
|
if stats:
|
|
|
cmd.extend(["-s"])
|
|
|
|
|
|
@@ -112,6 +115,7 @@ def defaultArguments(parser):
|
|
|
parser.add_argument("-M", "--memory", action="store_true", help="Measures the memory usage of a simulation.")
|
|
|
parser.add_argument("-i", "--interval", default=1.0, type=float, help="The interval at which measurements are taken.")
|
|
|
parser.add_argument("--stats", "-s", action="store_true", help="Enable Event Tracking")
|
|
|
+ parser.add_argument("--DCP", choices=["old", "memoised"], default="", help="Select the DCP implementation, old: legacy, memoised: cached, and leave empty to use the default one.")
|
|
|
|
|
|
def Minimal(subparsers):
|
|
|
minimal = subparsers.add_parser("minimal", help="Minimal DEVS kernel")
|
|
|
@@ -200,7 +204,7 @@ def run(writer, csvfile, model_type, d, w, args, mem_cmd, extra):
|
|
|
creation, setup, sim = run_devstone(
|
|
|
model_type, depth, width,
|
|
|
args.mode, args.output,
|
|
|
- mem_cmd, args.stats,
|
|
|
+ mem_cmd, args.stats, args.DCP,
|
|
|
**extra
|
|
|
)
|
|
|
|