RTL Studio Open IDE

Bus Interfaces

APB3 Master (Single-Transaction Pipeline)

APB3 master with setup/access phases and one outstanding transaction.

About this block

Simulate it in the Verilog IDE

Hardsystemverilogsimsyn

APB3 Master (Single-Transaction Pipeline) 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 module implements a non-blocking APB3 master that issues a single PWRITE or PREAD transaction per 'start' pulse. It waits for PREADY from the slave and returns status via 'done' and 'rdata'. The design is fully synthesizable, latch-free, and compliant with APB3 protocol specifications. It is suitable for simple peripheral control where transaction pipelining is not required.

This IP provides a simple, reliable APB3 master for single-transaction operations. It is ideal for systems where simplicity and low resource usage are prioritized over throughput. The clear state machine and explicit handshaking signals make it easy to integrate. Integrators should ensure their slaves respond correctly to PREADY to avoid deadlocks.

  1. Choose Open in IDE. RTL Studio loads the packaged workspace for APB3 Master (Single-Transaction Pipeline).
  2. Read the SystemVerilog module in the editor. The catalog line for this block: APB3 master with setup/access phases and one outstanding transaction.
  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.

Features

  • Single-transaction pipeline with no internal buffering.
  • Non-blocking operation with explicit 'start' and 'done' handshaking.
  • Full APB3 protocol compliance including PSEL1, PENABLE, PWRITE, PADDR, PWDATA, and PRDATA.
  • Monitors PSLVERROR from the slave interface.
  • Supports configurable address and data widths via parameters.

Ports

Port NameDirectionWidthDescription
clkInput1Clock input
rst_nInput1Active-low reset input
startInput1Transaction start pulse
pwriteInput1Write direction control
paddrInputADDR_WIDTHTarget address
pwdataInputDATA_WIDTHWrite data
pselInput1Peripheral select (always 1 for this master)
pstrbInputDATA_WIDTH/8Byte strobes
doneOutput1Transaction complete signal
rdataOutputDATA_WIDTHRead data from slave
pslverrorOutput1Slave error status
psel1Output1APB3 PSEL1 signal

Architecture

The master operates in three states: IDLE, SETUP, and ACCESS. It latches transaction parameters upon receiving a 'start' pulse in the IDLE state. During the SETUP phase, it drives address and data while waiting for PREADY. Once PREADY is asserted, it transitions to the ACCESS phase to complete the handshake. The master returns to IDLE when the transaction is fully acknowledged.

Verification

The testbench verifies basic write, read, delayed responses, and error handling. All test cases pass with zero errors in the simulation log. Verilator is used as the simulation engine for fast compilation and execution.

Test CaseDescriptionResult
TC1Basic Write TransactionPASS
TC2Basic Read TransactionPASS
TC3Back-to-Back with PREADY=0PASS
TC4Idle State CheckPASS
TC5Invalid Address HandlingPASS
TC6Multiple TransactionsPASS
TC7PSLVERROR CheckPASS

More in Bus Interfaces

All Bus Interfaces blocks