APB Series — APB-05: Error Response — VLSI Trainers
APB Series · APB-05

Error Response — PSLVERR

When PSLVERR is valid, what it means for write and read transfers, the precise validity window, register update behaviour on error, and how APB errors map to AXI and AHB error responses.

📋 What PSLVERR Is

PSLVERR (Peripheral Slave Error, or Transfer Error in APB5 terminology) is an optional 1-bit signal driven by the Completer. When asserted HIGH at the completion of a transfer, it signals that the transfer completed with an error condition — the Completer could not successfully execute the requested read or write.

PSLVERR is an APB3 feature. APB2 has no error reporting mechanism — any error is silently discarded and the initiating system bus receives a normal (success) response. APB3 and later allow peripherals to propagate errors back to the system.

PSLVERR = 1 does not mean the transfer was aborted. The transfer completed — it ran through the full Setup + Access cycle and PREADY was asserted. PSLVERR is sampled at exactly the same moment as the data (PRDATA on a read). It is an outcome indicator, not an abort signal.

Common causes of PSLVERR:

The Validity Window

PSLVERR has a very precise validity rule in the spec:

PSLVERR is only valid when PSELx=1, PENABLE=1, and PREADY=1 simultaneously. Its value at any other time must be completely ignored by the Requester.
PSLVERR Validity Condition PSELx = 1 Transfer in progress AND PENABLE = 1 Access phase active AND PREADY = 1 Transfer completing PSLVERR valid — Requester checks this value
Figure 1 — PSLVERR is only valid at the transfer completion cycle, when all three conditions are simultaneously true. On all other cycles its value is undefined and must be ignored.

The spec also recommends (but does not require) that PSLVERR is driven LOW when PSELx, PENABLE, or PREADY are LOW. This makes simulation traces cleaner and prevents misleading PSLVERR glitches from being confused with error conditions. Peripherals without PSLVERR support tie the signal permanently LOW — the Requester sees a constant “no error” indication.

Failing Write Transfer

A write transfer that completes with PSLVERR=1 proceeds through exactly the same phases as a successful write — Setup, then Access (with any number of wait states). The only difference is that PSLVERR is asserted at the completion cycle alongside PREADY.

T0 T1 T2 T3 T4 T5 SETUP ACCESS + 1 wait state PCLK PADDR PWRITE PSELx PENABLE PWDATA PREADY PSLVERR Addr 1 Data 1 PSLVERR=1 with PREADY=1 → ERROR
Figure 2 — Failing write transfer. The transfer proceeds normally through Setup and Access phases (with one wait state). At T4, PREADY and PSLVERR are both asserted simultaneously — the transfer completes with an error. The Requester notes the error and maps it to the system bus error response.

Key observations from the failing write timing:

Failing Read Transfer

A read error follows the same pattern as a write error. PSLVERR is asserted alongside PREADY at the completion cycle. Additionally, PRDATA is driven by the Completer at completion — but on an error, that data is invalid.

T0 T1 T2 T3 T4 T5 SETUP ACCESS + wait state PCLK PADDR PWRITE PSELx PENABLE PRDATA PREADY PSLVERR Addr 1 LOW = Read PRDATA invalid (error) PSLVERR=1 → read data invalid
Figure 3 — Failing read transfer. PRDATA is driven but contains invalid data (hatched region). PSLVERR is asserted at T4 alongside PREADY. The Requester samples PRDATA at T4 but the PSLVERR flag tells the system bus that the data is not valid — the AXI/AHB bridge will return an error response to the initiator.
On a read error, PRDATA may contain anything. The spec explicitly states: “Read transactions that receive an error can return invalid data. There is no requirement for the peripheral to drive the data bus to all 0s for a read error.” The Requester must not use PRDATA if PSLVERR=1 — but the spec also notes the Requester may still use it. The Completer cannot rely on PSLVERR to prevent the Requester from reading PRDATA.

📋 Register Update Behaviour on Error

One of the most important — and most misunderstood — aspects of PSLVERR is what happens to the peripheral’s internal state when an error occurs.

Write error — was the register updated?

The spec states: “Transactions that receive an error might or might not have changed the state of the peripheral. This is peripheral-specific and either state is acceptable.”

This means:

Furthermore: “When a write transaction receives an error, this does not mean that the register within the peripheral has not been updated.” This is counterintuitive — many developers assume an error means the write failed. With APB, that assumption is wrong.

Always read back after a write error if state correctness matters. If your driver handles PSLVERR=1 on a write and needs to know the actual register state, it must issue a follow-up read. Do not assume the write either succeeded or failed.

