Tutorials

Protocols

Learn More

After a Manager has started a transfer, the selected Subordinate controls how that transfer progresses and completes. The Manager cannot directly cancel a transfer after it has commenced. Instead, it observes the Subordinate response signaling and then decides what to do next.

The response is carried mainly by HRESP and HREADYOUT. In a system with multiple Subordinates, each Subordinate has its own response outputs, and the interconnect multiplexes the selected response back to the Manager as the bus-level response.

For components that support Exclusive Transfers, HEXOKAY is an additional response signal. The main OKAY, pending, and ERROR behavior is still defined by HRESP and HREADYOUT.

HRESP and HREADYOUT

SignalDriven byMeaning
HRESPSelected SubordinateTransfer status: OKAY or ERROR.
HREADYOUTSelected SubordinateIndicates whether the selected Subordinate has completed the current data phase.
HREADYInterconnect or multiplexorSelected ready response returned to the Manager and also supplied to Subordinates for timing.

HRESP has two states:

HRESPResponseMeaning
0OKAYThe transfer has completed successfully, or the Subordinate needs more cycles before it can complete. HREADYOUT tells which one is true.
1ERRORThe transfer has failed and the Manager must be told that the transfer was unsuccessful. The ERROR response is two cycles.

HRESP alone is not the complete response. The complete response is the combination of HRESP and HREADYOUT:

HRESPHREADYOUTComplete meaning
0 OKAY0Transfer pending. The Subordinate needs more cycles.
0 OKAY1Successful transfer completed.
1 ERROR0First cycle of ERROR response.
1 ERROR1Final cycle of ERROR response.

From this table, a Subordinate can respond in three basic ways:

  1. Complete the transfer immediately.
  2. Keep the transfer pending by inserting wait states.
  3. Signal an ERROR response.

Transfer done

A successful completed transfer is indicated when the selected response is OKAY and HREADY is HIGH. In signal terms, this means HRESP=0 and the selected ready response is HIGH.

For a read transfer that completes with OKAY, the selected Subordinate must provide valid HRDATA in the completing data phase. For a write transfer that completes with OKAY, the Subordinate has accepted the write data for that transfer.

Transfer pending

A Subordinate inserts wait states by driving HREADYOUT LOW during the data phase. While the transfer is pending, the response must remain OKAY. The transfer then completes successfully when the Subordinate drives HREADYOUT HIGH with HRESP=0.

Every Subordinate should have a known maximum wait-state behavior so the system can calculate access latency. Long wait-state sequences stall the AHB interface and can affect overall performance.

ERROR response

An ERROR response indicates that the associated transfer failed. Typical examples include a protection violation, an unsupported access, an unmapped access through a default Subordinate, or an attempt to write to a read-only location.

Although an OKAY response can complete in one cycle, an ERROR response requires two cycles:

  1. First ERROR cycle: HRESP is HIGH and HREADYOUT is LOW.
  2. Final ERROR cycle: HRESP remains HIGH and HREADYOUT is HIGH.
ahb-error-response

he two-cycle ERROR response is required because AHB is pipelined. By the time the Subordinate starts returning ERROR, the address for the following transfer has already appeared on the bus. The extra cycle gives the Manager time to cancel that following transfer by driving HTRANS=IDLE before the next transfer starts.

If the Subordinate needs more than two cycles before reporting ERROR, it can insert wait states before the ERROR response. During those initial wait states, the response must remain OKAY. The final two response cycles then carry the ERROR indication.

If a Manager receives ERROR during a burst, it can cancel the remaining burst transfers or continue them. If it cancels, it drives HTRANS=IDLE during the ERROR response. For a read error, the Manager might still observe HRDATA; therefore, a Subordinate must not rely on the ERROR response to prevent the Manager from seeing a value on the read data bus. The specification recommends driving HRDATA to zero for read ERROR responses.

Response signaling checklist

CheckReason
OKAY plus ready HIGH completes successfullyThis is the normal transfer completion condition.
OKAY plus ready LOW means pendingWait states must not be mistaken for ERROR.
ERROR response is exactly the final two response cyclesRequired by AHB pipelining.
Extra delay before ERROR uses OKAY wait statesERROR is only signaled in the two-cycle response.
Manager can drive IDLE after ERRORCancels the following pipelined transfer.
Read data on ERROR is treated defensivelyManager might still sample or observe HRDATA.