M
MJ
Guest
Hello guys,
I have one doubt regarding FSM modeling.
In the APB specification, it is given that the minimum no. of cycles required for the completion is two cycles. However, if you model acc. to the FSM given in the spec, it will take three cycles i.e., using three states(IDLE, SETUP , ACCESS).
since we write State memory as
always@(posedge clk)
begin
if(reset)
state <= IDLE;
else
state <= nextstate;
end
For ex if it is in the IDLE state once PSEL,PWRITE and PADDR are asserted in the same cycle it wont change the state right. It will change to SETUP state in the next clock cycle and in SETUP after PENABLE goes to 1 in the next cycle it will go to ACCESS.
My question is in the above duration it will takes three clock cycles to complete the operation from assertion of PSEL,PWRITE,PADDR.
Then how it will have minimum two clock cycle for the completion of operation?
Also, whenever Penable is asserted it wont enter into ACCESs phase in the same clock cycle, the transistion bw two states requires one clock cycle right?
Please, anyone clear my doubt.
I have one doubt regarding FSM modeling.
In the APB specification, it is given that the minimum no. of cycles required for the completion is two cycles. However, if you model acc. to the FSM given in the spec, it will take three cycles i.e., using three states(IDLE, SETUP , ACCESS).
since we write State memory as
always@(posedge clk)
begin
if(reset)
state <= IDLE;
else
state <= nextstate;
end
For ex if it is in the IDLE state once PSEL,PWRITE and PADDR are asserted in the same cycle it wont change the state right. It will change to SETUP state in the next clock cycle and in SETUP after PENABLE goes to 1 in the next cycle it will go to ACCESS.
My question is in the above duration it will takes three clock cycles to complete the operation from assertion of PSEL,PWRITE,PADDR.
Then how it will have minimum two clock cycle for the completion of operation?
Also, whenever Penable is asserted it wont enter into ACCESs phase in the same clock cycle, the transistion bw two states requires one clock cycle right?
Please, anyone clear my doubt.