-
Notifications
You must be signed in to change notification settings - Fork 22
TimedCross
The TimedCross is a Cross construct, similar to a CrossPoint, that considers the relation between two ports with a delay. This means that the port values used to consider a cross hit come from two different cycles.
case class TimedCross(name: String, port1: Data, port2: Data)(delay: DelayType)(bins: CrossBin*)Note that, in contrast to a
CrossPointwhich works with any number of ports > 2, aTimedCrossonly functions on two ports. This is due to the fact that it is unclear how to define a delayed relation between > 2 ports.This could be interesting to look into for future work on Timed Coverage.
A delay is defined using a DelayType. There are 3 different types of delays:
-
Eventually: Considers a hit ifport2has a range hit at any point in the given number of cycles afterport1has one. -
Always: Considers a hit ifport2has a range hit every cycle in the given number of cycles afterport1has one. -
Exactly: Considers a hit ifport2has a range hit exactly a given number of cycles afterport1has one.
Concretely, this can be used in Scala with:
case class Eventually(delay: Int)
case class Always(delay: Int)
case class Exactly(delay: Int)Note that the
Neverdelay is only supported for Timed Assertions and doesn't work in the scope of Timed Cross Coverage.
Here is an example of how to define a TimedCross:
TimedCross("timedAB", dut.io.outA, dut.io.count)(Exactly(3))(
CrossBin("ExactlyBoth3", 3 to 3, 3 to 3)),
TimedCross("EventuallyTimedAB", dut.io.outB, dut.io.count)(Eventually(3))(
CrossBin("EventuallyBoth1", 1 to 1, 1 to 1)),
TimedCross("AlwaysTimedAB", dut.io.outC, dut.io.outA)(Always(3))(
CrossBin("AlwaysBoth3", 3 to 3, 3 to 3))The report could then, for example, look like:
=========================================
CROSS_POINT timedAB WITH AN EXACT DELAY OF 3 CYCLES
BIN ExactlyBoth3 COVERING: CROSS(Range 3 to 3, Range 3 to 3) HAS 1 HIT(S) = 100,00%
=========================================
CROSS_POINT EventuallyTimedAB WITH AN EVENTUAL DELAY OF 3 CYCLES
BIN EventuallyBoth1 COVERING: CROSS(Range 1 to 1, Range 1 to 1) HAS 1 HIT(S) = 100,00%
=========================================
CROSS_POINT AlwaysTimedAB WITH AN ALWAYS DELAY OF 3 CYCLES
BIN AlwaysBoth3 COVERING: CROSS(Range 3 to 3, Range 3 to 3) HAS 1 HIT(S) = 100,00%
=========================================
This was the last page on Functional Coverage. Return home.