diff --git a/boards/default/installers/firesim/firesim.py b/boards/default/installers/firesim/firesim.py index 68786d38..9d088d67 100644 --- a/boards/default/installers/firesim/firesim.py +++ b/boards/default/installers/firesim/firesim.py @@ -3,6 +3,7 @@ import pathlib import os import wlutil +import shutil moduleDir = pathlib.Path(__file__).resolve().parent @@ -69,7 +70,9 @@ def install(targetCfg, opts): if 'simulation_outputs' in jCfg['firesim']: wls[slot]["simulation_outputs"] = [f.as_posix() for f in jCfg['firesim']['simulation_outputs']] if 'simulation_inputs' in jCfg['firesim']: - wls[slot]["simulation_inputs"] = [f.as_posix() for f in jCfg['firesim']['simulation_inputs']] + wls[slot]["simulation_inputs"] = [os.path.basename(f.as_posix()) for f in jCfg['firesim']['simulation_inputs']] + for f in jCfg['firesim']['simulation_inputs']: + shutil.copy(f, os.path.join(fsTargetDir, os.path.basename(f))) fsCfg['workloads'] = wls else: @@ -88,7 +91,9 @@ def install(targetCfg, opts): if 'simulation_outputs' in targetCfg['firesim']: fsCfg["common_simulation_outputs"] = [f.as_posix() for f in targetCfg['firesim']['simulation_outputs']] if 'simulation_inputs' in targetCfg['firesim']: - fsCfg["common_simulation_inputs"] = [f.as_posix() for f in targetCfg['firesim']['simulation_inputs']] + fsCfg["common_simulation_inputs"] = [os.path.basename(f.as_posix()) for f in targetCfg['firesim']['simulation_inputs']] + for f in targetCfg['firesim']['simulation_inputs']: + shutil.copy(f, os.path.join(fsTargetDir, os.path.basename(f))) with open(str(fsTargetDir / "README"), 'w') as readme: readme.write(readmeTxt) diff --git a/docs/source/workloadConfig.rst b/docs/source/workloadConfig.rst index 16bffede..ab1e2774 100644 --- a/docs/source/workloadConfig.rst +++ b/docs/source/workloadConfig.rst @@ -443,3 +443,25 @@ Set the amount of memory to use when launching or testing this workload in functional simulation. Does not affect the 'install' command. This value can be either a string with standard size annotations (e.g. "4GiB") or an integer representing the number of megabytes to use. + +Simulation Specific Configuration Options +------------------------------------------- + +simulation_outputs +^^^^^^^^^^^^^^^^^^^^^ +A list of simulation output files to copy after running Firesim. Each path +should be absolute with respect to the `sim_slot_*` directory. + +simulation_inputs +^^^^^^^^^^^^^^^^^^^^^ +A list of simulation input files to provide to Firesim before running simulations. +Each path should be relative to the firemarshal top directory. + +.. Note:: `simulation_outputs` and `simulation_inputs` are specific to firesim + workloads and hence should be wrapped with the `firesim` key. + ``` + firesim: { + simulation_inputs: ["./images/br-base/br-base-bin-dwarf"], + simulation_outputs: ["memory_stats0.csv", "metasim_stderr.out"] + } + ```