APB Interconnect Operations
Based on the APB protocol, a successful APB transfer starts with asserting a group of APB
signals such as PSEL, PWRITE, PADDR,
PWDATA, PWDATA_PAR, PSTRB, and
PSTRB_PAR. The PENABLE signal needs to assert at 1
clock cycle after asserting these signals. All these signals need to maintain their
states throughout the entire transfer. The assertion of PREADY from the
slave indicates that the active APB request is completed and marks the end of the APB
transfer. At the end of the APB transfer, the master needs to de-assert the
PENABLE signal and may change the signal state of
PSEL, PWRITE, PADDR,
PWDATA, PWDATA_PAR, PSTRB, and
PSTRB_PAR for the next APB transfer (or no APB request).
The assertion of apb_eval signal indicates that the APB Interconnect core is in an EVALUATION state, where it
evaluates all available assertions of PSEL from any master. It then
decides and selects which master to be granted the APB request based on the selected
priority.
PENABLE at 1 clock cycle after the assertion of the
master's PSEL, to determine the start of the APB transfer. There are
two situations:- If the granted master's
PENABLEis1, it marks the start of APB transfer, where the APB Interconnect core exits theEVALUATIONstate to enter theTRANSFERstate. Concurrently, thegrant_osignal updates to indicate which master is being granted a request. - If the granted master's
PENABLEis0, there is no APB transfer. Theapb_evalsignal maintains1, but the APB Interconnect core starts to evaluate the master of next priority. If the master of the next priority fulfills thePENABLEcriteria, the APB Interconnect core exits the evaluate state and updatesgrant_o. Otherwise, the APB Interconnect core stays in theEVALUATIONstate and moves to the master of next priority.
The assertion of PREADY from the slave indicates the end of active APB
transfer. If the slave does not assert PREADY, the APB Interconnect core continues to wait since there is no timeout mechanism
in the APB Interconnect core. When this occurs, you may need to reset
this deadlock by asserting the rst_n.