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

script order with conditional statements #689

Open
BaseHardware opened this issue May 28, 2024 · 0 comments
Open

script order with conditional statements #689

BaseHardware opened this issue May 28, 2024 · 0 comments

Comments

@BaseHardware
Copy link

BaseHardware commented May 28, 2024

The CAPI 2 format supports the conditional inclusion as follows:

    hooks:
      post_build:
        - "target_chip_AA ? (generate_mcs_AA)"
        - "target_chip_BB ? (generate_mcs_BB)"
        - post_build_script

This is a simple example of hooks at the post-build stage of fusesoc. In my sense, the hook MUST be executed in order of specification of each item. (i.e., generate_mcs_AA (if target_chip_AA is defined) -> generate_chip_BB (if target_chip_BB is defined) -> post_build_script)
However, I found if there are hook items with the conditional statements, they go to the back of the list. So, if target_chip_AA is defined, fusesoc executes the hook items in this order: post_build_script -> target_chip_AA.
This sense is not intuition and must be fixed as the order will be kept.

Currently, I am using the following configuration to keep the order.

    hooks:
      post_build:
        - "target_chip_AA ? (generate_mcs_AA)"
        - "target_chip_BB ? (generate_mcs_BB)"
        - "_ ? (post_build_script)"
        - "!_ ? (post_build_script)"

Please fix this problem at the next patch.

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

1 participant