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

Gen config #439

Merged
merged 12 commits into from
Apr 25, 2024
Merged

Gen config #439

merged 12 commits into from
Apr 25, 2024

Conversation

UnsignedByte
Copy link
Collaborator

@UnsignedByte UnsignedByte commented Apr 11, 2024

Adds the ability to configure compilation parameters through a config file.

The user provides a toml file as follows:

[globals.flopoco]
conf = "target=Virtex6 frequency=200"

to override the globals.conf element of def.fil.

The user can also provide parameters to the main component by doing the following:

params.main = [8, 32]

@UnsignedByte UnsignedByte linked an issue Apr 17, 2024 that may be closed by this pull request
┌─ tests/errors/binding/main-param.fil:2:6
2 │ comp main[A]<'G:1>() -> () {
│ ^^^^ `main' requires at least 1 parameters but 0 were provided
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we improve the error message for this case and provide some extra guidance on how to parameterize main because that is different from other components

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment was resolved but not actually addressed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added some more info to the error message in the code? Do you mean to add more than this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see the change. I meant we should say something like: "main is a special external component. Parameterizing it correctly requires using the the parameter file/cmdline arguments"

tests/gen/shift/6.toml Outdated Show resolved Hide resolved
@rachitnigam
Copy link
Member

Some suggestions to improve the error messages and question about new tests. Also, tests should ideally go in the tests/ folder.

@UnsignedByte
Copy link
Collaborator Author

Some suggestions to improve the error messages and question about new tests. Also, tests should ideally go in the tests/ folder.

As far as I can tell these are all in tests/? I created the gen folder because the tests have a special way of being invoked that is different from others, should I change that?

Comment on lines +10 to +11
error: Incorrect parameter bindings provided to top-level component main
= Parameter bindings should be provided via the `--bindings` flag in a `.toml` file.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's here (not sure why it wasn't showing before) @rachitnigam

@UnsignedByte UnsignedByte merged commit 54090d1 into main Apr 25, 2024
4 checks passed
@UnsignedByte UnsignedByte deleted the gen-config branch April 25, 2024 18:30
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.

Providing parameters to main component on compilation.
2 participants