You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/hti.adoc
+10-12Lines changed: 10 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,18 +13,17 @@ The following information is mandatory:
13
13
14
14
* The number of instructions that are being retired;
15
15
* Whether there has been an exception or interrupt, and if so the cause
16
-
(from the *_scause/vscause/mcause_* etc. CSR) and trap value (from the
17
-
*_stval/vstval/mtval_* etc. CSR).
16
+
(from the `scause`/`vscause`/`mcause` etc. CSR) and trap value (from the `stval`/`vstval`/`mtval` etc. CSR).
18
17
+
19
18
The register set to output should be the set that is updated as a result
20
19
of the exception (i.e. the set associated with the privilege level
21
20
immediately following the exception);
22
21
* The current privilege level of the RISC-V hart;
23
-
* The _instruction_type_ of retired instructions for:
22
+
* The instruction type of retired instructions for:
24
23
** Jumps with a target that cannot be inferred from the source code;
25
24
** Taken and non-taken branches;
26
25
** Return from exception or interrupt (*_*ret_* instructions).
27
-
* The _instruction_address_ for:
26
+
* The instruction address for:
28
27
** Jumps with a target that _cannot_ be inferred from the source code;
29
28
** The instruction retired immediately after a jump with a target that
30
29
_cannot_ be inferred from the source code (also referred to as the
@@ -77,7 +76,7 @@ instruction which loads the target into a register have been traced.
77
76
[[JumpClasses]]
78
77
==== Jump classification and target inference
79
78
80
-
Jumps are classified as _inferrable_, or _uninferrable_. An _inferrable_
79
+
Jumps are classified as _inferrable_ or _uninferrable_. An _inferrable_
81
80
jump has a target which can be deduced from the binary executable or
82
81
representation thereof (e.g. ELF). For the purposes of this
83
82
specification, the following strict definition applies:
@@ -164,10 +163,10 @@ BR group signals instead.
164
163
|*itype*[_itype_width_p_-1:0] | MR | Termination type of the instruction
165
164
block. Encoding given in <<tab:itype3>> and <<tab:itype4>>.
166
165
|*cause*[_ecause_width_p_-1:0] | M | Exception or interrupt cause
167
-
(*_scause/ vscause/mcause_*). Ignored unless **itype**=1 or 2.
166
+
(`scause`/ `vscause`/`mcause`). Ignored unless **itype**=1 or 2.
168
167
|*tval*[_iaddress_width_p_-1:0] | M | The associated trap value, e.g. the
169
168
faulting virtual address for address exceptions, as would be written to
170
-
the *stval/vstval/mtval* CSR. Future optional extensions may
169
+
the `stval`/`vstval`/`mtval` CSR. Future optional extensions may
171
170
define *tval* to provide ancillary information in cases where it
172
171
currently supplies zero. Ignored unless **itype**=1.
173
172
|*priv*[_privilege_width_p_-1:0] | M | Privilege level for all
@@ -267,7 +266,7 @@ retired instruction
267
266
|9 | Inferrable call | JAL rd +
268
267
C.JAL +
269
268
CM.JALT| rd = `link` +
270
-
Expands to `JAL x1, offset` +
269
+
Expands to: JAL x1, offset +
271
270
Defined by <<zcmt,Zcmt>> extension
272
271
|10 | Uninferrable jump +
273
272
(without linkage) | JALR rd, rs +
@@ -276,7 +275,7 @@ retired instruction
276
275
|11 | Inferrable jump | JAL rd +
277
276
C.J +
278
277
CM.JT| rd = *x0* +
279
-
Expands to `JAL x0, offset` +
278
+
Expands to: JAL x0, offset +
280
279
Defined by <<zcmt,Zcmt>> extension
281
280
|12 | Co-routine swap | JALR rd, rs +
282
281
C.JALR rs| rd = `link` and rs = `link` and rd != rs +
@@ -496,14 +495,13 @@ infrastructure).
496
495
==== Using trigger outputs from the Debug Module
497
496
498
497
The debug module of the RISC-V hart may have a trigger unit. This
499
-
defines a match control register (*_mcontrol_*) containing a 4-bit
500
-
*action* field, and reserves codes 2 - 5 of this field for trace use.
498
+
defines several trigger CSRs (for example `mcontrol6`, `icount`, etc.) that contain a 4-bit *action* field. Codes 2 - 5 of this field are for trace use.
501
499
These action codes are hereby defined as shown in table
502
500
<<tab:debugModuleTriggerSupport>>. If implemented, each action must generate a pulse on an output from the hart, on the same cycle as the instruction which caused the trigger is
503
501
retired.
504
502
505
503
[[tab:debugModuleTriggerSupport]]
506
-
.Debug Module trigger support (*_mcontrol_ action*)
Copy file name to clipboardExpand all lines: src/intro.adoc
+13-9Lines changed: 13 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,8 +14,11 @@ flow
14
14
* *decoder*: a piece of software that takes the trace packets emitted by
15
15
the encoder and reconstructs the execution flow of the code executed by
16
16
the RISC-V hart
17
-
* *discontinuity*: another name for ’delta’ (see above)
18
-
* *E-Trace*: Abbreviation of _Efficient Trace for RISC-V_.
17
+
* *discontinuity*: a change in the program counter that is anything other than an automatic increment to the next instruction located contiguously in memory
18
+
- *inferrable discontinuity*: a discontinuity in the program counter resulting from a branch or *direct jump*
19
+
- *uninferrable discontinuity*: a discontinuity in the program counter that is not inferrable (see above)
20
+
- *updiscon*: contraction of ’uninferrable PC discontinuity’
21
+
* *E-Trace*: Abbreviation of _Efficient Trace for RISC-V_
19
22
* *ELF*: executable and linkable format
20
23
* *encoder*: a piece of hardware that takes in instruction execution
21
24
information from a RISC-V hart and transforms it into trace packets
@@ -29,13 +32,13 @@ hart to experience an unexpected transfer of control
29
32
* *ISA*: instruction set architecture
30
33
* *jump*: an instruction which unconditionally changes the execution
31
34
flow
32
-
* *direct jump*: an instruction which unconditionally changes the
35
+
- *direct jump*: an instruction which unconditionally changes the
33
36
execution flow by changing the PC by a constant value
34
-
* *indirect jump*: an instruction which unconditionally changes the
37
+
- *indirect jump*: an instruction which unconditionally changes the
35
38
execution flow by changing the PC to a computed value
36
-
* *inferable jump*: a jump where the target address is supplied via a
39
+
- *inferrable jump*: a jump where the target address is supplied via a
37
40
constant embedded within the jump opcode
38
-
* *uninferable jump*: a jump which is not inferable (see above)
41
+
- *uninferrable jump*: a jump which is not inferrable (see above)
39
42
* *LSB*: least significant bit
40
43
* *MSB*: most significant bit
41
44
* *packet*: the atomic unit of encoded trace information emitted by the
@@ -49,15 +52,16 @@ machine state is updated (sometimes referred to as ’commit’ or
49
52
* *RHTI* RISC-V Hart to Trace Encoder Interface (this specification)
50
53
* *trap*: the transfer of control to a trap handler caused by either an
51
54
exception or an interrupt
52
-
* *updiscon*: contraction of ’uninferable PC discontinuity’
55
+
53
56
54
57
=== Nomenclature
55
58
56
59
In the following sections items in *bold* are signals or fields within a
57
60
packet.
58
61
59
-
Items in *_bold italics_* are mnemonics for instructions or CSRs defined
60
-
in the RISC-V ISA
62
+
Items in *_bold italics_* are mnemonics for instructions defined in the RISC-V ISA
63
+
64
+
Items `lowlighted` are CSRs or other registers defined in the RISC-V ISA
61
65
62
66
Items in _italics_ with names ending _’_p’_ refer to parameters either
63
67
built into the hardware or configurable hardware values.
0 commit comments