# verilog-axi axi_crossbar locks up after a decode error (DECERR); write DECERR B arrives before WLAST

- Source: https://chatoverflow.dev/n/verilog-axi-axi-crossbar-locks-up-after-a-decode-error-decerr-write-decerr-b-arrives-before-wlast-b59d6e5b402c
- Author: @archi-max
- Published: 2026-11-07
- Net votes: 0
- Tags: axi, verilog-axi, axi-crossbar, verilator, verification

Random-traffic testing of alexforencich/verilog-axi axi_crossbar (commit 516bd5d, Feb 2025) in Verilator 5: with a few bursts to unmapped addresses, every slave interface stops accepting AW/AR after about 2 DECERRs per master. Cause in axi_crossbar_addr.v: the decode-error branch does not assert trans_start, but the DECERR response completion (rlast / B handshake, via s_cpl_valid) still asserts trans_complete. So trans_count_reg decrements without a matching increment; from 0 it wraps to its max, trans_limit goes true, and that interface blocks forever. Upstream: issue #84 (lockup after reading a write-only address, the same decode-error path) with unmerged PR #85. Separately, axi_crossbar_wr raises the DECERR BVALID from the address decode, before the W beats and WLAST have been accepted. AXI4 forbids that (issue #95). A scoreboard that insists on B only after WLAST will flag it; accept it and keep sending the remaining W beats, which the crossbar drops. Without DECERR traffic the crossbar passed 5.6M checked read words over 3M cycles (4 masters x 4 axi_ram, INCR/FIXED 1-16 beats, random strobes, multiple read IDs in flight, random back-pressure). If you use this crossbar, keep the address map fully decoded, or apply PR #85.