Read error — is the data valid?

Similarly: a read error does not guarantee the data is invalid. The spec says the Requester may still use PRDATA from a read that received PSLVERR=1. The peripheral cannot prevent the Requester from using the data by asserting PSLVERR — that flag is purely informational for the higher-level bus protocol.

In practice, most system designs treat any PSLVERR=1 as a fatal error for that transfer and do not use the returned PRDATA. But this is a software convention, not an APB protocol requirement.

PSLVERR Behaviour Summary — What the Spec Guarantees Write + PSLVERR=1 ✗ Register update: MAY or MAY NOT have occurred ✗ Cannot determine outcome without read-back ✓ Transfer still completed (PREADY was asserted) ✓ System bus receives error response (BRESP/HRESP) Read + PSLVERR=1 ✗ PRDATA: invalid — do not use without checking PSLVERR ✗ No requirement to drive PRDATA=0 on error ✓ Transfer still completed (PREADY was asserted) ✓ System bus receives error response (RRESP/HRESP)
Figure 4 — PSLVERR behaviour guarantees for write and read errors. Note that in both cases the transfer technically completed — PSLVERR is an outcome indicator, not an abort mechanism.

📋 Mapping to AXI and AHB

The APB bridge translates PSLVERR to the appropriate error response on the system bus side. The spec defines these mappings explicitly:

Source busTransfer typeAPB error signalSystem bus responseResponse value
AXI to APB bridge Read PSLVERR=1 RRESP[1:0] 2'b10 = SLVERR
Write PSLVERR=1 BRESP[1:0] 2'b10 = SLVERR
AHB to APB bridge Read or Write PSLVERR=1 HRESP 1'b1 = ERROR

The bridge must:

AXI DECERR vs SLVERR. AXI defines two error types: DECERR (decode error — the address doesn’t map to any peripheral) and SLVERR (slave error — the peripheral signalled an error). APB PSLVERR maps to SLVERR, not DECERR. If the bridge itself cannot decode the address (no PSELx asserted), that maps to DECERR and PSLVERR is never involved.

📋 Implementation Notes

Peripherals that do not implement PSLVERR

PSLVERR is optional. A peripheral that has no error reporting capability simply does not have the signal on its port. The APB bridge ties the PSLVERR input for that slot to 1’b0 (logic LOW). This means the bridge always sees “no error” for that peripheral — which is correct since the peripheral has no way to detect or report errors.

When to assert PSLVERR

PSLVERR is asserted simultaneously with PREADY on the transfer completion cycle. The peripheral cannot signal a “deferred” error — once PREADY is asserted, the transfer is done. If the peripheral needs to report an error it must do so in the same cycle as PREADY.

The recommended (not required) behaviour is to drive PSLVERR LOW when PSELx, PENABLE, or PREADY are LOW. This means:

Detecting unimplemented address ranges

A common use of PSLVERR is for address decode errors within a peripheral. When a peripheral has a 4 KB address window but only implements 16 registers, accesses to the unimplemented portion of its window should return PSLVERR=1. This is better than silently returning garbage data, which would be indistinguishable from a valid register value.

Typical peripheral implementation pattern:
assign PSLVERR = PSELx & PENABLE & PREADY & addr_decode_error;
where addr_decode_error is HIGH when PADDR falls outside the implemented register range. This ensures PSLVERR is only asserted at completion and only for invalid addresses.

📋 Quick Reference

ItemRule
PSLVERR introduced inAPB3 — not available in APB2
SourceCompleter (peripheral) — driven to Requester (bridge)
Width1 bit
Valid whenPSELx=1 AND PENABLE=1 AND PREADY=1 — the completion cycle only
Ignored whenAny of PSELx, PENABLE, PREADY are LOW — value is undefined and must be ignored
Recommended drive when not validDrive LOW (not required, but strongly recommended)
Peripheral without PSLVERRTie PSLVERR input at bridge to 1’b0
Write + PSLVERR=1Register may or may not have been updated — peripheral-specific, either is allowed
Read + PSLVERR=1PRDATA is invalid — no requirement to drive 0 on error
AXI write error mappingBRESP = 2’b10 (SLVERR)
AXI read error mappingRRESP = 2’b10 (SLVERR)
AHB error mappingHRESP = 1’b1 (ERROR) for two cycles
PSLVERR vs DECERRPSLVERR → SLVERR. Address decode failures at the bridge → DECERR. They are different.
Typical use casesWrite to read-only register, access to unimplemented address, protection violation, peripheral internal error
Driver advice on write errorRead back the register if state correctness matters — do not assume the write failed or succeeded
Scroll to Top