RTL Studio Open IDE

Bus Interfaces

APB3 Master with Burst Support and Backpressure Handling

A fully compliant APB3 master controller supporting single and burst transactions with auto-increment and backpressure handling.

About this block

Simulate it in the Verilog IDE

Hardsystemverilogsimsyn

APB3 Master with Burst Support and Backpressure Handling is a SystemVerilog reference block in the Bus Interfaces catalog. AXI, APB, Wishbone, and other on-chip bus interface adapters. Marked Hard: a larger reference. Simulate the packaged testbench before you change the RTL.

This IP implements a fully compliant APB3 master controller designed for SystemVerilog environments. It supports single and burst transactions (single, incrementing) with automatic address increment capabilities. The controller robustly handles slave backpressure via the PREADY signal and propagates error conditions through PSLVERR. It is suitable for integration into SoCs requiring reliable, non-blocking APB master functionality with clear status reporting.

The module acts as a bridge between a synchronous control interface and an APB3 slave device. It manages state transitions between IDLE, SETUP, and TRANSFER phases according to the APB3 specification. Key features include:

  • Compliance: Fully adheres to APB3 protocol timing and handshaking.
  • Backpressure Handling: Correctly stalls during PREADY=0 cycles.
  • Burst Support: Supports single transfers and incrementing bursts.
  • Error Reporting: Captures and exposes PSLVERR to the control interface.
  • Auto-Increment: Automatically updates address registers during burst sequences when enabled.
  1. Choose Open in IDE. RTL Studio loads the packaged workspace for APB3 Master with Burst Support and Backpressure Handling.
  2. Read the SystemVerilog module in the editor. The catalog line for this block: A fully compliant APB3 master controller supporting single and burst transactions with auto-increment and backpressure handling.
  3. Run the packaged testbench with the in-browser Verilator simulator, then open the VCD in the waveform viewer.
  4. Run Yosys in the same IDE for a generic netlist. Sky130 liberty mapping is a separate Pro library option.

RTL Studio is the Verilog simulator and IDE around this block: Slang lint, Verilator, VCD waveforms, and Yosys, in the browser. Simulation guide · Yosys guide.

Parameters

ParameterDefaultDescription
ADDR_WIDTH32Width of the address bus.
DATA_WIDTH32Width of the data bus.
STRB_WIDTH4Width of the byte strobe bus (DATA_WIDTH/8).
BURST_MAX_LEN16Maximum burst length supported.

Ports

Port NameDirectionWidthDescription
clkInput1Clock input.
rst_nInput1Active-low reset. Synchronous reset logic is recommended.
PSELOutput1APB Select signal.
PENABLEOutput1APB Enable signal.
PADDROutputADDR_WIDTHAddress bus.
PWRITEOutput1Write control signal (1=Write, 0=Read).
PSTRBOutputSTRB_WIDTHByte strobe mask.
PWDATAOutputDATA_WIDTHWrite data bus.
PREADYInput1Ready response from slave.
PRDATAInputDATA_WIDTHRead data bus.
PSLVERRInput1Error response from slave.
startInput1Transaction start trigger. Must be asserted for at least one clock cycle.

Architecture

The design uses a three-state finite state machine (FSM):

  1. IDLE: Waits for the start signal. Asserts PSEL=0.
  2. SETUP: Asserts PSEL=1 and PENABLE=0. Waits for PREADY=1.
  3. TRANSFER: Asserts PENABLE=1. Waits for PREADY=1 to complete the transfer. If pincren is high, the address is incremented.

### State Diagram

Verification

The testbench covers eight distinct scenarios to ensure robustness:

Test CaseDescriptionResult
TC1Basic WritePASS
TC2Basic ReadPASS
TC3BackpressurePASS
TC4Burst WritePASS
TC5Burst ReadPASS
TC6Error ResponsePASS
TC7Non-sequentialPASS
TC8Mixed BackpressurePASS

Constraints

  • Clock Domain: The module assumes a single clock domain (clk).
  • Reset: Synchronous active-low reset is recommended for reliable initialization.
  • Handshaking: The control interface (start, addr, etc.) is assumed to be synchronized to clk.

More in Bus Interfaces

All Bus Interfaces blocks