AXI vs Wishbone vs APB for Custom FPGA Peripherals
Compare AXI4-Lite, Wishbone B4 and APB for a custom FPGA register block on cost, handshake, bursts and tool support, with a decision table and slave code.

Every custom FPGA peripheral needs a way for the processor to read and write its registers, and the choice of bus decides how much logic you write, which tools connect to it and what you cannot do later. Three buses cover almost every case. AMBA APB is Arm's deliberately minimal peripheral bus. Wishbone is an open specification with no licence, used throughout the open-source FPGA world. AXI4 and its small sibling AXI4-Lite are what the vendor tools and most IP expect. They solve the same problem with different amounts of machinery, so the right choice depends on what sits on the other side of your peripheral, not on which is technically best. This post compares them on the questions that decide a real project, shows the smallest correct slave for APB and Wishbone, and ends with a decision table. It assumes you can write a synchronous Verilog module and have seen a bus handshake before.
What each bus is
APB, the Advanced Peripheral Bus in Arm's AMBA family (the APB4 revision adds protection and byte-strobe signals), is a non-pipelined bus for low-bandwidth peripherals. A transfer has two phases: a setup phase in which the bridge raises PSEL and presents the address and control, then an access phase in which it raises PENABLE, and the slave answers with PREADY. A transfer takes at least two clock cycles and nothing overlaps. It has one master per bus, usually a bridge from a faster bus, and no bursts.
Wishbone, published as the Wishbone B4 specification by the OpenCores project, has a master and a slave interface with a handful of signals: CYC marks a bus cycle, STB marks a data transfer within it, WE selects write, ADR, DAT and SEL carry address, data and byte lanes, and the slave answers with ACK, or optionally ERR or RTY. The classic mode takes one transfer at a time, with at least one clock per transfer when ACK is combinational. A pipelined mode adds a STALL signal and allows several requests in flight. The specification is free to implement and describes interconnect topologies as well as the signals.
AXI4, specified in Arm IHI 0022, uses the five-channel structure described in the earlier post on AXI4 channels: AW, W and B for writes, AR and R for reads. AXI4-Lite is the subset with no bursts, no IDs and a single beat per transfer, intended for control registers. AXI4-Stream is a separate protocol for data flows without addresses.
The same register in each protocol
The smallest useful peripheral is a single read and write control register. Here it is in APB, with PREADY tied high because the register needs no wait states:
module apb_regs (
input wire pclk,
input wire presetn,
input wire psel,
input wire penable,
input wire pwrite,
input wire [3:0] paddr,
input wire [31:0] pwdata,
output reg [31:0] prdata,
output wire pready,
output wire pslverr,
output reg [31:0] ctrl
);
assign pready = 1'b1;
assign pslverr = 1'b0;
always @(posedge pclk) begin
if (!presetn)
ctrl <= 32'd0;
else if (psel && penable && pwrite && paddr[3:2] == 2'd0)
ctrl <= pwdata;
end
always @* begin
prdata = 32'd0;
if (psel && !pwrite && paddr[3:2] == 2'd0)
prdata = ctrl;
end
endmoduleThe write happens in the access phase, when PSEL, PENABLE and PWRITE are all high. The read data is combinational from the address, so the master can sample it at the end of the access phase. That is the whole slave: no state machine, no handshake bookkeeping.
The Wishbone version is nearly as small, but the slave has to produce ACK:
module wb_regs (
input wire clk,
input wire rst,
input wire cyc_i,
input wire stb_i,
input wire we_i,
input wire [3:0] adr_i,
input wire [31:0] dat_i,
output reg [31:0] dat_o,
output reg ack_o,
output reg [31:0] ctrl
);
always @(posedge clk) begin
ack_o <= 1'b0;
if (rst) begin
ctrl <= 32'd0;
end else if (cyc_i && stb_i && !ack_o) begin
ack_o <= 1'b1;
if (we_i && adr_i[3:2] == 2'd0)
ctrl <= dat_i;
dat_o <= (adr_i[3:2] == 2'd0) ? ctrl : 32'd0;
end
end
endmoduleThe !ack_o term stops the slave from accepting the same request twice: the master holds STB high until it sees ACK, and one registered acknowledge keeps that window one cycle long. A registered ACK makes each classic transfer take two clocks. Making ACK combinational on CYC & STB gives one clock but puts the bus logic on the timing path.
The AXI4-Lite version is the longest of the three, because each of the five channels needs its own handshake and the slave must remember an address and data that may arrive on different cycles. A complete register block is the subject of a later post in this cluster, and its size is the honest cost of the protocol.
Comparing them
| Question | APB | Wishbone B4 | AXI4-Lite / AXI4 |
|---|---|---|---|
| Specification | Arm, free to read, covered by Arm terms | OpenCores, open and free | Arm, free to read, covered by Arm terms |
| Minimum cycles per transfer | 2 | 1 with combinational ACK, 2 with registered | more than 2: address, data, then response |
| Bursts | none | optional (registered feedback cycles) | AXI4 only, up to 256 beats |
| Outstanding transactions | none | pipelined mode only | yes, with IDs |
| Signals for a register slave | about 10 | about 10 | 19 for AXI4-Lite |
| Slave logic for one register | smallest | small | largest |
| Vendor IP and tool support | good in Arm systems | open cores, LiteX, Vivado needs a bridge | universal in vendor flows |
| Interconnect generators | bridges from AXI/AHB | many in open-source SoC tools | vendor interconnects, open ones too |
The 19 signals count AXI4-Lite's five channels with their data, address, valid, ready, response and strobe lines. Those numbers describe the interface, not the logic you will write, since a good template removes most of the effort.
How to decide
Use AXI4-Lite when your peripheral will live in a vendor system. Xilinx Zynq, Intel SoC FPGAs and most commercial IP expose AXI to the processor and to the interconnect. A peripheral with an AXI4-Lite slave drops into the block design and gets a generated address map and a driver-friendly interface. You pay in slave logic and then it works everywhere.
Use Wishbone in an open-source or custom SoC. If you are building around a soft core such as those in LiteX, or a design where you control both ends, Wishbone's small interface and free specification make register blocks short, and the bus is easy to simulate by hand. Conversion bridges exist when a Wishbone peripheral has to meet AXI.
Use APB for the slow peripherals behind a bridge. In an Arm-style system, UARTs, timers and GPIO sit behind an AXI-to-APB bridge, and the peripheral implements the simplest interface in the family. If you are writing a reusable peripheral that others will integrate into an Arm-centric flow, APB is the form they expect.
Use AXI4 with bursts only when the peripheral moves bulk data. A DMA engine, a framebuffer reader or a memory controller needs bursts and outstanding reads. A register block never does.
Never mix the protocols inside one peripheral. Write the core logic once with a plain register interface (an address, a write-enable, data in and data out), and wrap it with a thin adapter for each bus. The same core then serves APB, Wishbone and AXI4-Lite, and your testbench for the core does not change when the wrapper does.
What it does not tell you
The comparison above is about the interface. Throughput on a register block is almost never the issue, because processors access registers rarely and one at a time. The real costs are integration effort and the number of cycles your driver spends polling. If a driver polls a status register in a tight loop, the cycles per access matter more than anything on this table, and an interrupt is the better answer on any bus.


