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

Cleaner/clearer simulation flow #9

Open
FrancescoConti opened this issue Jul 13, 2024 · 1 comment
Open

Cleaner/clearer simulation flow #9

FrancescoConti opened this issue Jul 13, 2024 · 1 comment

Comments

@FrancescoConti
Copy link
Member

FrancescoConti commented Jul 13, 2024

imho a bit (a lot) more clarity would be nice in how the simulation platform is built.
Disclaimer: I did not check anything in depth (no time unfortunately), so feel free to correct me!

right now i see:

  1. bender checkout
  2. make chs-hw-init "initialize" all cheshire simulation platform (which I guess means generate register maps with reggen, but maybe also other Cheshire-specific stuff, rather obscure to me)
  3. make snitch-hw-init "initializes" the snitch cluster but it also checks out bender deps and then it actually also builds and optimizes it, is that then linked later with the rest of the platform? If Bender is called multiple times, how do we avoid issues with incompatible versions of deps?
  4. make chs-sim-all script generation for cheshire postponed here?
  5. make chim-sim script generation for the top-level chimera?
  6. then we go directly inside the sim target and call scripts for setup, compile, and simulation manually from QuestaSim...

IMHO it's a bit all mixed up (Chimera->Cheshire->Snitch->Cheshire->Chimera...) and clearly a lot of clutter will eventually be removed, but it makes sense to me to start a discussion on this pretty early.
Personally I see two strategies:

Full-dependency Bender flow:

  1. initial configuration check (e.g., which kind of clusters/accelerators are included)
  2. deps resolution and checkout for all IPs in a single Bender flow.
  3. "initialization" (template gen) of the top, Cheshire, and various clusters/accelerators that need this. [1]
  4. script generation for the full platform (per-target)
  5. usual target flow

The main limitation here is that we can (will) run into dependency problems if one of the clusters and the top want to use different versions of an IP (I think this already happens with PULP clusters and the top with the iDMA version). As an alternative (more complicated):

Vendorized flow:
0. need to fork the main chimera repo

  1. initial configuration check (e.g., which kind of clusters/accelerators are included).
  2. deps resolution and checkout for each IP separately (with Bender or even other flows).
  3. vendorization inside the chimera repo (see e.g. https://github.com/esl-epfl/x-heep), possibly also automatically prepending IP names/versions to modules/packages/etc (e.g., module cluster_peripherals in pulp_cluster becomes module pulp_cluster_v1.2.3_cluster_peripherals)
  4. "initialization" (template gen) of the top, Cheshire, and various clusters/accelerators that need this.
  5. script generation for the full platform (per-target)
  6. usual target flow

Personally, I very much prefer the former, keeping in mind that in some cases (e.g., projects with external partners) the latter strategy might also be used, at least for some IPs.
I think particularly of the case of a cluster/accelerator provided by a partner that uses an older version of our own IPs...
What do you think?

@Scheremo
Copy link
Collaborator

Ciao Francesco, thanks for your comment.

I agree that currently things are not entirely coherent in the build flow. I think your suggestions make sense, and I believe what is implemented currently is fairly close (if less streamlined) to what your first suggestion entails. Maybe we can have a chat about the top-down view of the build flow we would like, and converge to that vision.

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

No branches or pull requests

2 participants