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

Chisel's IR is public #414

Open
jackkoenig opened this issue Dec 15, 2016 · 6 comments
Open

Chisel's IR is public #414

jackkoenig opened this issue Dec 15, 2016 · 6 comments

Comments

@jackkoenig
Copy link
Contributor

Chisel's IR (which is not Firrtl) is currently public and thus part of the API. Should this be the case? Now is the time to make it private if we're going to.

@jackkoenig jackkoenig added this to the 3.0.0 milestone Dec 15, 2016
@ducky64
Copy link
Contributor

ducky64 commented Dec 15, 2016

Agree with making it private. It's already part of the internal package, and we should have reserve the flexibility to change it in the near future (there was talk about making Chisel directly emit firrtl, instead of having our own emitter in Chisel). Some constructs are exposed though (like Width), but some refactoring can fix that.

@aswaterman
Copy link
Member

Please make sure rocket-chip's use case continues to be supported (e.g. https://github.com/ucb-bar/rocket-chip/blob/master/src/main/scala/util/GeneratorUtils.scala).

@jackkoenig
Copy link
Contributor Author

A reasonable approach might be to comment very explicitly on the internal package that anything inside the package is subject to changing arbitrarily so only advanced users willing to deal with API changes should dare venture inside. Also, if we could exclude everything inside the internal package from the published ScalaDoc, then it's pretty hidden.

@aswaterman
Copy link
Member

I think this is a pragmatic compromise.

@jackkoenig
Copy link
Contributor Author

jackkoenig commented Nov 8, 2017

See https://github.com/freechipsproject/rocket-chip/pull/1094/files#diff-cc545926dc7cc33a4838a84a0515fe82

On second thought, this probably is fine since it's already jumping into the package

@ducky64
Copy link
Contributor

ducky64 commented Dec 13, 2017

Resolution: change chisel3.internal.firrtl to chisel3.internal.ir (because its not strictly FIRRTL - Chisel has it's internal IR that's slightly different) and make it private. There are some cases where the IR is currently inadvertently exposed, these should be fixed.
People should use FIRRTL's IR instead (for AST traversals and stuff), and we should add an API to access the elaborated module (currently none of the Driver calls return the elaborated Module).

@edwardcwang edwardcwang modified the milestones: 3.0.0, 3.1.0 Dec 13, 2017
@ducky64 ducky64 modified the milestones: 3.1.0, 3.2.0 Dec 13, 2017
@chick chick modified the milestones: 3.2.0, 3.3.0 Dec 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants