[Libre-soc-dev] Wishbone and House Contract Of Sale Proposition

Richard Wilbur richard.wilbur at gmail.com
Thu Oct 28 18:39:27 BST 2021


On Thu, Oct 28, 2021 at 11:06 AM Andrey Miroshnikov
<andrey at technepisteme.xyz> wrote:
> # Luke's summary of the problem:
> '''
> "i am making an OFFER for you to write.  could you let me know, WITHOUT
> any "commitment", if you COULD fulfil this write?"
> if the answer is "yes, you COULD fulfil it, then let us proceed to
> EXCHANGE where you absolutely must COMPLETE once we have both agreed to"
> this is the kind of protocol needed for caches and for speculative
> execution.
> '''
>
> So the important features are (as far as I understand):
[...]
> 4. If at any point, one of the requesters in the queue cancel the
> request, drop the queue starting from this requester, and any later
> requesters.

Why must we "drop the queue starting from this requester, and any
later requesters" instead of just dropping the cancelled request and
leaving the remainder of the queue intact?

> Scenario 2:
> 1. Master3 decides to cancel the transaction by de-asserting CYC_O while
> the common bus is still busy.
> 2. Arbiter detects a negated CYC_I from Master3, and clears the FIFO
> entries for Master3 and later. This causes Master3 and Master1 to lose
> their place in the queue.
> 3. Master2 remains in the queue, waiting for Master0 to finish.
>
> One problem is present with scenario 2. Master1 is still asserting
> CYC_O, even though the Arbiter has cleared the FIFO queue. Perhaps the
> Arbiter should assert RST_I or ERR_I (which will also act as a reset,
> clearing the master's FSM) of Master1?
>
> Let me know if this makes sense to you.

If we simply drop the cancelled request and leave the remainder of the
queue intact, this avoids the problem noted above.

In order to do this very simply, we could structure our queue as a
pair of linked lists:  active requests and empty request nodes.  Then
to remove a cancelled request we traverse the active list till we find
the request we want to drop, link the active list around this node and
add it to the head of the empty list.



More information about the Libre-soc-dev mailing list