Skip to content
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.

Allow casts in AsyncReset literal value check #1523

Merged
merged 2 commits into from
Apr 14, 2020
Merged

Conversation

jackkoenig
Copy link
Contributor

@jackkoenig jackkoenig commented Apr 14, 2020

Chisel emits all literals as UInts cast to the correct type, make
CheckResets support casts when checking that async reset registers are
reset to literal values.

mea culpa, mea culpa, mea maxima culpa 😞

I've marked this 1.2.x because, well obviously. The autobackport will fail because of intervals but I'll fix it up manually.

Contributor Checklist

  • Did you add Scaladoc to every public function/method?
  • [ ] Did you update the FIRRTL spec to include every new feature/behavior?
  • Did you add at least one test demonstrating the PR?
  • Did you delete any extraneous printlns/debugging code?
  • Did you specify the type of improvement?
  • Did you state the API impact?
  • Did you specify the code generation impact?
  • Did you request a desired merge strategy?
  • Did you add text to be included in the Release Notes for this change?

Type of Improvement

  • bug fix

API Impact

Extends the API for accepted async literal reset values. In particular, this makes it possible to define AsyncReset registers of non-UInt type in Chisel 😶

Backend Code Generation Impact

None

Desired Merge Strategy

Don't care

Release Notes

Support cast literals as async reset values

Reviewer Checklist (only modified by reviewer)

  • Did you add the appropriate labels?
  • Did you mark the proper milestone (1.2.x, 1.3.0, 1.4.0) ?
  • Did you review?
  • Did you check whether all relevant Contributor checkboxes have been checked?
  • Did you mark as Please Merge?

Chisel emits all literals as UInts cast to the correct type, make
CheckResets support casts when checking that async reset registers are
reset to literal values.
case Some(other) => findDriver(drivers)(other)
case None => expr
}
@tailrec
Copy link
Member

Choose a reason for hiding this comment

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

Nice @tailrec.

@seldridge seldridge added bugfix Please Merge Accepted PRs that are ready to be merged. Useful when waiting on CI. labels Apr 14, 2020
@mergify mergify bot merged commit f8546a7 into master Apr 14, 2020
mergify bot pushed a commit that referenced this pull request Apr 14, 2020
Chisel emits all literals as UInts cast to the correct type, make
CheckResets support casts when checking that async reset registers are
reset to literal values.

Co-authored-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
(cherry picked from commit f8546a7)
@mergify mergify bot added the Backported This PR has been backported to marked stable branch label Apr 14, 2020
@albert-magyar albert-magyar deleted the fix-async-reset-casts branch April 14, 2020 07:51
mergify bot added a commit that referenced this pull request Apr 14, 2020
* Allow casts in AsyncReset literal value check (#1523)

Chisel emits all literals as UInts cast to the correct type, make
CheckResets support casts when checking that async reset registers are
reset to literal values.

Co-authored-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
(cherry picked from commit f8546a7)

* Remove intervals test

Co-authored-by: Jack Koenig <koenig@sifive.com>
@johnsbrew
Copy link
Contributor

#1045
3:)

@jackkoenig
Copy link
Contributor Author

😜

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Backported This PR has been backported to marked stable branch bugfix 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.

3 participants