Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy simulation_inputs | add docs #261

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions boards/default/installers/firesim/firesim.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import pathlib
import os
import wlutil
import shutil

moduleDir = pathlib.Path(__file__).resolve().parent

Expand Down Expand Up @@ -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:
Expand All @@ -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)
Expand Down
22 changes: 22 additions & 0 deletions docs/source/workloadConfig.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
}
```