MicroBlaze Processor Reference Guide
219
UG081 (v14.7)
Instructions
mts
Move To Special Purpose Register
Description
Copies the contents of register rD into the special purpose register rS. The special purpose registers
TLBLO and TLBHI are used to copy to the Unified TLB entry indexed by TLBX.
When MicroBlaze is configured to use an MMU (
C_USE_MMU
>= 1) this instruction is privileged.
This means that if the instruction is attempted in User Mode (
MSR[UM]
= 1) a Privileged Instruction
exception occurs.
With low-latency interrupt mode (
C_USE_INTERRUPT
= 2), the Interrupt_Ack output port is set to
11 if the MSR{IE] bit is set by executing this instruction.
Pseudocode
if MSR[UM] = 1 then
ESR[EC]
←
00111
else
switch (rS)
case 0x0001 : MSR
←
(rA)
case 0x0007 : FSR
←
(rA)
case 0x0800 : SLR
←
(rA)
case 0x0802 : SHR
←
(rA)
case 0x1000 : PID
←
(rA)
case 0x1001 : ZPR
←
(rA)
case 0x1002 : TLBX
←
(rA)
case 0x1003 : TLBLO
←
(rA)
case 0x1004 : TLBHI
←
(rA)
case 0x1005 : TLBSX
←
(rA)
if (rS) = 0x0001 and (rA) & 2
Interrupt_Ack
←
11
Registers Altered
•
rS
•
ESR[EC], in case a privileged instruction exception is generated
Latency
•
1 cycle
Notes
When writing MSR using MTS, all bits take effect one cycle after the instruction has been executed.
An MTS instruction writing MSR should never be followed back-to-back by an instruction that uses
the MSR content. When clearing the IE bit, it is guaranteed that the processor will not react to any
interrupt for the subsequent instructions. When setting the EIP or BIP bit, it is guaranteed that the
processor will not react to any interrupt or normal hardware break for the subsequent instructions.
mts
rS, rA
1 0 0 1 0 1 0 0 0 0 0
rA
1 1
rS
0
6
11
16
18
31