Advanced Sequence Operators

Moving beyond `|->`. The holy trinity of complex temporal logic: intersect, within, and throughout.

1. intersect (Sync Match)

Matches when two sequences start at the same time AND end at the same time.


// Check that 'burst_write' sequence happens exactly during 'enable_window'
sequence s_burst;
    req ##1 ack ##1 data[*4]; // Length = 6
endsequence
property p_intersect;
    @(posedge clk) start_burst |-> (s_burst intersect enable_window);
endproperty
                            
  • Requirement: Length(Seq1) must equal Length(Seq2).
  • Use Case: Verifying that a packet transfer completes precisely before a timer expires.

2. within (Containment)

Matches if Sequence 1 starts after or with Sequence 2, and ends before or with Sequence 2. S1 is "contained" inside S2.


// 'ack' must arrive somewhere inside the 'request' window
property p_within;
    @(posedge clk) req |-> (ack within (req ##[1:100] done));
endproperty
                            

This is looser than intersect. S2 acts as a container/envelope.

3. throughout (Condition Hold)

Checks that a boolean expression (signal) remains TRUE for the entire duration of a sequence.

Syntax: (Expression) throughout (Sequence)

// 'reset' must remain LOW throughout the entire burst transfer
property p_no_reset_during_burst;
    @(posedge clk) start_burst |-> (!reset_n) throughout (req ##1 ack ##1 data[*4]);
endproperty
                            

Common Mistake

Do not confuse with S1 intersect S2. In throughout, the Left Side is a boolean condition (Signal Level), not a temporal sequence.

Cheat Sheet

Operator Logic Analogy
S1 intersect S2 Start Same, End Same Runners finishing a race exactly together.
S1 within S2 S2 Start <= S1 Start ... S1 End <=S2 End A letter (S1) inside an envelope (S2).
cond throughout S1 cond=True during all S1 Holding your breath (cond) while swimming (S1).