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

Subversion Repositories eco32

[/] [eco32/] [trunk/] [doc/] [manual/] [isa/] [system.tex] - Blame information for rev 89

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 22 hellwig
\section{System Instructions}
2
 
3
\subsection{TRAP}
4
 
5
The TRAP instruction triggers a \name{Trap Fault}. It is typically used by user programs to request action from the operating system.
6
 
7
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.
8
 
9
\noargformat{101110}
10
 
11
\begin{effectize}
12
\effect trigger a \name{Trap Fault}
13
\end{effectize}
14
 
15
\subsection{RFX}
16
 
17
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.
18
 
19
\noargformat{101111}
20
 
21
\begin{effectize}
22
\priveffect
23
\effect $PC \leftarrow R_{30}$
24
\effect $I_C \leftarrow I_P$
25
\effect $I_P \leftarrow I_O$
26
\effect $U_C \leftarrow U_P$
27
\effect $U_P \leftarrow U_O$
28
\end{effectize}
29
 
30
\subsection{MVFS}
31
 
32
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.
33
 
34
\mvspformat{111000}
35
 
36
\begin{effectize}
37
\priveffect
38
\effect If $z$ does not denote a valid special-purpose register, then trigger an \name{Illegal Instruction Fault}
39
\effect $R_r \leftarrow S_z$
40
\end{effectize}
41
 
42
\subsection{MVTS}
43
 
44
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.
45
 
46
\mvspformat{111001}
47
 
48
\begin{effectize}
49
\priveffect
50
\effect If $z$ does not denote a valid special-purpose register, then trigger an \name{Illegal Instruction Fault}
51
\effect $S_z \leftarrow R_r$
52
\end{effectize}
53
 
54
\subsection{TBS}
55
 
56
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$).
57
 
58
\noargformat{111010}
59
 
60
\begin{effectize}
61
\priveffect
62
\effect $PageNumber \leftarrow S_{2,31..12}$
63
\effect if the TLB contains an entry for $PageNumber$ then
64
\begin{itemize}
65
\item[] $S_1 \leftarrow$ (the corresponding TLB entry index)
66
\end{itemize}
67
\effect else
68
\begin{itemize}
69
\item[] $S_1 \leftarrow 80000000_{h}$
70
\end{itemize}
71
\end{effectize}
72
 
73
\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.
74
 
75
\subsection{TBWR}
76
 
77
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.
78
 
79
\noargformat{111011}
80
 
81
\begin{effectize}
82
\priveffect
83
\effect $X :=$ (random MOD 28) + 4
84
\effect TLB Entry \#$X \leftarrow (S_3, S_2)$
85
\end{effectize}
86
 
87
\subsection{TBRI}
88
 
89
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$).
90
 
91
\noargformat{111100}
92
 
93
\begin{effectize}
94
\priveffect
95
\effect $X := S_1$ MOD 32
96
\effect $(S_3, S_2) \leftarrow$ TLB Entry \#$X$
97
\end{effectize}
98
 
99
\subsection{TBWI}
100
 
101
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$).
102
 
103
\noargformat{111101}
104
 
105
\begin{effectize}
106
\priveffect
107
\effect $X := S_1$ MOD 32
108
\effect TLB Entry \#$X \leftarrow (S_3, S_2)$
109
\end{effectize}

powered by: WebSVN 2.1.0

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