[dv regr tool] Support for multi IP sim runs
- Added support for running sims for multiple IPs in parallel
Command line:
```console
$ util/dvsim.py hw/dv/data/master_sim_cfgs_list.hjson -i sanity --reseed 1 [--purge]
```
- The master_sim_cfgs_list.hjson only adds UART and HMAC hjsons - need to
add the cfg hjsons for other IPs once they are available
- Added 'FlowCfg.py' which serves as base class implementation for hjson
based infrastructure specification - SimCfg now extends from it. This is
done in preperation to add support for other ASIC flows such as FPV,
lint, etc in future.
- Several optimizations to reduce run time (12x speedup from before!)
Signed-off-by: Srikrishna Iyer <sriyer@google.com>
diff --git a/util/dvsim/utils.py b/util/dvsim/utils.py
index cc2c80f..29ead4d 100644
--- a/util/dvsim/utils.py
+++ b/util/dvsim/utils.py
@@ -51,7 +51,7 @@
while time.time() - start < timeout:
if p.poll() is not None:
break
- time.sleep(0.2)
+ time.sleep(.01)
# Capture output and status if cmd exited, else kill it
if p.poll() is not None:
@@ -68,6 +68,22 @@
return (result, status)
+# Parse hjson and return a dict
+def parse_hjson(hjson_file):
+ hjson_cfg_dict = None
+ try:
+ log.debug("Parsing %s", hjson_file)
+ f = open(hjson_file, 'rU')
+ text = f.read()
+ hjson_cfg_dict = hjson.loads(text, use_decimal=True)
+ f.close()
+ except:
+ log.fatal("Failed to parse \"%s\" possibly due to bad path",
+ hjson_file)
+ sys.exit(1)
+ return hjson_cfg_dict
+
+
def subst_wildcards(var, mdict, ignored_wildcards=[]):
'''
If var has wildcards specified within {..}, find and substitute them.