Skip to content

Commit

Permalink
Update rvfi_wu doc to match the spec in gh issue #446
Browse files Browse the repository at this point in the history
Signed-off-by: Halfdan Bechmann <[email protected]>
  • Loading branch information
halfdan-dolva committed Mar 23, 2022
1 parent cd1e421 commit 9d14b87
Showing 1 changed file with 22 additions and 5 deletions.
27 changes: 22 additions & 5 deletions docs/user_manual/source/rvfi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,33 @@ Whenever |corev| has a pending NMI, the ``rvfi_nmip`` will signal this. ``rvfi_n

**Sleep Signals**

These signals report core sleep and wakeup information.

.. code-block:: verilog
output [NRET - 1 : 0] rvfi_wu
output [NRET - 1 : 0] rvfi_sleep
output rvfi_wu_t [NRET - 1 : 0] rvfi_wu
output logic [NRET - 1 : 0] rvfi_sleep
These signals report the sleep state of the core.
``rvfi_sleep`` is set on the last instruction before the core enters sleep mode and
``rvfi_wu`` is set for the first instruction executed after waking up.
Where the rvfi_wu_t struct contains following fields:

.. table:: RVFI wu type
:name: RVFI wu type

================= ============ =======
Field Type Bits
================= ============ =======
wu logic [0]
interrupt logic [1]
debug logic [2]
cause logic [10:0] [13:3]
================= ============ =======

``rvfi_sleep`` is set on the last instruction before the core enters sleep mode.
``rvfi_wu.wu`` is set for the first instruction executed after waking up.
``rvfi_wu.interrupt`` is set if the wakeup was caused by an interrupt, and
``rvfi_wu.debug`` is set if the wakeup was caused by a debug request.
``rvfi_wu.cause`` signals the wakeup cause exception code.

Compatibility
-------------
Expand Down

0 comments on commit 9d14b87

Please sign in to comment.