Checking Multiple Scenarion

Hi, I hope you are doing well.

I’m working on a big project at the moment to build a Verification IP of a protocol. We have a basic scenarios as shown in the picture attached.

Obviously, each message is representing a kind of Primitives that are exchanged in this protocol,to establish a connection. Till now, we have two different scenarios.
I’m wondering if we can check this two scenarios in the same assertion but not necessary with one property in order to have a generic assertion, so we can add others scenarios (if any).
In my method, to detect the Primitives i used a property for each one, after that i used an assertion for each property as shown below.

                      Property Open address frame                          Assertion Open address frame
                      Property Open_Accept                                 Assertion Open_Accept
                      Property RDY                                         Assertion RDY
                      .                                                    .
                      .                                                    .
                      .                                                    .

Then, i used a flag in each assertion.
Firstly, I verify the Open Address Frame, if the assertion is passed the flag goes out and active the next assertion to verify if there is an Open Accept or Open Reject.
Using this methodology the assertions is activated sequentially, so I can not for example verify the Open Accept if there is no Open Address frame in the first place.

Unfortunately this method is too long. and i have to build it for each scenario.

Please if anyone have an idea about others methods give us a feedback.

Regards,
Mourad

'm working on a big project at the moment to build a Verification IP of a protocol. We have a basic scenarios as shown in the picture attached.
Obviously, each message is representing a kind of Primitives that are exchanged in this protocol,to establish a connection. Till now, we have two different scenarios.
I’m wondering if we can check this two scenarios in the same assertion but not necessary with one property in order to have a generic assertion, so we can add others scenarios (if any).
In my method, to detect the Primitives i used a property for each one, after that i used an assertion for each property as shown below.
Property Open_address_frame; Assertion Open_address_frame
Property Open_Accept; Assertion Open_Accept
Property RDY; Assertion RDY
Then, i used a flag in each assertion.
First, I verify the Open_address_frame if the assertion is passed the flag goes out
and active the next assertion to verify if there is an Open_Accept or Open_Reject.
Using this methodology the assertions is activated sequentially,
so I can not for example verify the Open_Accept if there is no Open Address frame in the first place.
Unfortunately this method is too long. and i have to build it for each scenario.
Please if anyone have an idea about others methods give us a feedback.

Am not clear about your statement “this method is too long. and i have to build it for each scenario.” Is your issue how to write the assertions so that the sequence is executed in the order you want? If so, you can use functions and the action block to set enable flags after the sussessful execution of an assertion. For example:

 
module async_fifo2; 
	bit[0:31] enables;
	bit clk, a, b;
	let CONDA=0; let CONDB=1; let CONDX=30;
    
  function void setbit(int t); 
  	enables=32'b0; 
  	enables[t]=1'b1; 
  endfunction
  apCONDA: assert property(@(posedge clk) enables[CONDA] |-> a |=> b) setbit(CONDB); 
 endmodule 


Ben Cohen
http://www.systemverilog.us/ ben@systemverilog.us

  • SystemVerilog Assertions Handbook 3rd Edition, 2013 ISBN 878-0-9705394-3-6
  • A Pragmatic Approach to VMM Adoption 2006 ISBN 0-9705394-9-5
  • Using PSL/SUGAR for Formal and Dynamic Verification 2nd Edition, 2004, ISBN 0-9705394-6-0
  • Real Chip Design and Verification Using Verilog and VHDL, 2002 isbn 0-9705394-2-8
  • Component Design by Example ", 2001 ISBN 0-9705394-0-1
  • VHDL Coding Styles and Methodologies, 2nd Edition, 1999 ISBN 0-7923-8474-1
  • VHDL Answers to Frequently Asked Questions, 2nd Edition ISBN 0-7923-8115