\item\textcolor{red}{Scheduling}: Determine timing of individual operations
\item\textcolor{red}{Binding}: Determine relation between individual operations and HW resources
\end{itemize}\vspace{0.2cm}
\subsection{Models (10-3)}
see Architecture Models
\begin{itemize}
\item\textcolor{red}{Sequence Graph}$G_S =(V_S,E_S)$ where $V_S$ denotes the operations and $E_S$ the dependence relations of the algorithm
\item\textcolor{red}{Resource Graph} (bipartite) $G_R =(V_R,E_R)$ where $V_R=V_S \cup V_T$ and $V_T$ denotes the resource types of the architecture ($V_S$ are the operations). An edge $(v_s,v_t)\in E_R$ represents availability of resource type $v_t$ for operation $v_s$.
\item\textcolor{red}{Cost function} for operations $c: V_T \rightarrow\mathbb{Z}$.
\item\textcolor{red}{Execution times}$w: E_R \rightarrow\mathbb{Z}^{\geq0}$ denote execution time of operation $v_s$ on resource type $v_t$.
\item An \textcolor{red}{allocation}$\alpha: V_T \rightarrow\mathbb{Z}^{\geq0}$ assigns to each resource type $v_t \in V_T$ the number $\alpha(v_t)$ of available resources.
\item A \textcolor{red}{binding} (which operation on which ressource) is defined by $\beta: V_S \rightarrow V_T$ and $\gamma: V_S \rightarrow\mathbb{Z}^{\geq0}$. $\beta(v_s)= v_t$ and $\gamma(v_s)=r$ mean that operation $v_s \in V_S$ is implemented on the $r$-th instance of resource type $v_t \in V_T$.
\item A \textcolor{red}{schedule}$\tau: V_S \rightarrow\mathbb{Z}^{\geq0}$ determines the starting times of operations. It is feasible iff
\item\textcolor{red}{latency}$L$ of a schedule is the time between start node $v_0$ and end node $v_n$: $$L=\tau(v_n)-\tau(v_0)$$
\item\textcolor{red}{Sequence Graph}$G_S =(V_S,E_S)$ where $V_S$ denotes the operations and $E_S$ the dependence relations of the algorithm
\item\textcolor{red}{Resource Graph} (bipartite) $G_R =(V_R,E_R)$ where $V_R=V_S \cup V_T$ and $V_T$ denotes the resource types of the architecture ($V_S$ are the operations). An edge $(v_s,v_t)\in E_R$ represents availability of resource type $v_t$ for operation $v_s$.
\item\textcolor{red}{Cost function} for operations $c: V_T \rightarrow\mathbb{Z}$.
\item\textcolor{red}{Execution times}$w: E_R \rightarrow\mathbb{Z}^{\geq0}$ denote execution time of operation $v_s$ on resource type $v_t$.
\item An \textcolor{red}{allocation}$\alpha: V_T \rightarrow\mathbb{Z}^{\geq0}$ assigns to each resource type $v_t \in V_T$ the number $\alpha(v_t)$ of available resources.
\item A \textcolor{red}{binding} (which operation on which ressource) is defined by $\beta: V_S \rightarrow V_T$ and $\gamma: V_S \rightarrow\mathbb{Z}^{\geq0}$. $\beta(v_s)= v_t$ and $\gamma(v_s)=r$ mean that operation $v_s \in V_S$ is implemented on the $r$-th instance of resource type $v_t \in V_T$.
\item A \textcolor{red}{schedule}$\tau: V_S \rightarrow\mathbb{Z}^{\geq0}$ determines the starting times of operations. It is feasible iff
\item\textcolor{red}{latency}$L$ of a schedule is the time between start node $v_0$ and end node $v_n$: $$L=\tau(v_n)-\tau(v_0)$$
\end{itemize}
\subsection{Multiobjective Optimization (10-25)}
Optimize latency, hardware cost, power and energy
~
\begin{definition}{Pareto-Dominance}
A solution $a \in X$ weakly Pareto-dominates a solution $b \in X$ ($a \preceq b$) if it is as least as good in all objectives. Solution is $a$ is better than $b$ ($a \prec b$) iff $(a \preceq b)\land(b \cancel{\preceq} a)$
A solution $a \in X$ weakly Pareto-dominates a solution $b \in X$ ($a \preceq b$) if it is as least as good in all objectives. Solution is $a$ is better than $b$ ($a \prec b$) iff $(a \preceq b)\land(b \cancel{\preceq} a)$
\end{definition}~
\begin{definition}{Pareto point}
is a point on a graph (eg. cost vs. latency). For a given architecture if following points are possible (5,11),(5,10),(3,7) and (3,4) then only the points (5,10) and (3,4) are pareto points.
is a point on a graph (eg. cost vs. latency). For a given architecture if following points are possible (5,11),(5,10),(3,7) and (3,4) then only the points (5,10) and (3,4) are pareto points.
\end{definition}
~
\begin{definition}{Pareto-optimal}
A solution is \textcolor{red}{Pareto-optimal}, if it is not Pareto-dominated by any other solution. \newline
The set of all Pareto-optimal solutions is the \textcolor{red}{Pareto-optimal front}.
A solution is \textcolor{red}{Pareto-optimal}, if it is not Pareto-dominated by any other solution. \newline
The set of all Pareto-optimal solutions is the \textcolor{red}{Pareto-optimal front}.
\end{definition}
\subsection{Classification of Scheduling Algorithms (10-32)}
\begin{itemize}
\item\textcolor{red}{Unlimited} vs. \textcolor{red}{limited} resources
\item\textcolor{red}{Iterative} (initial solution to architecture synthesis stepwise improved) vs. \textcolor{red}{constructive} (synthesis problem solved in one step) vs. \textcolor{red}{Transformative} (initial problem converted into classical optimization problem)
\item\textcolor{red}{Unlimited} vs. \textcolor{red}{limited} resources
\item\textcolor{red}{Iterative} (initial solution to architecture synthesis stepwise improved) vs. \textcolor{red}{constructive} (synthesis problem solved in one step) vs. \textcolor{red}{Transformative} (initial problem converted into classical optimization problem)
\end{itemize}~ \vspace{0.2cm}
\subsection{Scheduling without resource constraints (10-31)}
\begin{itemize}
\item Do as preparatory step for general synthesis
\item or to determine bounds on feasible schedules
\item or if there is a dedicated resource for each operation
\item Do as preparatory step for general synthesis
\item or to determine bounds on feasible schedules
\item or if there is a dedicated resource for each operation
\end{itemize}
\subsubsection{As Soon As Possible Algorithm (ASAP)}
Guarantees minimal latency. Constructive, greedy from the beginning
\begin{python}
ASAP(G_S(V_S,E_S),w) {
tau(v_0)=1;
REPEAT {
Determine v_i whose predecessors are planned;
tau(v_i) = max(tau(v_j)+w(v_j) for all (v_i,v_j) in E_S);
} UNTIL (v_n is planned);
RETURN tau;
}
ASAP(G_S(V_S,E_S),w) {
tau(v_0)=1;
REPEAT {
Determine v_i whose predecessors are planned;
tau(v_i) = max(tau(v_j)+w(v_j) for all (v_i,v_j) in E_S);
} UNTIL (v_n is planned);
RETURN tau;
}
\end{python}
\subsubsection{As Late As Possible Algorithm (ALAP)}
Heuristic, not optimal. Constructive, greedy from the end
\begin{python}
ALAP(G_S(V_S,E_S),w,L_max) {
tau(v_n) = L_max + 1;
REPEAT {
Determine v_i whose successors are planned;
tau(v_i) = min(tau(v_j) for all (v_i,v_j) in E_S) - w(v_i)
} UNTIL (v_0 is planned);
RETURN tau;
}
ALAP(G_S(V_S,E_S),w,L_max) {
tau(v_n) = L_max + 1;
REPEAT {
Determine v_i whose successors are planned;
tau(v_i) = min(tau(v_j) for all (v_i,v_j) in E_S) - w(v_i)
} UNTIL (v_0 is planned);
RETURN tau;
}
\end{python}
If $L_{max}$ is not given, it is taken from the LIST Schedule because it
guarantees that a feasible schedule exists for this latency.
...
...
@@ -82,18 +82,18 @@ guarantees that a feasible schedule exists for this latency.
\subsubsection{Scheduling with Timing Constraints}
\begin{itemize}
\item Deadlines: Latest finishing time
\item Release Times: Earliest starting time
\item Relative Constraints: Maximum or minimum differences
\item Deadlines: Latest finishing time
\item Release Times: Earliest starting time
\item Relative Constraints: Maximum or minimum differences
\end{itemize}
Model all timing constraints using relative constraints:
Represent those restrictions as a \textcolor{red}{weighted constraint graph}$G_C=(V_C,E_C,d)$ related to a sequence graph $G_S=(V_S,E_S)$ that contains nodes $V_C=V_S$ (the operations) and a weighted, directed edge for each time constraint. $d(v_i,v_j)$ means $\tau(v_j)-\tau(v_i)\geq d(v_i,v_j)$. ($d(v_i,v_j)$ ist das Gewicht vom Pfeil $v_i$ nach $v_j$) \newline
\subitem if a operation needs more than 1 timeslot, the resource constraints get more complicated.
\end{itemize}
\subsection{Iterative Algorithms (10-56)}
Iterative Algorithms consist of a set of indexed equations that are evaluated for all values of an index variable $l$ (e.g. signal flow graphs, marked graphs). Multiple representations are possible:
\begin{itemize}
\item Single \textcolor{red}{indexed equation} with constant index dependencies
($\to$ essentially a sequence graph is executed repeatedly)
~
\begin{definition}{}
\begin{itemize}
\item An \textcolor{red}{iteration} is the set of all operations necessary to compute all variables $x_i[l]$ for a fixed index $l$
\item The \textcolor{red}{iteration interval}$P$ is the time distance between two successive iterations of an iterative algorithm.
\item$1/P$ is the \textcolor{red}{throughput}
\item The \textcolor{red}{latency}$L$ is the maximal time distance between the starting and the finishing times of operations belonging to one iteration.
\item In \textcolor{red}{functional pipelining}, there exist time instances where the operations of different iterations $l$ are executed simultaneously.
\item In case of \textcolor{red}{loop folding}, starting and finishing times of an operation are in different physical iterations.
\subitem if a operation needs more than 1 timeslot, the resource constraints get more complicated.
\end{itemize}
\subsection{Iterative Algorithms (10-56)}
Iterative Algorithms consist of a set of indexed equations that are evaluated for all values of an index variable $l$ (e.g. signal flow graphs, marked graphs). Multiple representations are possible:
\begin{itemize}
\item Single \textcolor{red}{indexed equation} with constant index dependencies
($\to$ essentially a sequence graph is executed repeatedly)
~
\begin{definition}{}
\begin{itemize}
\item An \textcolor{red}{iteration} is the set of all operations necessary to compute all variables $x_i[l]$ for a fixed index $l$
\item The \textcolor{red}{iteration interval}$P$ is the time distance between two successive iterations of an iterative algorithm.
\item$1/P$ is the \textcolor{red}{throughput}
\item The \textcolor{red}{latency}$L$ is the maximal time distance between the starting and the finishing times of operations belonging to one iteration.
\item In \textcolor{red}{functional pipelining}, there exist time instances where the operations of different iterations $l$ are executed simultaneously.
\item In case of \textcolor{red}{loop folding}, starting and finishing times of an operation are in different physical iterations.
\end{itemize}
\end{definition}
\textbf{Implementation}
\begin{itemize}
\item\textbf{Simple possibility:}edges with $d_ij>0$ are removed from the extended sequence graph. The resulting sequence graph is implemented using standard methods.\\