Skip to content

Commit

Permalink
Improve styling in synchronous "Semantics"
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikt-ma committed Oct 11, 2020
1 parent 7268d51 commit 7b167ff
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions chapters/synchronous.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1463,19 +1463,17 @@ \section{Other Operators}\label{other-operators}
\section{Semantics}\label{semantics}

The execution of sub partitions requires exact time management for
proper synchronization. The implication is that testing a Real valued
proper synchronization. The implication is that testing a \lstinline!Real! valued
time variable to determine sampling instants is not possible. One
possible method is to use counters to handle sub-sampling scheduling.

possible method is to use counters to handle sub-sampling scheduling,
\begin{lstlisting}[language=modelica]
Clock_i_j_ticks = if pre(Clock_i_j_ticks)<subSamplingFactor_i_j then 1+pre(Clock_i_j_ticks) else 1;
Clock_$i$_$j$_ticks = if pre(Clock_$i$_$j$_ticks) < subSamplingFactor_$i$_$j$ then 1 + pre(Clock_$i$_$j$_ticks) else 1;
\end{lstlisting}

and to test the counter to determine when the sub-clock is ticking:
\begin{lstlisting}[language=modelica]
Clock_i_j_activated = BaseClock_i_activated and Clock_i_j_ticks >= subSamplingFactor_i_j;
Clock_$i$_$j$_activated = BaseClock_$i$_activated and Clock_$i$_$j$_ticks >= subSamplingFactor_$i$_$j$;
\end{lstlisting}
The Clock\_i\_j\_activated flag is used as the guard for the sub
The \lstinline!Clock_$i$_$j$_activated! flag is used as the guard for the sub
partition equations.

\begin{nonnormative}
Expand Down

0 comments on commit 7b167ff

Please sign in to comment.