FV Interview Questions (VIII) – What is a Liveness Property?

Designers are typically more familiar with safety properties, whose intention is to check a “bad thing” can never happen. 

For example, in the following safety property, when valid is asserted while ready is low, valid should keep asserted in the very next cycle.

assert property (@(posedge clk) vld & ~rdy |=> $stable(vld));

If valid is deasserted in the next cycle without ready being high in the current cycle, the above safety property will fail.

Liveness properties, on the contrary, are trying to prove the “good thing” will always eventually happen. The power of liveness lies in proving the infinite.

For example, in the following liveness property, when valid is high, ready should eventually be high, such that no deadlock shall happen.

assert property (@(posedge clk) vld |-> s_eventually rdy);

The table below shows a comparison between safety and liveness properties.

Safety PropertiesLiveness Properties
ProofThe “bad thing” must never happenThe “good thing” will always eventually happen
CounterexampleThe “bad thing” can happen; A finite trace shows how that happensThe “good thing” may never happen; An infinite trace shows why
Bounded ProofThe “bad thing” cannot happen for some number of cycles, but it might be possible in a longer traceCurrently no way to reliably infer a partial true result from an undermined liveness proof

In the next post, we will cover how to write efficient liveness properties.

Subscribe

Enter your email to get updates from us. You might need to check the spam folder for the confirmation email.

Leave a comment