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

move the conditional part of toolchain.build(run=True/False) to a separate method #258

Open
lneuhaus opened this issue Feb 22, 2022 · 1 comment

Comments

@lneuhaus
Copy link

lneuhaus commented Feb 22, 2022

I would like to split the build process of a design on two hosts:

  • the first host would call platform.build(run=False) and create a build folder with the files required for a build
  • that folder would be zipped and shipped to a second host, which has the tools (eg Vivado) required for building a design installed
  • the second host would then unzip the build folder and run the steps that are usually only called if run=True is passed to build
  • eventually the result of the build would be shipped back to the first host and deployed

Fortunately, the structure of build() methods for all platforms is always similar, essentially containing an if run: ... block which is all that needs to run on the second host. I suggest to make that block a classmethod (e.g. call it _run_build(build_folder) of the toolchain, which is called from build(). Would a PR with this change have chances to be merged?

For example, I'm talking about pieces of code like these ones:

EDIT: I'm now seeing that not all of the run-blocks require the same input (some need files in a folder, others a script), so maybe it's easier if I build custom solutions based on specific toolchains.

@sbourdeauducq
Copy link
Member

Might be OK.

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