The WRS.NTO
and WRS.STO
instructions cause the hart to temporarily stall
execution in a low-power state as long as the reservation set is valid and no
pending interrupts, even if disabled, are observed. For WRS.STO
the stall
duration is bounded by an implementation defined short timeout. These
instructions are available in all privilege modes. These instructions are not
supported in a constrained LR
/SC
loop.
Encoding:
{reg: [ {bits: 7, name: 'opcode', attr: ['SYSTEM(0x73)'] }, {bits: 5, name: 'rd', attr: ['0'] }, {bits: 3, name: 'funct3', attr: ['0'] }, {bits: 5, name: 'rs1', attr: ['0'] }, {bits: 12, name: 'funct12', attr:['WRS.NTO(0x0d)', 'WRS.STO(0x1d)'] }, ], config:{lanes: 1, hspace:1024}}
Operation:
Hart execution may be stalled while the following conditions are all satisfied:
a) The reservation set is valid
b) If `WRS.STO`, a "short" duration since start of stall has not elapsed
c) No pending interrupt is observed (see the rules below)
While stalled, an implementation is permitted to occasionally terminate the stall and complete execution for any reason.
WRS.NTO
and WRS.STO
instructions follow the rules of the WFI
instruction
for resuming execution on a pending interrupt.
When the TW
(Timeout Wait) bit in mstatus
is set and WRS.NTO
is executed
in any privilege mode other than M mode, and it does not complete within an
implementation-specific bounded time limit, the WRS.NTO
instruction will cause
an illegal instruction exception.
When executing in VS or VU mode, if the VTW
bit is set in hstatus
, the
TW
bit in mstatus
is clear, and the WRS.NTO
does not complete within an
implementation-specific bounded time limit, the WRS.NTO
instruction will cause
a virtual instruction exception.
Note
|
Since the The duration of a
|