The contents of dv/uvm/data are not vendored properly from OpenTitan
These were copied from OpenTitan as part of the mega-commit at PR #711. Since they are copied into the main Ibex repo, rather than vendored in, they don't stay in-sync with changes there.
Recently (30th March), some of the keys for coverage generation changed (see OpenTitan commit 39ffebd). These don't now match and you can't run dvsim.py to generate coverage without hacking dv/uvm/data/vcs/vcs.hjson, at least.
I think we should probably be vendoring this in properly. Is it part of dvsim? In which case, maybe it needs moving around in the OT repo and getting pulled in with the existing rules. If not, we need (yet) another vendor rule and either way this code needs to live under /vendor.
The files in dv/uvm/data are needed for dvsim, to specify project-wide variables and default values; same with the contents of dv/uvm/data/vcs as well.
It is definitely possible to vendor these into the Ibex repository - this will result in 3 additional vendor rules:
- The
dv/uvm/data/common_project_cfg.hjsonin the Ibex repo lives athw/data/common_project_cfg.hjsonin OpenTitan. - The 4
.hjsonfiles,sim.mk,vcs/vcs.hjson, andxcelium/xcelium.hjsonthat are all currently under Ibex'sdv/uvm/datadirectory all live athw/dv/datain OpenTitan. cover.cfg,vcs.fsdb, andxprop.cfgthat are currently under Ibex'sdv/uvm/data/vcsdirectory all live athw/dv/tools/vcsin OpenTitan.
It is also likely that by vendoring in all of these files, we will need to patch them (and update the patches) somewhat regularly to fix directory paths and things like this that will keep being added onto these configuration files. WDYT?
Vendoring is probably only half of a solution here.
Ideally, the dvsim tool would work with less repeated config -- all default config should be part of the tool itself (which we vendor in), and only deviations from that should be in our config files. That's especially true for all files @udinator mentioned in (2) above (e.g. sim.mk).
I'd take that as a medium-term goal, and for now simply keep the two configurations manually in sync. A git diff between the two data directories in OT and Ibex shows some deviations which seem to be intentional, and others which aren't. Maybe @udinator you can align them again as much as possible, and open a tracking issue to get this sorted on the dvsim side?
@imphil - I definitely agree, this warrants a look at the organization of dvsim default config files to try and consolidate them.
For the time being, I'll get a PR open to update the existing files in dv/uvm/data.
I've just pushed up https://github.com/lowRISC/opentitan/pull/2141, which tidies up the various filenames enough that we can vendor in the hw/dv/data and hw/dv/tools directories with minimal patching. (I tried it locally and it works!)
Sounds good! Let's wait until that PR gets merged, and then we can vendor in those directories.
This was done by #1201.