Changeset 525


Ignore:
Timestamp:
Feb 15, 2011, 6:04:05 PM (6 years ago)
Author:
mulligan
Message:

lots of changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Deliverables/D4.1/ITP-Paper/itp-2011.tex

    r524 r525  
    529529
    530530% `Real clock' for I/O and timers
     531The O'Caml emulator has code for handling timers, I/O and interrupts (these are not yet ported to the Matita emulator).
     532All three of these features interact with each other in subtle ways.
     533For instance, interrupts can `fire' when an input is detected on the processor's UART port, and, in certain modes, timers reset when a high signal is detected on one of the MCS-51's communication pins.
     534
     535To accurately model timers, we must modify the central \texttt{status} record of the emulator to keep track of the current time:
     536\begin{quote}
     537\begin{lstlisting}
     538type time = int
     539type status = { ... clock: time; ... }
     540\end{lstlisting}
     541\end{quote}
     542Before every execution step, the \texttt{clock} is incremented by the number of processor cycles that the instruction just fetched will take to execute.
     543The processor then executes the instruction, followed by the code implementing the timers.
     544
     545% Discuss I/O
    531546
    532547%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Note: See TracChangeset for help on using the changeset viewer.