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.
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.
'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