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

Support Vecs of empty Bundles #2543

Merged
merged 1 commit into from
May 24, 2022
Merged

Conversation

jackkoenig
Copy link
Contributor

Fixes #1953

Contributor Checklist

  • [NA] Did you add Scaladoc to every public function/method?
  • 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 add appropriate documentation in docs/src?
  • 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

It is now possible to create Vecs of empty Bundles

Backend Code Generation Impact

No impact

Desired Merge Strategy

  • Squash

Release Notes

Support creating Vecs of empty Bundles. Hardware components of this type are removed by the time of Verilog emission (similar to components of empty Bundles or zero-width UInts).

Reviewer Checklist (only modified by reviewer)

  • Did you add the appropriate labels?
  • Did you mark the proper milestone (Bug fix: 3.4.x, [small] API extension: 3.5.x, API modification or big change: 3.6.0)?
  • Did you review?
  • Did you check whether all relevant Contributor checkboxes have been checked?
  • Did you mark as Please Merge?

@jackkoenig jackkoenig added this to the 3.4.x milestone May 24, 2022
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

src/test/scala/chiselTests/Vec.scala Outdated Show resolved Hide resolved
@jackkoenig jackkoenig force-pushed the support-vec-of-empty-bundle branch from f3ce3c8 to 38c0f29 Compare May 24, 2022 20:39
@jackkoenig jackkoenig enabled auto-merge (squash) May 24, 2022 20:40
@jackkoenig jackkoenig merged commit a1e3a6b into master May 24, 2022
@jackkoenig jackkoenig deleted the support-vec-of-empty-bundle branch May 24, 2022 21:20
mergify bot pushed a commit that referenced this pull request May 24, 2022
mergify bot pushed a commit that referenced this pull request May 24, 2022
@mergify mergify bot added the Backported This PR has been backported label May 24, 2022
mergify bot added a commit that referenced this pull request May 24, 2022
(cherry picked from commit a1e3a6b)

Co-authored-by: Jack Koenig <koenig@sifive.com>
mergify bot added a commit that referenced this pull request May 25, 2022
* Support Vecs of empty Bundles (#2543)

(cherry picked from commit a1e3a6b)

* Handle differences between Chisel 3.4 and 3.5

Also a minor difference in Scala 2.11

Co-authored-by: Jack Koenig <koenig@sifive.com>
jackkoenig pushed a commit that referenced this pull request Feb 28, 2023
* Parse version and hardcode emitted version

* Throw error if version is too high

* Parse version even if rest is invalid

* Change pattern match to if statement

* Improve version grammar

* Update tests

* Remove outdated comment

* Simplify grammar and use version class

* Simplify and add no version test

* Fix for conflicting lexer rule
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backported This PR has been backported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't have a Vec(new Bundle{}) ?
3 participants