The AMBA APB v2.0 bus protocol - commonly referred to as APB4 - defines a low-cost interface that is optimized for minimal power consumption and reduced interface complexity. To enable a single APB4 Master to communicate with multiple APB4 Slaves (Peripherals) via a common bus, certain signals require multiplexing – the Roa Logic APB4 Multiplexer is a fully configurable & parameterized IP to provide this functionality as shown below:
Full support for APB version 2.0 (APB4) protocol
Fully parameterized IP with:
User Configurable number of peripherals supported
User Configurable address and data widths
Support for user defined address mapping per peripheral
The Roa Logic APB4 Multiplexer is a highly configurable, fully parameterized soft IP to enable a single APB4 based Master (Host) to communicate with multiple APB4 Slaves (Peripherals). It is fully compliant with the AMBA APB v2.0 bus protocols.
The IP contains a single Master Interface to connect to the APB4 Host, and a user defined number of Slave Interfaces.
The multiplexer functions as follows:
Transactions on the APB4 Bus are decoded by matching addresses on the APB4 address bus to an address map defined by the
SLV_MASK[n] inputs of the multiplexer
Communication with a peripheral is enabled by asserting the appropriate
SLV_PSEL[n] output signal based on the address mapping (See section 4.3.1)
Peripheral-specific control signals
SLV_READY[n], together with the Read Data Bus signals
SLV_PRDATA[n] during a read transaction, are then multiplexed back to the Master Interface.
The APB4 Multiplexer Master Interface consists of the following subset of APB4 bus signals:
PSEL inputs to enable address space decoding
PSLVERR outputs derived from the selected peripheral
PRDATA read data bus output derived from the selected peripheral during a read transaction
All other APB4 bus signals are connected directly to each peripheral
The APB4 Multiplexer generates a user-defined number (‘n’) of Slave Interfaces that consist of the following subset of APB4 bus signals:
PSEL[n] outputs used to select an individual peripheral during a transaction
PSLVERR[n] control signal inputs from each peripheral which are multiplexed as outputs on the Master Interface
PRDATA[n] read data bus inputs from each peripheral which is multiplexed to the Master Interface
Each Slave Port has an Address Base (
SLV_ADDR[n]) and Address Mask (
SLV_MASK[n]) port. Together these set the address range covered by each Slave Port. (See section 4.3.5)
While the Address Base and Address Mask values may be changed dynamically, assigning static values according to a predefined address map is typical.
The Roa Logic APB4 Multiplexer is a fully configurable interconnect IP to enable an APB4 Master to communicate with multiple APB4 slaves (i.e. peripherals). The core parameters and configuration options are described below.
||Integer||8||Number of attached slaves (peripherals)|
||Integer||8||Address Bus Width|
||Integer||8||Read Data Bus Width|
SLAVES parameter specifies the number of slaves (i.e. peripherals) the APB4 Multiplexer will support.
PADDR_SIZE parameter specifies the width of the address bus for the APB4 Interfaces. The Master and all peripherals sharing the APB4 Multiplexer are expected to have the same address width.
PDATA_SIZE parameter specifies the width of the APB4 data bus. This parameter must equal an integer multiple of bytes. The Master and all peripherals sharing the APB4 Multiplexer are expected to have the same data width.
The following common signals are shared between all devices on the APB4 bus.
||1||Input||Asynchronous active low reset|
When the active low asynchronous
PRESETn input is asserted (‘0’), the APB4 interface is put into its initial reset state.
PCLK is the APB4 interface system clock. All internal logic for the APB4 interface operates at the rising edge of this system clock and APB4 bus timings are related to the rising edge of
The APB4 Interface decodes the signaling of an APB4 bus master and therefore implements a subset of a regular APB4 Slave Interface.
||Output||Read Data Bus|
||1||Output||Transfer Error Indicator|
it is selected and a data transfer is pending. This signal drives the APB4 Multiplexer MST_PSEL port and is decoded to select the individual peripheral by asserting the corresponding
MST_PADDR is the APB4 address bus. The bus width is defined by the
PADDR_SIZE parameter and is driven by the APB4 Master.
MST_PRDATA drives the APB4 read data bus. The selected peripheral drives this bus during read cycles, via the APB4 Multiplexer.
The bus width must be byte-aligned and is defined by the
MST_PREADY is driven by the selected peripheral via the APB4 Multiplexer. It is used to extend an APB4 transfer.
MST_PSLVERR indicates a failed data transfer to the APB4 Master when asserted (‘1’) and is driven by the selected peripheral via the APB4 Multiplexer.
The Slave Interface provides the following signals for each individual peripheral. The number of peripherals supported, and therefore instances of the following signals, is controlled by the SLAVES parameter (see section 0).
Note: Each individual port name is referenced by the index ‘n’, where ‘n’ is an integer value in the range 0 to
SLV_PSELThis nomenclature is used throughout this datasheet
||Input||Read Data Bus|
||1||Input||Transfer Ready Input|
||1||Input||Transfer Error Indicator|
||Input||Transfer Ready Input|
||Input||Transfer Error Indicator|
The APB4 Multiplexer generates
SLV_PSEL[n], signaling to an attached peripheral that it is selected and a data transfer is pending.
SLV_PRDATA[n] is the APB4 read data bus associated with the attached peripheral. The peripheral drives this bus during read cycles, indicated when
PWRITE is negated (‘0’), and the data is then multiplexed to the
MST_PRDATA output port.
The bus width must be byte-aligned and is defined by the
SLV_PREADY[n] is driven by the attached peripheral and multiplexed to the
MST_PREADY output port. It is used to extend an APB4 transfer.
SLV_PSLVERR[n] indicates a failed data transfer when asserted (‘1’). As APB4 peripherals are not required to support this signal it must be tied LOW (‘0’) when unused.
SLV_ADDR[n] is the base address where the attached peripheral is to appear in the system memory map. It is bitwise ‘AND’ed with the corresponding address mask
SLV_MASK[n] input to define the overall address range of each peripheral.
As a consequence, these ports are typically assigned hard-coded values rather than connected to other logic in the design.