Skip to content

Commit baff1fe

Browse files
committed
1.0.0-rc40: Waiting for official Freeze
1 parent 9ed2926 commit baff1fe

File tree

3 files changed

+31
-29
lines changed

3 files changed

+31
-29
lines changed

docs/RISC-V-N-Trace.adoc

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[[header]]
22
:description: RISC-V N-Trace (Nexus-based Trace)
33
:company: RISC-V.org
4-
:revdate: June 20, 2024
5-
:revnumber: 1.0.0_rc38
4+
:revdate: July 01, 2024
5+
:revnumber: 1.0.0_rc40
66
:revremark: Stable state (waiting for Freeze)
77
:url-riscv: http://riscv.org
88
:doctype: book
@@ -52,9 +52,8 @@ Change is extremely unlikely.
5252

5353
PDF generated on: {localdatetime}
5454

55-
=== Version 1.0.0_rc38
56-
* 2024-06-20
57-
** Spell-checker run on PDF.
55+
=== Version 1.0.0_rc40
56+
* 2024-07-01
5857
** Waiting for official Freeze
5958

6059
[Preface]
@@ -510,9 +509,12 @@ NOTE: The table below does not provide names of Trace Encoder control registers
510509
|trTeInstTracing |*Required*|See <<RISC-V_Trace_Control_Interface,RISC-V Trace Control Interface>> Specification.
511510
|trTeEmpty |*Required*|See <<RISC-V_Trace_Control_Interface,RISC-V Trace Control Interface>> Specification.
512511
[[trTeInstMode]]
513-
|trTeInstMode |*Required*|One or more of the following values must be supported: +
514-
*3:* <<mode_BTM,BTM>> (Branch Trace Messaging) mode +
515-
*6:* <<mode_HTM,HTM>> (History Trace Messaging) mode
512+
|trTeInstMode |*Required*|
513+
*3:* Generate instruction trace using <<mode_BTM,BTM>> (Branch Trace Messaging) mode. +
514+
*6:* Generate instruction trace using <<mode_HTM,HTM>> (History Trace Messaging) mode. +
515+
*0, 7:* See <<RISC-V_Trace_Control_Interface,RISC-V Trace Control Interface>> Specification. +
516+
*1-2, 4-5:* Reserved for future N-Trace use. +
517+
At least a value of *3* or *6* must be settable.
516518
[[trTeContext]]
517519
|trTeContext|Optional|Controls generation of <<msg2_Ownership,Ownership>> messages.
518520
|trTeInstTrigEnable |Optional|See <<RISC-V_Trace_Control_Interface,RISC-V Trace Control Interface>> Specification.

docs/RISC-V-Trace-Connectors.adoc

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[[header]]
22
:description: RISC-V Trace Connectors
33
:company: RISC-V.org
4-
:revdate: June 20, 2024
5-
:revnumber: 1.0.0_rc38
4+
:revdate: July 01, 2024
5+
:revnumber: 1.0.0_rc40
66
:revremark: Stable state (waiting for Freeze)
77
:url-riscv: http://riscv.org
88
:doctype: book
@@ -52,9 +52,8 @@ Change is extremely unlikely.
5252

5353
PDF generated on: {localdatetime}
5454

55-
=== Version 1.0.0_rc38
56-
* 2024-06-20
57-
** Spell-checker run on PDF.
55+
=== Version 1.0.0_rc40
56+
* 2024-07-01
5857
** Waiting for official Freeze
5958

6059
[Preface]

docs/RISC-V-Trace-Control-Interface.adoc

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[[header]]
22
:description: RISC-V Trace Control Interface
33
:company: RISC-V.org
4-
:revdate: June 25, 2024
5-
:revnumber: 1.0.0_rc39
4+
:revdate: July 01, 2024
5+
:revnumber: 1.0.0_rc40
66
:revremark: Stable state (waiting for Freeze)
77
:url-riscv: http://riscv.org
88
:doctype: book
@@ -52,9 +52,8 @@ Change is extremely unlikely.
5252

5353
PDF generated on: {localdatetime}
5454

55-
=== Version 1.0.0_rc39
56-
* 2024-06-25
57-
** Last notes from ARC done.
55+
=== Version 1.0.0_rc40
56+
* 2024-07-01
5857
** Waiting for official Freeze
5958

6059
[Preface]
@@ -86,7 +85,7 @@ Instruction Trace is a system that collects a history of processor execution, al
8685

8786
This specification does not define the hardware interconnection between the hart and Trace Encoder, as this is defined in the _Efficient Trace for RISC-V Specification Version 2.0_. This document also does not define the hardware interconnection between the Trace Encoder and Trace Funnel, or between the Trace Encoder/Funnel and Trace Sink.
8887

89-
This specification allows a wide range of implementations including low-gate-count minimal instruction trace and systems with only instrumentation trace. Implementation choices include whether to support branch trace, data trace, instrumentation trace, timestamps, external triggers, various trace sink types, and various optimization tradeoffs between gate count, features, and bandwidth requirements.
88+
This specification allows a wide range of implementations including low-gate-count minimal instruction trace and systems with only instrumentation trace. Implementation choices include whether to support instruction trace, data trace, instrumentation trace, timestamps, external triggers, various trace sink types, and various optimization tradeoffs between gate count, features, and bandwidth requirements.
9089

9190
=== Glossary
9291

@@ -150,13 +149,13 @@ By monitoring the Ingress Port, the Trace Encoder determines when a program flow
150149

151150
==== Branch Trace Messaging
152151

153-
Branch Trace Messaging is the simplest form of instruction trace. Each program counter discontinuity results in one trace message, either a Direct or Indirect Branch Message. Linear instructions (or sequences of linear instructions) do not directly generate any trace messages/packets but overflow of counters (or exceptions) may generate corresponding packets/messages - these messages are infrequent and will not affect trace compression.
152+
Branch Trace Messaging is the simplest, baseline form of instruction trace. Each program counter discontinuity results in one trace message, either a Direct or Indirect Branch Message. Linear instructions (or sequences of linear instructions) do not directly generate any trace messages/packets but overflow of counters (or exceptions) may generate corresponding packets/messages - these messages are infrequent and will not affect trace compression.
154153

155154
Indirect Branch Messages normally contain a compressed address to reduce bandwidth. The Trace Encoder emits a Branch With Sync Message containing the complete instruction address under certain conditions. This message type is a variant of the Direct or Indirect Branch Message and includes a full address and a field indicating the reason for the Sync.
156155

157156
==== Branch History Messaging
158157

159-
Both the Efficient Trace for RISC-V (E-Trace) Specification and the RISC-V N-Trace (Nexus-based Trace) specification define systems of messages intended to improve compression by reporting only whether conditional branches are taken by encoding each branch outcome in a single taken/not-taken bit. The destinations of non-inferable jumps and calls are reported as compressed addresses. Much better compression can be achieved, but an encoder implementation will typically require more hardware.
158+
Both the Efficient Trace for RISC-V (E-Trace) Specification and the RISC-V N-Trace (Nexus-based Trace) specification define systems of messages intended to improve compression by reporting only whether conditional branches are taken by encoding each branch outcome in a single taken/not-taken bit. The destinations of non-inferable jumps and calls are reported as compressed addresses. Much better optimized compression can be achieved, but an encoder implementation will typically require more hardware.
160159

161160
==== Other Optimizations
162161

