Four-phase and two-phase req/ack
Four-phase (return-to-zero)
Every transfer takes four steps: req↑, then ack↑, then req↓, then ack↓. It is slow but very robust, which makes it popular for clock-domain crossings where each side sees the other's signal through a synchronizer.
// requester rules
a_req_hold: assert property (req && !ack |=> req); // keep asking until acknowledged
a_req_wait: assert property (!req && ack |=> !req); // no new request until ack drops
a_data_stable: assert property (req && $past(req) |-> $stable(data));
// responder rules
a_ack_only_req: assert property ($rose(ack) |-> req); // no unsolicited acknowledge
a_ack_hold: assert property (req && ack |=> ack); // hold ack until req drops
a_ack_release: assert property ($fell(ack) |-> !req); // release only after req is goneTwo-phase (transition signalling)
In a two-phase handshake a request is a change of req (either direction), and the acknowledge is a
change of ack. A transfer is pending while req != ack. It needs half the transitions of four-phase,
so it is faster across a slow synchronizer.
wire pending = (req != ack);
a_req_toggle_idle: assert property ($changed(req) |-> $past(!pending)); // one transfer at a time
a_ack_answers: assert property ($changed(ack) |-> $past(pending)); // ack only answers a request
a_data_stable2: assert property (pending && $past(pending) |-> $stable(data));