Skip to content

Commit

Permalink
[tools,topgen] Simplify topgen
Browse files Browse the repository at this point in the history
This is a big change in topgen. Some salient changes:
- It always regenerates from scratch the ipgen in-memory configurations
  (as IpBlock objects) so it is truly incremental: the previous flow
  reused the pre-existing generated ipgen hjson if found.
- It delays the actual ipgen file generation until the complete top config
  is generated. This is a step towards breaking topgen into smaller and
  mutually independent steps, thus enabling parallelizing them.
- It converges with a single pass of process_top.
In order to accomplish this some important changes are made:
- Call some of the merge_top functions suitable for each specific ipgen
  prior to generating the in-memory hjson config. This means not all
  IpBlock objects are available, so these merge functions are instrumented
  to skip blocks missing.
- The generation of ipgens are ordered according to dependencies. This
  order created from the expected block functionality, so is not derived
  from a constructed graph, but converging in one pass means it is correct.
- Calling merge functions early means some of the objects in the in-memory
  top config are not plain dictionaries but are classes, so the code needs
  to handle either.

Part of lowRISC#25920

Signed-off-by: Guillermo Maturana <[email protected]>
  • Loading branch information
matutem committed Jan 23, 2025
1 parent 95ec95b commit 609cf36
Show file tree
Hide file tree
Showing 15 changed files with 4,915 additions and 4,050 deletions.
3,274 changes: 1,734 additions & 1,540 deletions hw/top_darjeeling/data/autogen/top_darjeeling.gen.hjson

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
module: soc_proxy
}
]
NumRstReqs: 2
rst_reqs:
{
int:
Expand Down Expand Up @@ -68,7 +69,6 @@
}
]
}
NumRstReqs: 2
wait_for_external_reset: true
NumRomInputs: 3
top_pkg_vlnv: lowrisc:constants:top_darjeeling_top_pkg
Expand Down
208 changes: 104 additions & 104 deletions hw/top_darjeeling/rtl/autogen/top_darjeeling_rnd_cnst_pkg.sv

Large diffs are not rendered by default.

Loading

0 comments on commit 609cf36

Please sign in to comment.