Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generalized resync behaviour #179

Open
wants to merge 1 commit into
base: updates-2.0.4
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions exampleAlgorithm.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,10 @@ cycle it occured because it was preceded by an updiscon or immediately
followed by another exception;
* _resync count._ A counter used to keep track of when it is necessary
to send a synchronization packet (see <<sec:resync>>);
* _max_resync._ The resync counter value that schedules a
synchronization packet (see <<sec:resync>>);
* _resync_br._ The resync counter has reached the maximum value and
* _resync2_br._ The resync FSM is in state 2 and
there are entries in the branch map that have not yet been output (see
<<sec:resync>>).
* _resync3._ The resync FSM is in state 3 (see <<sec:resync>>);

<<fig:algo>> shows instruction by instruction behavior, as
would be seen in a single-retirement system only. Whilst the core to
Expand Down Expand Up @@ -137,9 +136,15 @@ When the resync is required, the primary objective is to output a format
needing any of the history. However, if the decoder is already synced,
then it is also required that it can continue to follow the execution
path up to and through the format 3 packet seamlessly. As such, before
outputting a format 3 packet, it is necessary to output a format 1
outputting a format 3 packet, it is necessary to output a format 0/1
packet for the preceding instruction if there are any unreported
branches (because format 3 does not contain a branch map). The format 3
branches (because format 3 does not contain a branch map). There are several supported options for incrementing the resync timer (packets, cycle or instruction half-words), and as such updates to the timer do not necessarily coincide with instrucitn retirements. A small, independent FSM can be used to ensure the required packets are output in the required order, as follows:

* *State 1*: resync_count < max_resync. Transition to *State 2* when resync_count >= max_resync
* *State 2*: output packet of unreported branches if required, transition to *state 3*
* *State 3*: output sync packet, reset resync_count and transition to *State 1*.

The format 3
will be sent if the resync timer has been exceeded. On the cycle before
this (when the resync timer value has been exactly reached), a format 1
will be generated if the branch map is not empty.
Expand Down
Loading
Loading