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

Richard Wilbur richard.wilbur at gmail.com
Fri Oct 29 17:44:08 BST 2021


On Thu, Oct 28, 2021 at 5:52 PM lkcl <luke.leighton at gmail.com> wrote:
> On October 28, 2021 6:32:04 PM UTC, Andrey Miroshnikov <andrey at technepisteme.xyz> wrote:
>
> >As for speculative execution, I'm not too knowledgable as to why the
> >queue is dropped. I think of it as a failed branch-prediction, where
> >the
> >cpu pipe-line would have to be flushed,
>
> yes.  so for in-order, you think of the pipeline as being a one-to-one direct preservation of the issue order.
>
> but... why would an OoO be any different??
>
> it wouldn't, would it?
>
> therefore, the Shadow system still has to preserve the issue order, doesn't it?
>
> and, so, despite the data structure not being one-to-one "a pipeline", the cancellation still has to drop everything that was issued *after* the exception /branch-predict-fail.

I think I understand the branch prediction/speculative execution and
out-of-order execution.  That sounds like the domain of the processor
instruction decoder and pipeline.  The scenario with the wishbone bus
arbiter, though, seems to be contention for a shared resource bus by
multiple bus masters.  The arbitration scheme outlined above treats
them all very nearly as slaves of one master.

I can see dropping all the speculative execution results from a branch
prediction once it has failed.  That would seem to be the domain of
one bus master.  I don't see how the other bus masters must
necessarily have their bus cycle requests predicated on a previous
request from a different bus master.

Furthermore, if the results of speculative execution which need to be
dropped involve several different bus masters, this seems like a
passive aggressive way of notifying them by dropping their bus cycle
reservations.  I would recommend a more proactive method of notifying
the functional units and coprocessors of the need to drop a certain
set of results and depend on the notified functional units and
coprocessors to drop their own bus cycle reservations as needed.  This
leaves them able to selectively handle dealing with some results which
take a long time (out-of-order execution) along with branch
prediction/speculative execution which may fail.

To take the real estate illustration down this direction:
1.  I see a house for sale.
2.  I speak with the real estate agent and make an offer on the house.
3.  The real estate agent mentions that there is already a sale
pending from buyer 1 and that buyer 2 already has made an offer.  I am
thus buyer 3.

If the current sale (buyer 1) falls through because of a problem with
financing and buyer 2 retracts their offer, I fully expect my offer to
be considered.  I would not expect that buyer 2 retracting their offer
would invalidate my offer.



More information about the Libre-soc-dev mailing list