[dv regr tool] Added 'overrides' directive
- You can now specify overrides for default sim key values using the
overrides keyword.
- Example:
```hjson
// In 'common' cfg, specify a default attribute
foo: bar
// In DUT specific cfg, provide an override for it
overrides: [
{
name: foo
value: baz
}
]
```
- This us useful to set a project-default attribute and use overrides if
an IP needs a custom version of it.
- This is needed to setup the hjson cfg for the chip level where the
coverage collection model is different.
Signed-off-by: Srikrishna Iyer <sriyer@google.com>
diff --git a/util/dvsim/SimCfg.py b/util/dvsim/SimCfg.py
index 87db098..13f80ff 100644
--- a/util/dvsim/SimCfg.py
+++ b/util/dvsim/SimCfg.py
@@ -94,7 +94,6 @@
self.flist_file = ""
self.run_cmd = ""
self.dump_file = ""
- self.exports = []
# Generated data structures
self.links = {}
@@ -112,6 +111,9 @@
if self.build_unique:
self.build_dir += "_" + self.timestamp
+ # Process overrides before substituting the wildcards.
+ self._process_overrides()
+
# Make substitutions, while ignoring the following wildcards
# TODO: Find a way to set these in sim cfg instead
ignored_wildcards = [