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

Have phases.Emitter name phases.Convert as a dependent #1412

Closed
wants to merge 2 commits into from

Conversation

davidbiancolin
Copy link
Contributor

This must be prefaced with i'm not at all sure this is the correct solution...

That said, under the current ordering constraints, the phase manager might elect to schedule the convert phase before the emitter phase, which removes the chisel circuit annotation before it can be processed by the emitter. Really i'm using dependent here more in "make-sure-i-run-before" sense, i'm not sure that's the right idea.

The underlying problem here is that certain phases need to run at some point during the lifetime of specific annotations and often it's not clear what that lifetime is, short of reading each phase. If an annotation is going to be used by multiple consumer passes, some of which might be outside of chisel's control, it may make sense to dedicate an entire pass to the removal of certain annotations if we choose to remove them at all (ie. RemoveChiselCircuitAnnotationPhase) -- after all, another possible fix here is simply not to delete the annotation (and potentially mark it so it is not serialized).

Type of change: bug report

Impact: no functional change

Release Notes

Have the emitter Phase name the Convert phase as a dependent.

@davidbiancolin davidbiancolin requested a review from a team as a code owner April 14, 2020 01:20
@CLAassistant
Copy link

CLAassistant commented Apr 14, 2020

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@seldridge seldridge left a comment

Choose a reason for hiding this comment

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

lgtm

Since the current Emitter deletes the annotation, it should run before phases.Convert (which does delete the annotation). Specifying a dependent as the PR does or having Convert list Emitter as an optionalPrerequisite should be equivalent.

@seldridge
Copy link
Member

This should be fine as a temporary fix for 3.2.x. All this should be fixed up after the "How To Serialize" series (firrtl#1277 and chisel#1405) is merged. Currently this is slated as 3.4/1.4, so a 3.2.x fix makes sense.

#1405 makes the change where Convert will no longer delete the annotation. That annotation is then serialized to a file automatically when the Stage finishes.

@seldridge seldridge added this to the 3.2.X milestone Apr 14, 2020
@seldridge seldridge added Bugfix Fixes a bug, will be included in release notes Please Merge Accepted PRs that are ready to be merged. Useful when waiting on CI. labels Apr 14, 2020
@ucbjrl
Copy link
Contributor

ucbjrl commented May 4, 2020

@davidbiancolin, the CLA bot doesn't think you've signed the CLA.

jackkoenig pushed a commit that referenced this pull request Feb 28, 2023
* Pull out common test utilities into a separate package

* Project a fat jar for test utilities

Co-authored-by: Albert Magyar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bugfix Fixes a bug, will be included in release notes DO NOT MERGE Please Merge Accepted PRs that are ready to be merged. Useful when waiting on CI.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants