[dv/tool] Add support to choose sub-cfgs
Add a parse_arg for user to choose which dut to run in a master cfg that
contains more than one sub-cfgs.
Signed-off-by: Cindy Chen <chencindy@google.com>
diff --git a/util/dvsim/SimCfg.py b/util/dvsim/SimCfg.py
index 55157c2..e16a519 100644
--- a/util/dvsim/SimCfg.py
+++ b/util/dvsim/SimCfg.py
@@ -127,9 +127,11 @@
# Set the title for simulation results.
self.results_title = self.name.upper() + " Simulation Results"
- # Stuff below only pertains to individual cfg (not master cfg).
- if not self.is_master_cfg:
- # Print info
+ # Stuff below only pertains to individual cfg (not master cfg)
+ # or individual selected cfgs (if select_cfgs is configured via command line)
+ # TODO: find a better way to support select_cfgs
+ if not self.is_master_cfg and (not self.select_cfgs or self.name in self.select_cfgs):
+ # Print info:
log.info("[scratch_dir]: [%s]: [%s]", self.name, self.scratch_path)
# Set directories with links for ease of debug / triage.