Cross coverage
- Cross Coverage is specified between the cover points or variables
- Expressions cannot be used directly in a cross; a coverage point must be explicitly defined first
Types of constraints
- Constraint Block, External Constraint Blocks and Constraint Inheritance
- Inside Operator
- Weighted Distribution
- Implication Operator and if-else
- Iterative in Constraint Blocks (foreach constraints)
- Disable Constraint
- Static Constraints
- In line Constraints
- Functions in Constraints
- Soft Constraints
- Unique Constraints
- Bidirectional Constraints
- Solve-Before
Interface: modport & clockingblock
Clocking Block
A clocking block must be part of a module or interface.
Nomenclature | Use |
---|---|
clocking event : provides a synchronization reference for DUT and testbench | this part is what enables us to avert race conditions |
clocking signals : to be sampled and driven by the testbench | can be any type: nets and variables |
clocking skew : the timing, relative to the clock event, that the testbench uses to drive and sample those signals | inputs must not have #0 delay, outputs can |
clockvar: cb.signal; not a signal | should only be used with nb assignment <= |
Uses:
- Cycle oriented
- Decoupling Testbench from Signal Details
@(posedge clk)
becomes@cb
- Assuring Race-free Reading of Input Clockvars
cb.clockvar
better accessed@cb
rather than@(posedge clk)
- Features:-
- Inactive-Edge Skew Ex:
output negedge some_signal
default clocking any_name@(posedge sysclk); endclocking
- Inactive-Edge Skew Ex:
ModPorts
- groups and specifies the port directions to the wires/signals declared within the interface
- declared inside the interface with the keyword modport.
- can contain clocking block
- can be made virtual
@ev | wait(ev.triggered) |
---|---|
@ statement should be executed before the trigger | wait can be executed before or after the trigger (but in same time slot) |