Avalon Memory Mapped read and write pipeline
I need a clarification regarding AMM's pipeline capabilities.
Context:
The Note under the Section 3.5.4.1. "Pipelined Read Transfer with Variable Latency" specifies that if waitrequestAllowance is greater than 0, then the slave must assert waitrequest soon enough to prevent pipeline overflow. In the next Section, 3.5.4.2. "Pipelined Read Transfers with Fixed Latency", the last sentence specifies that if a write command is issued by the master and the slave cannot process it, then it should assert waitrequest in order to stall the write transfer until the slave read pipe is emptied.
Problem:
The problem is when the slave has the waitrequestAllowance property set to be greater than 0(equal to the master's property value) AND it supports only pipelined reads. If a write command is issued while there are still remaining read transfers in the pipe the slave asserts waitrequest in order to stall the master as the protocol specifies. So, the master should wait until the slave read pipe is emptied but, as the master has the property waitrequestAllowance set to be greater than 0, the master would expect the slave to process the write transfer and it may take as good the response that is on the bus at that time, fact that would break the response order rule.
Solutions:
I have found two possible solutions for this problem:
1) The master should be aware of the number of responses that it needs to receive from the slave, fact that would tell the master when the slave finished processing the read transactions from it's pipe. So, with some additional logic, I can ignore the waitrequestAllowance property and stall the master as long as it is needed.
2) If a slave supports pipeline for read transfers, then it must support pipeline for write transfers also, just like in the Burst case.
Which of these solutions is the correct one?