Open rswarbrick opened 2 years ago
@johngt I think we'll need to mirror this issue in the Ibex repository to enable tracking with Yoda. I don't think we can just move it as it's under two projects and the OpenTitan M2 milestone.
Additional notes from Rupert on which steps to take:
The dv/uvm/core_ibex/Makefile in the Ibex repository is cut down to "bare bones" and all the application logic is done in scripts that it calls.
In dvsim, we define a subclass of FlowCfg called something like IbexSimCfg. This is morally equivalent to our existing SimCfg but works somewhat differently under the hood, calling out to the scripts from (1) that now do all the work.
For example a "build" step will build the testbench and also the (SystemVerilog) random instruction generator.
A "run" step will run the random instruction generator, assemble the results, run the testbench over the instructions and (until the cosim work is finished) run an ISS over the instructions and check everything matches. These steps will all be serial, but that doesn't really matter because the ISS is quick and the dependency graph for everything else is linear anyway.
On the OT side, we write an "ibex_sim_cfg.hjson" that uses IbexSimCfg and runs the Ibex tests.
This gets wired into the chip-level primary config
Step 1 has already mostly been done and will be improved with this PR: https://github.com/lowRISC/ibex/pull/1705
Step 2, 3 and 4, I've made some progress on. Specifically I have made an initial version of CosimCfg.py
to describe a new flow and an initial version of ibex_sim_cfg.hjson
. All of these are still on a local branch, and I hope to create a draft PR on this soon.
Today, I got a base version of the cosimulation flow working by adding a cosim.mk
flow makefile.
It's not currently ready to be a PR, but you can have a look at my branch here: https://github.com/marnovandermaas/opentitan/tree/ibex_dvsim
spent 2 remaining 2022-08-04 30
Today, I got OT dvsim to call the Ibex DV makefile. I pointed the Ibex DV to the OpenTitan IP, which is vendored in in the main Ibex repo, but ran into a divergence. I created a PR on Ibex to fix this divergence: https://github.com/lowRISC/ibex/pull/1749
spent 4 remaining 2022-08-05 26
Vendor in the new Ibex fixes and added a patch for the DV Makefile. Make a change to util/vendor.py
to warn when patch directories don't exist.
https://github.com/marnovandermaas/opentitan/tree/dbd608c2cbaf6920d59882d6212ef9e705829abe
spent 2 remaining 2022-08-08 24
The next step for this task is to execute the individual tests through dvsim instead of running the whole test suite. This also allows us to report the individual passes and failures in the dvsim format.
I had a discussion with @hcallahan-lowrisc and we decided to base this change off of a build system refactor of Ibex DV that is currently tracked in this PR: https://github.com/lowRISC/ibex/pull/1705
spent 2 remaining 2022-08-11 22
Vendor in the new Ibex DV build system.
spent 2 remaining 2022-08-17 20
Made some changes necessary to the new Ibex DV build system to be used inside the OpenTitan repository.
spent 4 remaining 202208018 16
I pulled in the new changes by the PRs that I mention above. This required updates to the patches I made earlier. I also found a way to change the output directory to use the dvsim scratch directory instead of the out directory in ibex.
spent 3 remaining 20220831 13
The current plan is to stop calling the Ibex DV makefile, but use the scripts located in: https://github.com/lowRISC/opentitan/tree/master/hw/vendor/lowrisc_ibex/dv/uvm/core_ibex/scripts These steps need to be done in: https://github.com/marnovandermaas/opentitan/blob/ibex_dvsim/util/dvsim/CosimCfg.py This basically means replicating the steps that are done in the Makefile: https://github.com/lowRISC/opentitan/blob/master/hw/vendor/lowrisc_ibex/dv/uvm/core_ibex/Makefile And deploying multiple builds in the same way as: https://github.com/lowRISC/opentitan/blob/master/util/dvsim/SimCfg.py
@GregAC can we add this to the Ibex V2 review discussion.
We discussed this in the Ibex V2 meeting. Since the regressions are run nightly and can be audited, we're deferring this to V3 / M3 so that we can focus on more important tasks for M2.
CC: @tjaychen @moidx @sriyerg
We discussed this in the Ibex V2 meeting. Since the regressions are run nightly and can be audited, we're deferring this to V3 / M3 so that we can focus on more important tasks for M2.
CC: @tjaychen @moidx @sriyerg
agreed
agreed
Assigning this to M2.5 but my feeling is it is very low priority. Ibex regression results will be available in the new dashboards coming with the documentation Ibex and an HTML report of the Ibex nightly regression will be published.
Removing this from the M5 milestone. It's definitely in the future release/infrastructure improvement category
This is needed as part of the V2 milestone.
The lamest possible approach would basically have "run all the Ibex tests" as a one-shot dvsim tool. We can do somewhat better by wrapping calls to the Ibex Makefile for build and "run a test". That way, we'll still essentially be running the Ibex flow, but will expose parallelism to the dvsim scheduler.