Hi,
In AMBA AHB:-
For two clock cycle SPLIT or RETRY response, hgrant must be low after 1st clock cycle of SPLIT or RETRY response.
q) For two clock cycle ERROR response, is it mandatory of hgrant must be low after 1st clock cycle of ERROR response?
q) May i know the state(low/high) of hgrant signal in two clock cycle response?
q) If i want to continue the remaining transfers after receiving ERROR response of a burst, is it necessary to rebuild the transaction or not?
q) with out of rebuild transaction, is it possible to continue the transfers w.r.to ERROR response?
Hello Yasuhiko Koumoto.
I agree that the protocol states "can" in this section, which certainly isn't a "MUST", but if the arbiter DOES NOT de-assert HGRANT as I described, the bus will not function as the protocol intends.
Section 3.9.5 "Split and retry" states "For a SPLIT transfer the arbiter will adjust the priority scheme so that any other master requesting the bus WILL get access", and later in the same section that the SPLIT transfer "has the advantage that it completely frees the bus for use by other masters". For RETRY the same statements are made regarding higher priority masters gaining access to the bus.
If the arbiter does not de-assert HGRANT in the second cycle of the 2 cycle SPLIT response as you are suggesting is allowed, that same master will remain granted for whatever transfer it signals immediately after the mandatory IDLE transfer, and as section 3.9.5 also states that the master "should continue to request the bus and attempt the transfer", you could then see that master re-attempt the SPLIT transfer again before the arbiter finally gets round to correctly de-asserting HGRANT. Not quite so critical for RETRY responses as the original master can still remain granted under some circumstances, but the intention of the protocol is not if higher priority masters are waiting to use the bus.
So my reply to "pkoti0583" is an accurate description of what MUST happen in the arbiter when SPLIT or RETRY responses are returned, in order for the arbiter to work correctly such that the slave's intentions of the SPLIT or RETRY responses are implemented, allowing other masters to access the bus in preference to the current master re-attempting the failed access.
Your description of what an "abnormal" arbiter could do is technically what the use of "can" in the protocol might allow, but to allow this "abormal" behaviour means you do not implement a SPLIT or RETRY correctly if the same master is left able to repeat the same access, and so defeats the point of the slave having returned the SPLIT or RETRY response.
Interpretting this 3.12.4 timing on when HGRANT changes in response to a SPLIT or RETRY as a "MUST" rather than "can" avoids any problems, and is what the protocol should have stated in my opinion.
My original reply stating "MUST" as the requirement is trying to avoid "pkoti0583" (or anyone else) designing a bad arbiter. Any attempt at justifying the use of "can" here will only lead to bad designs.
JD
Hi JD,
if the arbiter DOES NOT de-assert HGRANT as I described, the bus will not function as the protocol intends.
I think so, too. But I think it might be OK because the dead lock would not occur although it would against the protocol intention.
The slave which had issued SPLIT response would issue the same response if the accessing master is the same as the previous one.
However, the slave finally will issue OK or ERROR response for the master after issuing SPLIT several times if the HGRANT kept asserted.
My opition is only that a master or a slave should be designed under the expectation or assumption that an arbiter would de-assert HGRANT in the case of receiving SLPIT or RETRY.
Best regards,
Yasuhiko Koumoto.
Hello Yasuhiko Koumoto
We are straying away from pkoti0583's original question relating to ERROR responses, and instead are looking only at SPLIT and RETRY responses which in my experience very few designers even consider, never mind actually implement, especially not now that AHB-lite is more commonly used. So I will post a final reply to try to explain why I believe "MUST" is the requirement, and then you can end with a final closing comment on "CAN" if you still believe an arbiter can be implemented that way.
I understand what you are describing, and it does agree with what the loose wording in that section of the protocol allows, but it just results in more complex slave designs, and less efficient use of the available bus bandwidth, and isn't what was intended.
By your description the slave now has to be able to respond if it gets a second (or possibly more) repeat of the previously SPLIT transfer, whereas it shouldn't have to if the arbiter is designed correctly. There isn't any functional reason why the arbiter is not able to change HGRANT when it samples HRESP=SPLIT and HREADY=0, that way ensuring that the affected master sees it is no longer granted in time to stop it issuing a repeat of the SPLIT transfer after the mandatory IDLE transfer, so the slaves should not have to consider this possibility.
Plus a comment from another section of the protocol, section 3.12.2 "Multiple split transfers" where it states "The bus protocol only allows a single outstanding transaction per bus master". By remaining granted as you describe, the master that has received an uncompleted SPLIT response (no corresponding HSPLIT pulse) now starts a second transaction on the bus (I agree it is a repeat of the previous failed access, but it is still another transaction), and so does not comply with this section of the protocol. Therefore it cannot be allowed by the arbiter.
As they would say in a TV courtroom drama, "I rest my case"