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.
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.
Common causes of PSLVERR:
PSLVERR has a very precise validity rule in the spec:
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.
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.
Key observations from the failing write timing:
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.
One of the most important — and most misunderstood — aspects of PSLVERR is what happens to the peripheral’s internal state when an error occurs.
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.
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.
The APB bridge translates PSLVERR to the appropriate error response on the system bus side. The spec defines these mappings explicitly:
| Source bus | Transfer type | APB error signal | System bus response | Response 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:
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.
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:
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.
assign PSLVERR = PSELx & PENABLE & PREADY & addr_decode_error;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.
| Item | Rule |
|---|---|
| PSLVERR introduced in | APB3 — not available in APB2 |
| Source | Completer (peripheral) — driven to Requester (bridge) |
| Width | 1 bit |
| Valid when | PSELx=1 AND PENABLE=1 AND PREADY=1 — the completion cycle only |
| Ignored when | Any of PSELx, PENABLE, PREADY are LOW — value is undefined and must be ignored |
| Recommended drive when not valid | Drive LOW (not required, but strongly recommended) |
| Peripheral without PSLVERR | Tie PSLVERR input at bridge to 1’b0 |
| Write + PSLVERR=1 | Register may or may not have been updated — peripheral-specific, either is allowed |
| Read + PSLVERR=1 | PRDATA is invalid — no requirement to drive 0 on error |
| AXI write error mapping | BRESP = 2’b10 (SLVERR) |
| AXI read error mapping | RRESP = 2’b10 (SLVERR) |
| AHB error mapping | HRESP = 1’b1 (ERROR) for two cycles |
| PSLVERR vs DECERR | PSLVERR → SLVERR. Address decode failures at the bridge → DECERR. They are different. |
| Typical use cases | Write to read-only register, access to unimplemented address, protection violation, peripheral internal error |
| Driver advice on write error | Read back the register if state correctness matters — do not assume the write failed or succeeded |