Skip to content

OneShotCfg.gen_results never writes report files to disk (lint/syn/formal/cdc/rdc) #247

Description

@hcallahan-lowrisc

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: lowRISC/opentitan#31024

Affected flows

All flows whose config derives from OneShotCfg:

  • LintCfg (flow/lint.py)
  • SynCfg (flow/syn.py)
  • FormalCfg (flow/formal.py)
  • CdcCfg and RdcCfg (flow/cdc.py, flow/rdc.py, both subclass LintCfg)

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:

  1. Calls item._gen_results_for_cfg(...), which builds the per-config Markdown result string and stores it on item.results_md / item.publish_results_md.
  2. Logs the result string.
  3. Creates the report directory with results_dir.mkdir(...).
  4. Logs "[report]: [%s] [%s/report.html]" — implying a report.html was 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) and gen_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.html log line until a file is actually written.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions