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

syntax for target filtering dependencies? #185

Open
epsilon537 opened this issue Oct 15, 2024 · 3 comments
Open

syntax for target filtering dependencies? #185

epsilon537 opened this issue Oct 15, 2024 · 3 comments

Comments

@epsilon537
Copy link

The README says: "Targets are flags that can be used to filter source files and dependencies."
I can't seem to figure out the syntax for target-based filtering of dependencies. I couldn't find any examples online either.
Thanks for any help.

@micprog
Copy link
Member

micprog commented Oct 17, 2024

Targets can be specified in the Bender.yml with source file groups, as shown in the Readme. To specify these targets for your scripts generation, add a --target <YOUR_TARGET> or -t <YOUR_TARGET> to your command. As an example, specifying the test target for a vsim script works as follows:

bender script vsim --target test

More info can be found in bender's help menu with bender script --help.

If you're looking for an example, check out cheshire's Bender.yml and Makefile

@epsilon537
Copy link
Author

Thanks for getting back to me. I'm aware that targets can be specified in source groups. My question is, can targets also be used in the dependencies section of Bender.yml? The README says that target flags can be used to filter dependencies, not just source files.

I'm looking for something along these lines:

dependencies:
  ...
  vs0: {target: vivado, path: "../../components/vs0_empty"}
  vs0: {target: verilator, path: "../../components/vs0_stub"}

The above syntax does not work. I'm looking for the correct syntax (if there is one).

@0xcdef
Copy link

0xcdef commented Oct 30, 2024

it seems, now, you can list all the targets after '-t/--target' (one with each) while do bender script

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

3 participants