chisel icon indicating copy to clipboard operation
chisel copied to clipboard

Combine LTL assert-like intrinsic factories into a single trait

Open fabianschuiki opened this issue 8 months ago • 0 comments

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.

fabianschuiki avatar Feb 20 '25 01:02 fabianschuiki