Different Definitions of Initiation Interval #105
rachitnigam
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
There are two possible definitions of initiation intervals of pipelines (apologies in advance for the unwieldy names):
Exact Retriggerability
If$P(t)$ represents the execution of a pipeline at time $t$ , then $i$ is the initiation interval if and only if s.t. $P(t)$ and $P(t+i)$ do not conflict. There may $n$ s.t. $P(t)$ and $P(t+i+n)$ do conflict.
Forever Retriggerability
If$P(t)$ represents the execution of a pipeline at time $t$ , then $i$ is the initiation interval if and only if $P(t)$ and $P(t+i)$ do not conflict and there is no $n$ such that $P(t)$ and $P(t+i+n)$ conflict. In other words, once a user waits for the $i$ cycles, it can choose to retrigger the pipeline anytime in the future.
Which one to pick?
Both definitions of initiation intervals (II) seem reasonable and there doesn't seem to be any a priori consensus on which one to pick. For example, in software pipelining, the initiation interval is considered to be "the number of cycles between the launch of successive loop iterations". This corresponds to our "exact retriggerability" definition. I suspect that HLS tools subscribe to this definition as well.
In hardware pipelines, it often seems to be "the number of cycles that must elapse before instruction issue to the same unit". This corresponds to our "forever retriggerability" definition.
Without much motivation, I'm going to pick two criteria for a good definition of II:
Enforceability
There are two places where the definition of initiation interval is used and checked:
For (1), we have something like this:
We need to ensure that$O(n^2)$ such checks.
m0
andm1
do not conflict. In the exact case, we must show that afterG
occurs,G+10-G
is exactly a constant factor of the initiation interval ofMult
. Forn
invocations, we must doIn the forever case, we must check that
G+10-G
if greater than or equal to the II of the pipeline. This gives us a little more flexibility in that we can reuse an instance any time after the II of the instance. On the other hand, we might have to wait for fewer cycles in the exact case.For (2), we need to ensure the event used to trigger an invocation, triggers in accordance to the instance's II. In the exact case, we would have to ensure that
G
triggers some constant factor of the II ofMult
. In the forever case, we have to ensure thatG
triggers less often than the II ofMult
. Again, forever gives us more flexibility but may require the pipeline to wait for longer.Composition
Questions about composition are more focused on interfaces:
The interface for
G
waits a 100 hundred cycles even though the pipeline takes 6 cycles. In the exact case, we'd have to have the interface line up exactly with the II ofG
, along with other constraints.The more interesting case of the brittleness of the exact definition is when we use an II where there is some$n$ even though $P(t)$ and $P(t+i)$ do not conflict, $P(t)$ and $P(t+i+n)$ do conflict. In this case, a small change to the pipeline may cause the entire interface to change, creating cascading effects up the pipeline.
Beta Was this translation helpful? Give feedback.
All reactions