-
Notifications
You must be signed in to change notification settings - Fork 609
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
ExtModule's lacked support built in support for providing #1154
Conversation
the verilog source. This changes creates traits that can be used with ExtModule to provide the support currently found in BlackBox - Add support for ExtModule helpers - HasExtModuleResource to use addResource - HasExtModuleInline to use setInline - HasExtModulePath to use addPath - Add tests of the above support. - Note: These tests use Stage instead of Driver - Added ScalaDoc for HasBlackBoxInline#setInline
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a real review, but this is failing due to Scala 2.11 trailing comma support.
@seldridge Thanks, I like the idea of trailing commas, but I've got to find some mechanism for warning me when I commit with them. BTW, I haven't seen the suggested change in a code comment before. Is that some new feature? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding this missing API, @chick!
One comment, but feel free to merge when ready.
TargetDirAnnotation(targetDir), | ||
ChiselGeneratorAnnotation(() => new UsesExtModuleAddViaInline) | ||
) | ||
val newAnnotations = (new ChiselStage).run(annotations) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better to use the transform
or execute
methods instead of run
. The latter is what the user is supposed to implement, while the former two are running all the pre- and post-run steps.
Ditto for other usages below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to use .transform
We forgot to backport this which is causing the tests in #1650 to fail on 3.4.x |
@Mergifyio backport 3.4.x |
* ExtModule's lacked support built in support for providing the verilog source. This changes creates traits that can be used with ExtModule to provide the support currently found in BlackBox - Add support for ExtModule helpers - HasExtModuleResource to use addResource - HasExtModuleInline to use setInline - HasExtModulePath to use addPath - Add tests of the above support. - Note: These tests use Stage instead of Driver - Added ScalaDoc for HasBlackBoxInline#setInline * Fix the danged trailing commas. * Change to use `.transform` as the correct API for `ChiselStage` (cherry picked from commit fd92809)
Command
|
) * ExtModule's lacked support built in support for providing the verilog source. This changes creates traits that can be used with ExtModule to provide the support currently found in BlackBox - Add support for ExtModule helpers - HasExtModuleResource to use addResource - HasExtModuleInline to use setInline - HasExtModulePath to use addPath - Add tests of the above support. - Note: These tests use Stage instead of Driver - Added ScalaDoc for HasBlackBoxInline#setInline * Fix the danged trailing commas. * Change to use `.transform` as the correct API for `ChiselStage` (cherry picked from commit fd92809) Co-authored-by: Chick Markley <chick@qrhino.com>
* Fixes #1154 * Tests that #1154 example produces SyntaxErrorsException * Generally helps catch trailing syntax errors * Performance-neutral relative to previous grammar * Recommended by antlr4 devs, can help performance in some cases * See antlr/antlr4#1540
Inconsistent API between ExtModule and BlackBox
ExtModule's lacked support built in support for providing the verilog source. This changes creates traits that can be used with ExtModule to provide the support currently found in BlackBox
Type of change: Make ExtModule consistent with BlackBox
Impact: API addition (no impact on existing code)
Development Phase: implementation
Release Notes
ExtModule now has support for 3 methods of providing the underlying verilog implementations: in-line string, scala/java resource (best for use in libraries), and via a file path name.