Skip to content

Conversation

@maartenboersma
Copy link
Contributor

This replaces PR2711 which seems to be abandoned. I cherry-picked that commit and enhanced it.

Contributor Checklist

  • 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 request a desired merge strategy?
  • Did you add text to be included in the Release Notes for this change?

Type of Improvement

  • Feature (or new API)
  • Documentation or website-related

Desired Merge Strategy

  • Squash: The PR will be squashed and merged (choose this if you have no preference).

Release Notes

Can call PopCount.greaterThan(n), PopCount.equalTo(n), PopCount.atLeast(n). If n is such that it allows for optimization, the generated circuitry is cheaper and faster compared to "first PopCount, then compare".

Reviewer Checklist (only modified by reviewer)

  • Did you add the appropriate labels? (Select the most appropriate one based on the "Type of Improvement")
  • Did you mark the proper milestone (Bug fix: 3.6.x, 5.x, or 6.x depending on impact, API modification or big change: 7.0)?
  • Did you review?
  • Did you check whether all relevant Contributor checkboxes have been checked?
  • Did you do one of the following when ready to merge:
    • Squash: You/ the contributor Enable auto-merge (squash) and clean up the commit message.
    • Merge: Ensure that contributor has cleaned up their commit history, then merge with Create a merge commit.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Aug 8, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@jackkoenig
Copy link
Contributor

@maartenboersma can you run ./mill __.reformat (mentioned here: https://github.com/chipsalliance/chisel/blob/main/CONTRIBUTING.md#formatting). I tried doing it and pushing but I don't have write access to the fork (fair).

@jackkoenig jackkoenig added the Feature New feature, will be included in release notes label Aug 11, 2025
Copy link
Contributor

@jackkoenig jackkoenig left a comment

Choose a reason for hiding this comment

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

I want to tweak the test a little but that's separate from this PR which is tested well IMO.

@jackkoenig jackkoenig enabled auto-merge (squash) August 11, 2025 18:30
@jackkoenig jackkoenig merged commit b35f68a into chipsalliance:main Aug 11, 2025
15 of 16 checks passed
@jackkoenig jackkoenig mentioned this pull request Aug 11, 2025
16 tasks
@oharboe
Copy link
Contributor

oharboe commented Aug 30, 2025

@ollef FYI

image

@maartenboersma maartenboersma deleted the popcount_compare branch September 29, 2025 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature New feature, will be included in release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants