\XtoCBlock{AutoSwitch}
\label{block:AutoSwitch}
\begin{figure}[H]\includegraphics{AutoSwitch}\end{figure} 
Switch between In1 and In3 dependent on Switch signal:

    Switch signal rising:  Switch >= Threshold up --> Out = In1

    Switch signal falling: Switch <  Threshold down --> Out = In3

\begin{XtoCtabular}{Inports}
In1 & Input \#1\\
\hline
Switch & Input \#2: Threshold signal\\
\hline
In3 & Input \#3\\
\hline
\end{XtoCtabular}


\begin{XtoCtabular}{Outports}
Out & Either value of input \#1 or input \#3 dependent on value of input \#2\\
\hline
\end{XtoCtabular}

\begin{XtoCMaskParamTabular}{Mask Parameters}
Thresh\_up & 1 & Threshold level for rising switch signal\\
\hline
Thresh\_down & 2 & Threshold level for falling switch signal\\
\hline
\end{XtoCMaskParamTabular}

\ifdefined \XcOverviewDocu
% omit optional documentation file
\else
% include optional documentation file
\IfFileExists{\XcHomePath/Library/General/Doc/AutoSwitch_Info.tex}
  {\subsubsection*{Description:}
   \input{\XcHomePath/Library/General/Doc/AutoSwitch_Info.tex}}
  {\vspace{1ex}}
\fi

\subsubsection*{Implementations:}
\begin{tabular}{l l}
\textbf{FiP16} & 16 Bit Fixed Point Implementation\\
\textbf{FiP32} & 32 Bit Fixed Point Implementation\\
\textbf{Float32} & 32 Bit Floating Point Implementation\\
\textbf{Float64} & 64 Bit Floating Point Implementation\\
\end{tabular}

\ifdefined \XcOverviewDocu
% omit implementation details and test reports
\else
\XtoCImplementation{FiP16}
\nopagebreak[0]

16 Bit Fixed Point Implementation

\begin{XtoCtabular}{Inports Data Type}
In1 & int16\\
\hline
Switch & int16\\
\hline
In3 & int16\\
\hline
\end{XtoCtabular}

\begin{XtoCtabular}{Outports Data Type}
Out & int16\\
\hline
\end{XtoCtabular}

\XtoCImplementation{FiP32}
\nopagebreak[0]

32 Bit Fixed Point Implementation

\begin{XtoCtabular}{Inports Data Type}
In1 & int32\\
\hline
Switch & int32\\
\hline
In3 & int32\\
\hline
\end{XtoCtabular}

\begin{XtoCtabular}{Outports Data Type}
Out & int32\\
\hline
\end{XtoCtabular}

\XtoCImplementation{Float32}
\nopagebreak[0]

32 Bit Floating Point Implementation

\begin{XtoCtabular}{Inports Data Type}
In1 & float32\\
\hline
Switch & float32\\
\hline
In3 & float32\\
\hline
\end{XtoCtabular}

\begin{XtoCtabular}{Outports Data Type}
Out & float32\\
\hline
\end{XtoCtabular}

\XtoCImplementation{Float64}
\nopagebreak[0]

64 Bit Floating Point Implementation

\begin{XtoCtabular}{Inports Data Type}
In1 & float64\\
\hline
Switch & float64\\
\hline
In3 & float64\\
\hline
\end{XtoCtabular}

\begin{XtoCtabular}{Outports Data Type}
Out & float64\\
\hline
\end{XtoCtabular}

\ifdefined \AddTestReports
\InputIfFileExists{\XcHomePath/Library/General/Doc/Test-Results/Test_AutoSwitch_FiP16.tex}{}{}
\InputIfFileExists{\XcHomePath/Library/General/Doc/Test-Results/Test_AutoSwitch_FiP32.tex}{}{}
\InputIfFileExists{\XcHomePath/Library/General/Doc/Test-Results/Test_AutoSwitch_Float32.tex}{}{}
\InputIfFileExists{\XcHomePath/Library/General/Doc/Test-Results/Test_AutoSwitch_Float64.tex}{}{}
\fi
\fi
