Is it possible to assign a value to a signal in a systemverilog assertion?

Status
Not open for further replies.

iammedjay

Newbie level 1
Joined
Jun 18, 2019
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
11
hi,

I have two sequences, s1 and s2. I have a property that checks these two sequences.
for example,

Code:
sequence s1 
req ##3 gnt;
endseqence

sequence s2
ack;
endsequence

Now I make use of a property for an assertion to check these two sequences.

Code:
property p1;
@(posedge clk) disable iff(reset)
s1 |-> s2;
endproperty

assert property (p1) else $warning("Assertion failed");


Once the property has been asserted successfully, is there a way where I can trigger a signal (say X) HIGH? I want it to trigger HIGH only when the property has been successfully asserted during the rest of the time, I want it to be LOW.

Any suggestions would be of great help, thank you.
 

Surely there exists the equivalent of an IF-THEN-ELSE construct in whatever language you ainre using? That's programming 101.

I notice an 'iff' keyword.? ?
 


this is counter intuitive. assertions are a verification artifact, they should not interfere with the design, nor generate any signals on demand.

- - - Updated - - -

Surely there exists the equivalent of an IF-THEN-ELSE construct in whatever language you ainre using? That's programming 101.

I notice an 'iff' keyword.? ?

you missed the point completely.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…