Documente Academic
Documente Profesional
Documente Cultură
Describe sequences
Uses properties and sequences as main building
blocks
property req_ack;
@(posedge clk) req |=> ack;
endproperty
property req_ack;
@(posedge clk) req |->
ack;
endproperty
clk
req
ack
|=> operator
The |=> operator states that if sequence req
occurs, sequence ack should be true on next
time state
property req_ack;
@(posedge clk) req |=>
ack;
endproperty
clk
req
ack
##(num) operator
req
ack
##[start:end] operator
ack
[*] operator Consecutive Repetition
a[*N] //repeat a, N times consecutively
a ##1 b ##1 b ##1 b ##1 c same as a## 1 b[*3]
##1 c
A[*N:M] // repeat a at-least N and as many as M
times consecutively
The [*(num)] operator states that the sequence
on the right hand of the operator should repeat
property req_ack;
for num clock ticks
req followed by 3
@(posedge clk) req |=> ack[*3];
endproperty cycles of ack
clk
req
ack
$ operator
The $ operator is used to indicate an unbounded
event
a[*N:$] //repeat a unknown number of times
but at least N times
property req_ack;
@(posedge clk) req |=> ack[*2:$];
endproperty
req followed by at
least 2 cycles of ack
clk (may be forever)
req
ack
sequences
Sequences describe a sequence of timed events
synchronous to a reference clock
sequence req_data_finish_seq;
req ##1 data[*2:4] ##2 finish;
endsequence
sequence
start req followed by 2-4
cycles of data
clk
followed (after 2
sequence
req end cycles) by finish
data
finish
sequences (cont)
sequence seq1; sequence seq2;
a ##1 b[*2] ##1 c; d ##2 e;
endsequence endsequence
property p1;
@(posedge clk) seq1 |=> Assertion fired
seq2;
endproperty (checking seq2)
seq1 start |=>
clk
Assertion passed
a
seq1 end
b
seq2 start
c
seq2 end
d
e
-> operator
Example :
clk
c
Concurrent assertions
Example :