prim_apb_arb

Arbitrate MASTER_NUM APB masters onto one slave port.

Register every master's request, pick one with a fair round-robin prim_fair_rr_arb, and replay it on the registered slave port; forward every address without decoding. When SIM_APB_ARB is defined, splice a test master in at the highest index. Grant one master at a time and steer the slave response back to that master through a register stage. Mask the master just served for one cycle after its response so its still-asserted PSEL and PENABLE do not start a second transfer.

Parameters

Table 1. Parameters
NameTypeDefaultDescription
ADDR_WIDTHint unsigned32APB address width.
DATA_WIDTHint unsigned32APB data width.
MASTER_NUMint unsigned8Number of APB master ports.
SLAVE_ADDR_STARTbit [31:0]32'h0000Declared but unused; no address decoding.
SLAVE_ADDR_ENDbit [31:0]32'h1000Declared but unused; addresses reach the slave port unchecked.
DataStrbWidthint unsignedDATA_WIDTH / 8Write-strobe width from DATA_WIDTH.

Ports

Table 2. Ports
NameDirectionTypeDescription
clk_iinputlogicAPB clock.
rst_niinputlogicActive-low reset, sampled synchronously; clears requests and controls, while datapath registers are not reset.
mst_psel_iinputlogic [MASTER_NUM-1:0]APB master PSELs.
mst_penable_iinputlogic [MASTER_NUM-1:0]APB master PENABLEs; a master requests once its PSEL and PENABLE are both high.
mst_paddr_iinputlogic [MASTER_NUM-1:0][ADDR_WIDTH -1:0]APB master PADDRs.
mst_pwrite_iinputlogic [MASTER_NUM-1:0]APB master PWRITEs.
mst_pwdata_iinputlogic [MASTER_NUM-1:0][DATA_WIDTH -1:0]APB master PWDATAs.
mst_pstrb_iinputlogic [MASTER_NUM-1:0][DataStrbWidth -1:0]APB master PSTRBs.
mst_prdata_ooutputlogic [MASTER_NUM-1:0][DATA_WIDTH -1:0]APB master PRDATAs.
mst_pready_ooutputlogic [MASTER_NUM-1:0]APB master PREADYs.
mst_pslverr_ooutputlogic [MASTER_NUM-1:0]APB master PSLVERRs.
slv_psel_ooutputlogicAPB slave PSEL.
slv_penable_ooutputlogicAPB slave PENABLE.
slv_paddr_ooutputlogic [ADDR_WIDTH -1:0]APB slave PADDR.
slv_pwrite_ooutputlogicAPB slave PWRITE.
slv_pwdata_ooutputlogic [DATA_WIDTH -1:0]APB slave PWDATA.
slv_pstrb_ooutputlogic [DataStrbWidth -1:0]APB slave PSTRB.
slv_prdata_iinputlogic [DATA_WIDTH -1:0]APB slave PRDATA.
slv_pready_iinputlogicAPB slave PREADY.
slv_pslverr_iinputlogicAPB slave PSLVERR.