A transfer occurs ONLY when both VALID and READY are High on the same rising clock edge.
The AXI Handshake
The core mechanism of flow control in AXI. Every channel uses the VALID/READY handshake to transfer information.
The Golden Rule
Assertion Rules
Critical Restriction
Once VALID is asserted, it MUST remain asserted until the handshake occurs
(Ready comes High). The Source CANNOT deassert VALID just because Ready is Low.
However, READY can toggle. The Destination can assert Ready before Valid
arrives, or wait for Valid to arrive.
Deadlock Prevention & Verification
To prevent deadlocks, the Protocol specifies dependency rules:
- VALID cannot depend on READY: A Source must not wait for Ready to be High before asserting Valid.
- READY can depend on VALID: A Destination IS allowed to wait for Valid before asserting Ready (though asserting Ready early is better for performance).
// GOOD:
assign VALID = data_available; // Purely internal logic
assign READY = buffer_not_full;
// BAD (Deadlock Risk):
assign VALID = data_available && READY; // Depends on Ready!
Always use Protocol Checkers to catch these violations. A good checker will trigger an error if it sees
READY waiting for VALID across
multiple channels in a loop.
Simulation Failure: The "Polite" Master Bug
A common novice mistake is writing a Master Driver that tries to be "safe" by checking READINESS before sending data.
// Buggy Driver Logic
// Waits for Slave to be Ready first
if (vif.READY == 1'b1) begin
vif.VALID <= 1'b1; // Too polite!
vif.DATA <= req.data;
end
The Failure Mode:
- Scenario A (Fast Slave): Slave asserts
READYby default. The driver sees it, assertsVALID. Transfer happens. (Bug is masked) - Scenario B (Power-Saving Slave): Slave waits for
VALIDto wake up. Master waits forREADY. Result: Deadlock. Both signals stay low forever.