URL
https://opencores.org/ocsvn/eco32/eco32/trunk
Subversion Repositories eco32
[/] [eco32/] [trunk/] [doc/] [manual/] [isa/] [system.tex] - Rev 190
Go to most recent revision | Compare with Previous | Blame | View Log
\section{System Instructions} \subsection{TRAP} The TRAP instruction triggers a \name{Trap Fault}. It is typically used by user programs to request action from the operating system. System implementer's note: The fault mechanism causes general purpose register \#30 to be loaded with the address of the faulting instruction, that is, the TRAP instruction itself. However, the fault service routine typically wants to return to the instruction immediately following the TRAP instruction, such that the TRAP is not executed again. This can be achieved by adding 4 to the return address in $R_{30}$ in the service routine. See \myref{2}{rfx} for details. \noargformat{101110} \begin{effectize} \effect trigger a \name{Trap Fault} \end{effectize} \subsection{RFX} The RFX instruction returns control from an exception service routine to the interrupted program. The return address is taken from general purpose register \#30. The RFX instruction also restores the privilege mode and interrupt enable to the interrupted state by popping the topmost values of the corresponding state stacks in the \pswx. See \myref{2}{psw} and \myref{2}{rfx} for details. \noargformat{101111} \begin{effectize} \priveffect \effect $PC \leftarrow R_{30}$ \effect $I_C \leftarrow I_P$ \effect $I_P \leftarrow I_O$ \effect $U_C \leftarrow U_P$ \effect $U_P \leftarrow U_O$ \end{effectize} \subsection{MVFS} The MVFS transfers the value of a special-purpose register into a general-purpose register. See \myref{2}{special_purpose_registers} for details on the special-purpose registers. \mvspformat{111000} \begin{effectize} \priveffect \effect If $z$ does not denote a valid special-purpose register, then trigger an \name{Illegal Instruction Fault} \effect $R_r \leftarrow S_z$ \end{effectize} \subsection{MVTS} The MVFS transfers the value of a general-purpose register into a special-purpose register. See \myref{2}{special_purpose_registers} for details on the special-purpose registers. \mvspformat{111001} \begin{effectize} \priveffect \effect If $z$ does not denote a valid special-purpose register, then trigger an \name{Illegal Instruction Fault} \effect $S_z \leftarrow R_r$ \end{effectize} \subsection{TBS} The TBS instruction searches the TLB for a mapping for a virtual address specified in the TLB Entry High register ($S_2$) and stores the resulting entry index in the TLB Index register ($S_1$). \noargformat{111010} \begin{effectize} \priveffect \effect $PageNumber \leftarrow S_{2,31..12}$ \effect if the TLB contains an entry for $PageNumber$ then \begin{itemize} \item[] $S_1 \leftarrow$ (the corresponding TLB entry index) \end{itemize} \effect else \begin{itemize} \item[] $S_1 \leftarrow 80000000_{h}$ \end{itemize} \end{effectize} \textit{Special cases:} The TBS instruction will ``find'' a TLB entry that uses a page number in the direct-mapped virtual address space (C0000000$_h$ through FFFFFFFF$_h$) if the TLB Entry High register contains the corresponding page number. Normal address translation would not find such an entry since it always chooses direct mapping for such addresses. \subsection{TBWR} The TBWR instruction replaces a random TLB entry. First, the index of the entry to replace is determined as a random number in the range of non-fixed TLB entries (see \myref{2}{tlb_random}). Then, data from the TLB Entry High and Low registers ($S_2$ and $S_3$) is written into that TLB entry. \noargformat{111011} \begin{effectize} \priveffect \effect $X :=$ (random MOD 28) + 4 \effect TLB Entry \#$X \leftarrow (S_3, S_2)$ \end{effectize} \subsection{TBRI} The TBRI instruction reads data from a TLB entry indicated by the TLB Index register ($S_1$) into the TLB Entry High and Low registers ($S_2$ and $S_3$). \noargformat{111100} \begin{effectize} \priveffect \effect $X := S_1$ MOD 32 \effect $(S_3, S_2) \leftarrow$ TLB Entry \#$X$ \end{effectize} \subsection{TBWI} The TBWI instruction writes data from the TLB Entry High and Low registers ($S_2$ and $S_3$) into a TLB entry indicated by the TLB Index register ($S_1$). \noargformat{111101} \begin{effectize} \priveffect \effect $X := S_1$ MOD 32 \effect TLB Entry \#$X \leftarrow (S_3, S_2)$ \end{effectize}
Go to most recent revision | Compare with Previous | Blame | View Log