FVO — Formal Verification Online
Lesson 14.3 · Handshakes and Credit-Based Flow Control

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.

0123456789req↑ack↑req↓ack↓clkreqackdataAB
One complete four-phase transfer (A, ticks 1–5) and the start of the next (B).
four-phase checker
// 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 gone

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

0123456789req 1ack 1req 2ack 2clkreqackpending
Two transfers. The second request is a falling edge of req — in two-phase signalling only the change matters.
two-phase checker
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));

Discussion

No comments yet.

Was this page helpful?

Tip: select any text on the page before clicking Report and it will be quoted in your report.