Basics

  • For formal verification to work, it needs to know what is the clock and what is the reset switch, we need to define them explicitly.
  • You define the clock and reset in the tcl shell.
  • one-hot0: where 1 bit is one and all the other bits are zero.
  • cover: cover must show that there must exists at least one state where in something is true (∃).
  • assert: assert must be proven true for every reachable state (∀).
  • There are differnet engines for the proofs that show different things and bounds.

Asserts

  • the operator: |->. It means, on any case where this is high, the other must also be in the same cycle. Notice it doesn’t care about the other if the first is low.
  • the oprator: |=>. It’s the same as the previous just for if it’s high in the current cycle, then the other must be high in the next cycle.
  • system functions: each invocation of them requires synthesizing a shadow flip-flop to cary the data through the cycles. So more invocations mean more differnet states. Therefore it is preferable to put expressions inside of them instead of between multiple incovations of them.
  • For minimal CEX, the starting point is from a reset invocation, from there it’s the minimal number of cycles to produce the CEX.
  • Counting cycles: The reset at the start of the run is counted as one cycle. So we practicaly start counting from 1 cycles.
  • Creating asserts: When thinking of a way to assert something -> remember that if for example the condition in which to check if a @posedge, then the same thing is always evaluated at every edge, that includes when you use |=>, meaning you evaluate and check the previous one also on every single edge.