OneShotCfg.gen_results never writes report files to disk (lint/syn/formal/cdc/rdc)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 13
- Forks
- 21
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 8
Description
Summary
The one-shot flows (lint, synthesis, formal, CDC, RDC) compute their Markdown result tables in memory but never write any report file to disk. OneShotCfg.gen_results only creates an (empty) report directory and logs a line that claims a report.html was written — no HTML, Markdown, or JSON report is actually produced. As a consequence, out-of-tree dvsim does not generate lint reports, and the OpenTitan CI steps that consume those report files have nothing to pick up.
Upstream report: https://github.com/lowRISC/opentitan/issues/31024
Affected flows
All flows whose config derives from OneShotCfg:
LintCfg(flow/lint.py)SynCfg(flow/syn.py)FormalCfg(flow/formal.py)CdcCfgandRdcCfg(flow/cdc.py,flow/rdc.py, both subclassLintCfg)
Simulation (SimCfg) is not affected: it generates reports via sim/report.py::gen_reports(), which renders JSON and HTML to the report directory. Only the one-shot path is broken.
Root cause
OneShotCfg.gen_results (src/dvsim/flow/one_shot.py:179) does the following for each config:
- Calls
item._gen_results_for_cfg(...), which builds the per-config Markdown result string and stores it onitem.results_md/item.publish_results_md. - Logs the result string.
- Creates the report directory with
results_dir.mkdir(...). - Logs
"[report]: [%s] [%s/report.html]"— implying areport.htmlwas written, though nothing was.
The actual write steps are left as TODO comments:
# src/dvsim/flow/one_shot.py
# TODO: Implement HTML report using templates
#
# This was previously implemented by rendering the markdown results for the item.
results_dir = Path(self.results_dir)
results_dir.mkdir(exist_ok=True, parents=True)
log.verbose("[report]: [%s] [%s/report.html]", project, item.results_dir)
and for the primary config:
if self.is_primary_cfg:
self.gen_results_summary()
# TODO: Write a combined HTML report to self.results_html_name
So results_md, publish_results_md, and results_summary_md are all computed but never persisted. The only filesystem side effect is an empty results_dir.
History
This regressed during the extraction of dvsim out of the OpenTitan tree. In the in-tree implementation, gen_results rendered the Markdown to HTML and wrote it out (via md_results_to_html(...) and write_results(...)). During the move those calls were commented out (see commit 85d8550, "fix: restore the lint flow old style report", which reinstated the Markdown generation but left the file-writing as TODOs), and the md_results_to_html / write_results helpers no longer exist in this repository.
Impact
- Out-of-tree dvsim produces no lint (or syn/formal/cdc/rdc) report artifacts.
- OpenTitan CI cannot wire in lint reports, because the report files it expects are never generated.
- The
log.verbose("[report] ... report.html")message is misleading: it reports a file that does not exist. - The report attributes exist (
results_page,results_html_name) andgen_results_summary()runs, but the output is discarded.
How to reproduce
Run any lint flow with out-of-tree dvsim and inspect the report directory (<scratch_base_path>/reports/<rel_path>/). The directory is created but contains no report.html (or any other report file), despite the log line claiming otherwise.
Suggested fix
Implement the report writing that the TODOs describe, ideally reusing the report-rendering approach already used by the sim flow (sim/report.py::gen_reports()) so that one-shot flows emit consistent JSON/HTML/Markdown artifacts:
- Write a per-config report to
item.results_page/item.results_html_name. - Write the combined summary (
results_summary_md) for the primary config. - Confirm the file name/location matches what OpenTitan CI expects so the lint reports can be wired back in.
- Fix or remove the misleading
report.htmllog line until a file is actually written.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/dvsim/flow/one_shot.py at OneShotCfg.gen_results and inspect sim/report.py::gen_reports() for the existing report-generation approach. Trace the affected flow configs in flow/lint.py, flow/syn.py, flow/formal.py, flow/cdc.py, and flow/rdc.py, including the report paths and summary attributes named in the issue. Done means one-shot flows write the expected report artifacts and no longer claim that a nonexistent report.html was created.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system, devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100