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

updating README examples with Make changes #2322

Merged
merged 1 commit into from
Mar 6, 2020
Merged

updating README examples with Make changes #2322

merged 1 commit into from
Mar 6, 2020

Conversation

debs-sifive
Copy link
Contributor

Related issue: #2321

Type of change: documentation fix

Impact: no functional change

Development Phase: implementation

Release Notes

@debs-sifive debs-sifive requested a review from azidar March 5, 2020 20:40
@azidar azidar merged commit 875dcd3 into master Mar 6, 2020
@azidar azidar deleted the readme-fix branch March 6, 2020 17:58
@colinschmidt
Copy link
Contributor

Is there no plan to revive this nice-to-have feature?

@debs-sifive
Copy link
Contributor Author

Not that I am aware of

@colinschmidt
Copy link
Contributor

Bummer. Would a PR adding the feature be accepted?

@debs-sifive
Copy link
Contributor Author

I don't see why not. Might make more sense/be easier to create a different environment variable in the Makefiles than to change the generator flow, imo.

@colinschmidt
Copy link
Contributor

I know I was too slow to review that other PR, but what was the benefit to changing the API?

Also I don't see documentation for the change of multiple command line configs moving from separation by _ to separation by ,

@debs-sifive
Copy link
Contributor Author

I'm gonna let @seldridge explain that one, I'm not certain that one way is better than the other.

Is config separation currently documented somewhere I should update? Or should I just add something to the README?

@seldridge
Copy link
Member

seldridge commented Mar 6, 2020

@colinschmidt: I suggested that @debs-sifive go in this direction for the reason that _ is an allowable character in a configuration name while , is not. Namely, I could have a config of My_Foo_Config which is an allowable Scala class, but would parse into three configs.

There are unrelated, expedient benefits of scopt natively parsing comma delineated arguments, but requiring custom parsing for _ delineated.

Was there a reason why _ was used originally?

@seldridge
Copy link
Member

And, sorry. My suggestion, I expect, broke your stuff...

@debs-sifive
Copy link
Contributor Author

I think @colinschmidt is more asking about why we decided to combine project and class name for the configs

@colinschmidt
Copy link
Contributor

I honestly care less about the _ and more about the fact that make CONFIG=DefaultConfig no longer works.

@seldridge
Copy link
Member

I think the makefiles could be changed to support this again if needed.

The underlying reason for the change is that Rocket Chip generation is now governed by two main annotations: TopModuleAnnotation(clazz: Class[_ <: Any]) and ConfigsAnnotation(a: Seq[String]). You combine these to start elaboration.

To generate these, the parsing happens without state, i.e., there is a method of A => AnnotationSeq that converts a command line option (of some type A, e.g., String) into one or more annotations. This is not done with knowledge of the existing AnnotationSeq. Hence, there is no way for the option parsing logic to know what the project package is. (It could be specified by another annotation, but the process of converting the command line arguments to annotations is unaware of it.)

I think that #2274 elected to make the mapping simple from CONFIG=Foo to --configs=foo instead of mangling this with the project name. The makefiles could do this, however.

@colinschmidt
Copy link
Contributor

Ok. I think I agree that its better to do this in the makefile rather than in a new annotation.

debs-sifive added a commit that referenced this pull request Mar 10, 2020
debs-sifive added a commit that referenced this pull request Mar 10, 2020
* Revert "updating README examples with Make changes (#2322)"

This reverts commit 875dcd3.

* Revert "fixing aspect generation (#2309)"

This reverts commit bbeb257.

* Revert "separate generator behavior into phases (#2274)"

This reverts commit 9d99750.
ucbjrl added a commit that referenced this pull request Apr 21, 2020
Revert staged generator PRs (#2329)

* Revert "updating README examples with Make changes (#2322)"

This reverts commit 875dcd3.

* Revert "fixing aspect generation (#2309)"

This reverts commit bbeb257.

* Revert "separate generator behavior into phases (#2274)"

This reverts commit 9d99750.

(cherry picked from commit e170f8f)
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.

4 participants