APB Protocol: PSel and PEnable signal dependencies.

Hello All,

This is the first time I'm developing an APB slave. I have some doubts related to APB Protocol. There are three phases such as IDLE, SETUP, and ACCESS as per the state diagram given in the APB spec, but when I want to make a state diagram based on waveform some doubts arise in my mind.

Four combinations are generated based on two input signals and each state has this four-combination logic. I consider four states: IDLE, SETUP, ACCESS, and ERROR.

Current_State PSel PEnable Next_State
IDLE 0 0 IDLE
0 1 ERROR
1 0 SETUP
1 1 ERROR
SETUP 0 0 IDLE
0 1 ERROR
1 0 SETUP
1 1 ACCESS
ACCESS 0 0 IDLE
0 1 ERROR
1 0 SETUP
1 1 ?
ERROR 0 0 IDLE
0 1 ?
1 0 ?
1 1 ?

In ACCESS Current_State, when PSel = 1 and PEnable = 1, then what is the Next_State?

In ERROR Current_State:

PSel = 0 and PEnable = 1,

PSel = 1 and PEnable = 0,

PSel = 1 and PEnable = 1, then which Next_State should I consider for these three combinations?

I know these might be simple doubts, but please help me to clarify these doubts ASAP.

Thanks & Regards,

P.Ksagar