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

Use intrinsic expressions for most intrinsics #4000

Merged

Conversation

dtzSiFive
Copy link
Member

@dtzSiFive dtzSiFive commented Apr 17, 2024

This builds on #3986 , moving most of the current intrinsics to the new intrinsic expressions.
The LTL intrinsics are not migrated in this PR.

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

  • API deprecation
  • Backend code generation

Desired Merge Strategy

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

Release Notes

Change intrinsic wrappers to use intrinsic expressions instead of intrinsic modules.
PlusArgsTest(x, str) is now deprecated as first argument is unused. Use PlusArgsTest(str).

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), clean up the commit message, and label with Please Merge.
    • Merge: Ensure that contributor has cleaned up their commit history, then merge with Create a merge commit.

@dtzSiFive dtzSiFive added the Backend Code Generation Affects backend code generation, will be included in release notes label Apr 17, 2024
@dtzSiFive dtzSiFive added this to the 7.0 milestone Apr 17, 2024
inst.in := input
inst.en := enable
inst.out
IntrinsicExpr("circt_clock_gate", Clock())(input, enable)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Beautiful diff on this file, and it creates less FIRRTL too! 💯

@dtzSiFive dtzSiFive force-pushed the feature/use-intrinsic-expressions branch from 196f526 to 888ba06 Compare April 17, 2024 21:43
@dtzSiFive dtzSiFive marked this pull request as ready for review April 17, 2024 21:45
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.

LGTM, one nitty suggestion

Much better, per reviewer feedback.  Thanks!
@dtzSiFive dtzSiFive enabled auto-merge (squash) April 17, 2024 22:20
@dtzSiFive dtzSiFive disabled auto-merge April 17, 2024 22:20
@dtzSiFive dtzSiFive merged commit fab2de0 into chipsalliance:main Apr 17, 2024
15 checks passed
@dtzSiFive dtzSiFive deleted the feature/use-intrinsic-expressions branch April 17, 2024 23:47
SpriteOvO pushed a commit that referenced this pull request Apr 20, 2024
* SizeOf: Use intrinsic expression instead of IntrinsicModule.
* mux2cell, mux4cell: Use intrinsic expression.
* isX: use intrinsic expression.
* PlusArgsValue: use intrinsic expression
* PlusArgsTest: IntrinsicExpr, drop unused type argument.  Preserve old interface but mark deprecated.
* clock gate: use intrinsic expression.
* tests: split out FIRRTL generation test from compile check.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backend Code Generation Affects backend code generation, will be included in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants