Skip to content

Combine LTL assert-like intrinsic factories into a single trait #4711

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

Open
fabianschuiki opened this issue Feb 20, 2025 · 0 comments
Open

Combine LTL assert-like intrinsic factories into a single trait #4711

fabianschuiki opened this issue Feb 20, 2025 · 0 comments
Assignees

Comments

@fabianschuiki
Copy link
Contributor

As discussed in #4681, the LTL assert-like intrinsics all contain the same snippet of code which only differs by the intrinsic name:

private[chisel3] object VerifEnsureIntrinsic {
  def apply(label: Option[String] = None)(prop: Bool, enable: Option[Bool])(implicit sourceInfo: SourceInfo) =
    VerifAssertLikeIntrinsic("ensure", label)(prop, enable)
}

@seldridge suggested to factor this out into a base trait with an abstract def intrinsicName: String that we define in the concrete intrinsic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant