-
Notifications
You must be signed in to change notification settings - Fork 603
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
Bugfix - module name collision for injecting aspect #1635
Conversation
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.
I think more comments would be very helpful, it's not obvious what's going on and why just by looking at code...
build(f, new DynamicContext()) | ||
} | ||
|
||
private [chisel3] def build[T <: RawModule](f: => T, dynamicContext: DynamicContext): (Circuit, T) = { |
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.
Is this the right API, to expose all of dynamicContext, as opposed to perhaps something more targeted like preinitialized / reserved names?
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.
So I made the function package private, which should give us the ability to change it in the future. However, I think it actually does make sense to expose the dynamic context, because I've often hit cases with the Instance API that I've been wanting ways to add context-state to a chisel execution.
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.
👍
@ducky64 can you re-review? |
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.
lgtm, the docs definitely helped clarify behavior!
* Bugfix - module name collision for injecting aspect * Fixed mechanism to avoid module name collisions * Added comments for reviewer feedback Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> (cherry picked from commit 1b6bd89)
* Bugfix - module name collision for injecting aspect (#1635) * Bugfix - module name collision for injecting aspect * Fixed mechanism to avoid module name collisions * Added comments for reviewer feedback Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> (cherry picked from commit 1b6bd89) * Update InjectingAspect.scala Add additional function for backwards compatibility. Co-authored-by: Adam Izraelevitz <azidar@gmail.com>
… (bp #1649) (#1650) * Bugfix - adding external modules was broken (#1649) (cherry picked from commit d21fe71) * Remove test because not backportable * Remove extra space Co-authored-by: Adam Izraelevitz <azidar@gmail.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Contributor Checklist
docs/src
?Type of Improvement
API Impact
Adds private [chisel3] APIs to enable fixing module name collision behavior.
Backend Code Generation Impact
None.
Desired Merge Strategy
Release Notes
Bugfix: Instantiating modules in an InjectingAspect will no longer create modules with conflicting names in the original design.
Reviewer Checklist (only modified by reviewer)
Please Merge
?