chipsalliance / chipsalliance/chisel

Combine LTL assert-like intrinsic factories into a single trait

Open
#4,711 0 comments 0 reactions 1 assignee Claimed by @fabianschuiki View on GitHub
Dominant language
Scala
Stars
4.8k
Forks
658
Avg merge
18h 59m
Merged PRs (30d)
14

Description

As discussed in #4681, the LTL assert-like intrinsics all contain the same snippet of code which only differs by the intrinsic name:
```scala
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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.