Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tools,topgen] DRAFT OF Simplify topgen #25933

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

matutem
Copy link
Contributor

@matutem matutem commented Jan 17, 2025

THIS IS A DRAFT

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.

Do not require the existence of "int", "debug", or even "peripheral"
resets.

Signed-off-by: Guillermo Maturana <[email protected]>
Do not require the existence of "int", "debug", or even "peripheral"
resets.

Signed-off-by: Guillermo Maturana <[email protected]>
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]>
@matutem matutem requested review from pamaury, a-will and Razer6 January 17, 2025 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant