OpenCores
URL https://opencores.org/ocsvn/eco32/eco32/trunk

Subversion Repositories eco32

[/] [eco32/] [tags/] [eco32-0.24/] [doc/] [manual/] [isa/] [system.tex] - Diff between revs 22 and 211

Only display areas with differences | Details | Blame | View Log

Rev 22 Rev 211
\section{System Instructions}
\section{System Instructions}
 
 
\subsection{TRAP}
\subsection{TRAP}
 
 
The TRAP instruction triggers a \name{Trap Fault}. It is typically used by user programs to request action from the operating system.
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.
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}
\noargformat{101110}
 
 
\begin{effectize}
\begin{effectize}
\effect trigger a \name{Trap Fault}
\effect trigger a \name{Trap Fault}
\end{effectize}
\end{effectize}
 
 
\subsection{RFX}
\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.
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}
\noargformat{101111}
 
 
\begin{effectize}
\begin{effectize}
\priveffect
\priveffect
\effect $PC \leftarrow R_{30}$
\effect $PC \leftarrow R_{30}$
\effect $I_C \leftarrow I_P$
\effect $I_C \leftarrow I_P$
\effect $I_P \leftarrow I_O$
\effect $I_P \leftarrow I_O$
\effect $U_C \leftarrow U_P$
\effect $U_C \leftarrow U_P$
\effect $U_P \leftarrow U_O$
\effect $U_P \leftarrow U_O$
\end{effectize}
\end{effectize}
 
 
\subsection{MVFS}
\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.
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}
\mvspformat{111000}
 
 
\begin{effectize}
\begin{effectize}
\priveffect
\priveffect
\effect If $z$ does not denote a valid special-purpose register, then trigger an \name{Illegal Instruction Fault}
\effect If $z$ does not denote a valid special-purpose register, then trigger an \name{Illegal Instruction Fault}
\effect $R_r \leftarrow S_z$
\effect $R_r \leftarrow S_z$
\end{effectize}
\end{effectize}
 
 
\subsection{MVTS}
\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.
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}
\mvspformat{111001}
 
 
\begin{effectize}
\begin{effectize}
\priveffect
\priveffect
\effect If $z$ does not denote a valid special-purpose register, then trigger an \name{Illegal Instruction Fault}
\effect If $z$ does not denote a valid special-purpose register, then trigger an \name{Illegal Instruction Fault}
\effect $S_z \leftarrow R_r$
\effect $S_z \leftarrow R_r$
\end{effectize}
\end{effectize}
 
 
\subsection{TBS}
\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$).
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}
\noargformat{111010}
 
 
\begin{effectize}
\begin{effectize}
\priveffect
\priveffect
\effect $PageNumber \leftarrow S_{2,31..12}$
\effect $PageNumber \leftarrow S_{2,31..12}$
\effect if the TLB contains an entry for $PageNumber$ then
\effect if the TLB contains an entry for $PageNumber$ then
\begin{itemize}
\begin{itemize}
\item[] $S_1 \leftarrow$ (the corresponding TLB entry index)
\item[] $S_1 \leftarrow$ (the corresponding TLB entry index)
\end{itemize}
\end{itemize}
\effect else
\effect else
\begin{itemize}
\begin{itemize}
\item[] $S_1 \leftarrow 80000000_{h}$
\item[] $S_1 \leftarrow 80000000_{h}$
\end{itemize}
\end{itemize}
\end{effectize}
\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.
\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}
\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.
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}
\noargformat{111011}
 
 
\begin{effectize}
\begin{effectize}
\priveffect
\priveffect
\effect $X :=$ (random MOD 28) + 4
\effect $X :=$ (random MOD 28) + 4
\effect TLB Entry \#$X \leftarrow (S_3, S_2)$
\effect TLB Entry \#$X \leftarrow (S_3, S_2)$
\end{effectize}
\end{effectize}
 
 
\subsection{TBRI}
\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$).
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}
\noargformat{111100}
 
 
\begin{effectize}
\begin{effectize}
\priveffect
\priveffect
\effect $X := S_1$ MOD 32
\effect $X := S_1$ MOD 32
\effect $(S_3, S_2) \leftarrow$ TLB Entry \#$X$
\effect $(S_3, S_2) \leftarrow$ TLB Entry \#$X$
\end{effectize}
\end{effectize}
 
 
\subsection{TBWI}
\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$).
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}
\noargformat{111101}
 
 
\begin{effectize}
\begin{effectize}
\priveffect
\priveffect
\effect $X := S_1$ MOD 32
\effect $X := S_1$ MOD 32
\effect TLB Entry \#$X \leftarrow (S_3, S_2)$
\effect TLB Entry \#$X \leftarrow (S_3, S_2)$
\end{effectize}
\end{effectize}
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.