SVA Sequences IV : Methods

SVA Sequences IV : Methods

Method .triggered

This is built-in method on a sequence . This is a method to break down the complex sequence to simpler sub-sequences. The endpoint of sub-sequence can be detected using the method `triggered`. When method `triggered` is evaluated in an expression, it tests whether its operand sequence has reached its end point at that particular point in time. The result of triggered does not depend upon the starting point of the match of its operand sequence.

sequence seq1; @(posedge clk) a ##1 b ##1 c ##2 d ; endsequence

sequence seq2; @(posedge clk) s1 ##1 s2 ##1 seq1.triggered ##1 s3; endsequence

The above code snippet shows an example for breaking down complex sequence using triggered method. In this example, sequence seq1 must match one clock tick after s2. If triggered is replaced with instance of seq1, a match of seq1 must start one clock tick after s2.