@@ -548,11 +547,12 @@ down, and other register locations may be inaccessible. Hardware may take an arb
548547
|6:4 |trTeInstMode |
549548
Instruction trace generation mode +
550549
*0:* Full Instruction trace is disabled, but other trace (data trace) may be emitted. +
551-
*1-2:* Reserved for future trace use. +
552-
*3:* Generate instruction trace using <<Branch Trace Messaging,Branch Trace>>. +
553-
*4-5:* Reserved for future trace use. +
554-
*6:* Generate instruction trace using <<Branch History Messaging,Branch History Trace>>. +
555-
*7:* Reserved for vendor-defined instruction trace mode.
550+
*1-2:* Protocol defined trace mode. +
551+
*3:* Baseline instruction trace (for example <<Branch Trace Messaging,Branch Trace>>). +
552+
*4-5:* Protocol defined trace mode. +
553+
*6:* Optimized instruction trace (for example <<Branch History Messaging,Branch History Trace>>). +
554+
*7:* Reserved for vendor-defined instruction trace mode. +
555+
NOTE: When non-supported mode (different then 0) is set, it cannot revert to 0 but MUST revert to supported non-0 mode.
556556
|WARL|<<Undef,Undef>>
557557
|8:7 |--|Reserved|--|0
558558
|9 |trTeContext |Enable sending trace messages/fields with scontext/mcontext values and/or privilege levels. |WARL|<<Undef,Undef>>
@@ -628,8 +628,8 @@ NOTE: `trTeProtocol??` fields are separated from `trTeVer??` as we may have the
628628
*2:* Partial (LSB portion of return address) compare (smaller logic cost than 3 below, but in most cases adequate as chances to have an incorrect return address with same LSB bits is very slim). +
629629
*3:* Full address comparing (always assures skipped return addresses are the same as addresses deducted from call instruction). Implementation may take advantage of RAS (Return Address Stack) if implemented by the hart.
630630
|WARL|<<Undef,Undef>>
631-
|8 |trTeInstEnRepeatedHistory|Enable repeated branch history detection when set.|WARL|<<Undef,Undef>>
632-
|9 |trTeInstEnAllJumps|Enable emitting of trace message or add history bit for direct unconditional/inferable control flow changes (jumps or calls). Normally these instructions do not generate any trace as the decoder can determine the next instruction. Trace will not compress well but timestamp accuracy will be better - may be used when profiling loops.|WARL|<<Undef,Undef>>
631+
|8 |trTeInstEnRepeatedHistory|Enable repeated branch history/map detection when set.|WARL|<<Undef,Undef>>
632+
|9 |trTeInstEnAllJumps|Enable emitting of trace message or add history/map bit for direct unconditional/inferable control flow changes (jumps or calls). Normally these instructions do not generate any trace as the decoder can determine the next instruction. Trace will not compress well but timestamp accuracy will be better - may be used when profiling loops.|WARL|<<Undef,Undef>>
633633
|10 |trTeInstExtendAddrMSB|When set, allow extended handing of MSB address bits. Encoding details are trace protocol dependent.|WARL|<<Undef,Undef>>
634634
|15:11 |--|Reserved for additional instruction trace control/status bits|--|0
635635
|27:16 |trTeSrcID |Trace source ID assigned to this trace encoder. If `trTeSrcBits` is not 0 and trace source is not disabled by `trTeInhibitSrc`, then trace messages from this TE will all include a trace source field of `trTeSrcBits` bits and all messages from this TE will use this value as trace source field.|WARL|<<Undef,Undef>>
@@ -1516,7 +1516,7 @@ These requirements are applicable to the entire trace sub-system.
15161516
*Minimal Trace Encoder Register/Fields*
15171517

15181518
* Bit `trTeInstTracing` must be implemented (to start/stop instruction trace output from Trace Encoder).
1519-
* One of `trTeInstMode` = 3 (Branch Trace) or 6 (History Trace) must be implemented (can be a hard coded value).
1519+
* One of `trTeInstMode` = 3 (Baseline instruction trace) or 6 (Optimized instruction trace) must be implemented (can be a hard coded value).
15201520
* At least one of the non-0 values of `trTeInstSyncMode` must be settable (or hard coded).
15211521
* Field `trTeFormat` must correspond to implemented trace protocol (0 for E-Trace or 1 for N-Trace).
15221522
* Fields `trTeProtocolMajor` and `trTeProtocolMinor` must return versions of implemented protocol.
@@ -1657,6 +1657,7 @@ Enabling should work as follows:
16571657
** Read back and wait for confirmation (`tr??Enable` = 1).
16581658
* Enable Trace Funnel[s] in the same way.
16591659
* Configure and Enable Trace Encoder[s] in the same way (last should be writing `trTeEnable` = 1 followed by reading to verify that it is set).
1660+
** The `trTeInstMode` WARL field should be set to 6 - it may revert to different mode.
16601661
* Either manually set `trTeInstTracing=1` and/or `trTeDataTracing=1` bits or set triggers to start the trace.
16611662
* Start hart[s] to be traced (hart could be already running as well - in this case trace will be generated in the moment when `trTeInstTracing` or `trTeDataTracing` bit is set).
16621663
* Periodically read `trTeControl` for status of trace (as it may stop by itself due to triggers).

0 commit comments

Comments
 (0)