I came across this assertion in a book where the requirement was : When burst mode (bmode) is asserted oe and dack must be found asserted after 2 clocks ; oe and dack must remain asserted for minimum of 4 clocks after both are found asserted and the bmode must remain deasserted while the oe and dack is high
Question : I want to learn how do I modify the same without using the throught operator
//Solution explained using throught
sequence data transfer;
##2 ((dack ==1) && (oe==1))[*4]; //After 2 cycles the oe and dack are high for 4 cycles continuous
endsequence
sequence checkbmode;
(!bmode) throught data_transfer; //Making sure that bmode is not high while oe and dack are high
endsequence
property pbrule1;
@(posedge clk) $fell(bmode) |-> checkbmode;
endproperty
In reply to CPU_Verif:
The solution explained in the book is incorrect because it does not meet the following requirement:
“Making sure that bmode is not high while oe and dack are high”
What it does instead is:
“Making sure that bmode is not high for 2 cycles and then when oe and dack are high”
Below are my untested changes
//Solution explained using throught
sequence data transfer; // 6 cycles in length
##2 ((dack ==1) && (oe==1))[*4];
//After 2 cycles the oe and dack are high for 4 cycles continuous
endsequence
sequence checkbmode;
(!bmode) throughout data_transfer;
//Making sure that bmode is not high for 2 cycles and then when oe and dack are high
endsequence
//Making sure that bmode is not high for 2 cycles and then when oe and dack are high
@(posedge clk) $fell(bmode) |-> checkbmode;
endproperty
//Making sure that bmode is not high only when oe and dack are high
// In other words, (dack==1 && oe==1 && !bmode)[*4];
property pbrule1a; // simplified to
@(posedge clk) $fell(bmode) |-> ##2 (dack==1 && oe==1 && !bmode)[*4];
endproperty
property pbrule1b;
@(posedge clk) $fell(bmode) |-> ##2
(dack ==1 && oe==1[*4] intersect !bmode[*4]);
endproperty
//Making sure that bmode is not high for 2 cycles and then when oe and dack are high
endsequence
property pbrule1c;
@(posedge clk) $fell(bmode) |-> (##2 dack==1 && oe==1[*4]) intersect !bmode[*6]; // 6 cycles total
endproperty
Thanks Ben for your help. I agree with intersect solution
//Making sure that bmode is not high for 2 cycles and then when oe and dack are high
endsequence
property pbrule1c;
@(posedge clk) $fell(bmode) |-> (##2 dack==1 && oe==1[*4]) intersect !bmode[*6]; // 6 cycles total
endproperty
Seq 1 intersect seq 2 => two sequences start at the same time and end at the same time. satisfies my condition here .
May I please know if we can write the same without using intersect , that is using [*] only