\subsubsection{Constructing the system model -- the \texttt{ChessWay} class}
The \texttt{ChessWay} systemclass defines the distributed architecture on which
the embedded controller software is deployed. The systemis composed of two CPUs
connected by a BUS. The BUS is used in case the controllers deployed on either
processor need to communicate, for example to exchange information relating to
their internal state.
\begin{vdm_al} system ChessWay
instancevariables -- architecture definition (two CPUs at 10 MIPS)
fpga1 : CPU := new CPU(<FP>, 10E6);
fpga2 : CPU := new CPU(<FP>, 10E6);
-- communication infrastructure (one BUS at 100 kpbs)
bus : BUS := new BUS(<FCFS>, 100E3, {fpga1, fpga2});
\end{vdm_al}
-- flag to enable debugging logging in system classes staticpublic debug : bool := true
\end{vdm_al}
The system constructor deploys the instances of the \texttt{LeftController} and
the \texttt{RightController}, one to each CPU, which are named \texttt{LeftCtrl} and \texttt{RightCtrl} respectively.
\begin{vdm_al} operations -- construct the system class public ChessWay : () ==> ChessWay
ChessWay () ==
( -- deploy the controllers on the CPUs
fpga1.deploy(lctrl,"LeftCtrl");
fpga2.deploy(rctrl,"RightCtrl") );
end ChessWay
\end{vdm_al}
¤ Dauer der Verarbeitung: 0.13 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.