From 718b6b6b5780257f8f676276d91d74769bb0fcb0 Mon Sep 17 00:00:00 2001 From: wmat Date: Fri, 19 Apr 2024 10:52:26 -0400 Subject: [PATCH 1/4] Fix formatting of Table 24. Deleted an extraneous new row markup. --- payload.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/payload.adoc b/payload.adoc index 063acb6..a34bbd8 100644 --- a/payload.adoc +++ b/payload.adoc @@ -657,7 +657,7 @@ failed the prediction. ,01: (cannot occur for this format) |*address*| _iaddress_width_p - iaddress_lsb_p_| Differential instruction address. |*notify*| 1| If the value of this bit is different from the MSB of -|*address*, it indicates that this packet is reporting an instruction +*address*, it indicates that this packet is reporting an instruction that is not the target of an uninferable discontinuity because a notification was requested via *trigger[2]* (see <>). From 860c220c27e7913e46ac3f4ad92a1aa5e8ac1d83 Mon Sep 17 00:00:00 2001 From: wmat Date: Fri, 19 Apr 2024 10:58:46 -0400 Subject: [PATCH 2/4] Change looplabel 4 to looplabel + 4. Added missing + sign to instances of looplabel 4. --- payload.adoc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/payload.adoc b/payload.adoc index a34bbd8..c5af959 100644 --- a/payload.adoc +++ b/payload.adoc @@ -395,7 +395,7 @@ uninferable discontinuity. It can therefore continue reconstructing the execution path until it reaches the *_JALR_*, from where it can deduce that *_opcode B_* at looplabel is the final retired instruction. However, there are circumstances where this approach does not work. For -example, consider the case where there is an exception at looplabel 4. +example, consider the case where there is an exception at looplabel + 4. In this case, the decoder cannot tell whether this occurred during the 1st or 2nd loop iterations, without additional information from the encoder. This is the purpose of the *updiscon* field. In more detail: @@ -408,7 +408,7 @@ carries on executing the 2nd pass of the loop. In this case *updiscon* == *notify*. The next packet will be a format 1/2; . Code executes through to the end of the 1st loop iteration and jumps back to looplabel, but there is then an exception, privilege change or -resync in the second iteration at looplabel 4. In this case, the +resync in the second iteration at looplabel + 4. In this case, the encoder reports looplabel using format 1/2 following the *_JALR_*, with *updiscon* == !*notify*, and the next packet is a format 3; . An exception occurs immediately after the 1st execution of looplabel. @@ -440,8 +440,8 @@ continue until it encounters looplabel a 2nd time. * If *notify* == !*address[MSB]*, this indicates case 4, 1st iteration. The decoder has reached the correct instruction. -This example uses an exception at looplabel 4, but anything that could -cause a format 3 for looplabel 4 would result in the same behavior: a +This example uses an exception at looplabel + 4, but anything that could +cause a format 3 for looplabel + 4 would result in the same behavior: a privilege change, or the expiry of the resync timer. It could also occur if looplabel was the last traced instruction (because tracing was disabled for some reason). See <> for From 842307ec18a939f2672117dc73d661729eb07acb Mon Sep 17 00:00:00 2001 From: wmat Date: Fri, 19 Apr 2024 11:50:35 -0400 Subject: [PATCH 3/4] Add missing + signs Added missing plus signs to irdepth fields. --- payload.adoc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/payload.adoc b/payload.adoc index c5af959..618baf7 100644 --- a/payload.adoc +++ b/payload.adoc @@ -348,8 +348,8 @@ predicted return address at the top of the implicit_return return address stack, or the last retired before an exception, interrupt, privilege change or resync because it is necessary to report the current address stack depth or nested call count. -|*irdepth*| _return_stack_size_p (return_stack_size_p > 0 ? 1 : 0) -call_counter_size_p_| If the value of *irreport* is different from +|*irdepth*| _return_stack_size_p + (return_stack_size_p > 0 ? 1 : 0) + + call_counter_size_p_| If the value of *irreport* is different from *updiscon*, this field indicates the number of entries on the return address stack (i.e. the entry number of the return that failed) or nested call count. If *irreport* is the same value as *updiscon*, all @@ -542,8 +542,8 @@ predicted return address at the top of the implicit_return return address stack, or the last retired before an exception, interrupt, privilege change or resync because it is necessary to report the current address stack depth or nested call count. -|*irdepth*| _return_stack_size_p (return_stack_size_p > 0 ? 1 : 0) -call_counter_size_p_| If the value of *irreport* is different from +|*irdepth*| _return_stack_size_p + (return_stack_size_p > 0 ? 1 : 0) + + call_counter_size_p_| If the value of *irreport* is different from *updiscon*, this field indicates the number of entries on the return address stack (i.e. the entry number of the return that failed) or nested call count. If *irreport* is the same value as *updiscon*, all @@ -673,8 +673,8 @@ predicted return address at the top of the implicit_return return address stack, or the last retired before an exception, interrupt, privilege change or resync because it is necessary to report the current address stack depth or nested call count. -|*irdepth*| _return_stack_size_p (return_stack_size_p > 0 ? 1 : 0) -call_counter_size_p_| If the value of *irreport* is different from +|*irdepth*| _return_stack_size_p + (return_stack_size_p > 0 ? 1 : 0) + + call_counter_size_p_| If the value of *irreport* is different from *updiscon*, this field indicates the number of entries on the return address stack (i.e. the entry number of the return that failed) or nested call count. If *irreport* is the same value as *updiscon*, all @@ -706,8 +706,8 @@ differs from the predicted return address at the top of the implicit_return return address stack, or the last retired before an exception, interrupt, privilege change or resync because it is necessary to report the current address stack depth or nested call count. -|*irdepth*| _return_stack_size_p (return_stack_size_p > 0 ? 1 : 0) -call_counter_size_p_| If the value of *irreport* is different from +|*irdepth*| _return_stack_size_p + (return_stack_size_p > 0 ? 1 : 0) + + call_counter_size_p_| If the value of *irreport* is different from *branch_map[MSB]*, this field indicates the number of entries on the return address stack (i.e. the entry number of the return that failed) or nested call count. If *irreport* is the same value as @@ -734,8 +734,8 @@ differs from the predicted return address at the top of the implicit_return return address stack, or the last retired before an exception, interrupt, privilege change or resync because it is necessary to report the current address stack depth or nested call count. -|*irdepth*| _return_stack_size_p (return_stack_size_p > 0 ? 1 : 0) -call_counter_size_p_| If the value of *irreport* is different from +|*irdepth*| _return_stack_size_p + (return_stack_size_p > 0 ? 1 : 0) + + call_counter_size_p_| If the value of *irreport* is different from *branches[MSB]*, this field indicates the number of entries on the return address stack (i.e. the entry number of the return that failed) or nested call count. If *irreport* is the same value as From 190be9db0d645ca2efd03ddf840051d840e44376 Mon Sep 17 00:00:00 2001 From: wmat Date: Fri, 19 Apr 2024 12:21:37 -0400 Subject: [PATCH 4/4] Update version to 2.0.3 Bumped version to 2.0.3 and updated Change History table. --- header.adoc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/header.adoc b/header.adoc index 1af4687..91b2038 100644 --- a/header.adoc +++ b/header.adoc @@ -2,8 +2,8 @@ Gajinder Panesar , Iain Robertson :description: Efficient Trace for RISC-V :company: RISC-V.org -:revdate: March 5, 2024 -:revnumber: 2.0.2 +:revdate: April 19, 2024 +:revnumber: 2.0.3 :url-riscv: http://riscv.org :doctype: book :pdf-theme: docs-resources/themes/riscv-pdf.yml @@ -53,6 +53,7 @@ endif::[] - Corrected typos where `lrid` was inadvertently refered to by an earlier name (`index`) in <>. + - Corrected reference decoder in <> to cover a corner-case related to trap returns. |2.0.2 |First version in AsciiDoc format. +|2.0.3 |Formatting and typo fixes. |=== [preface]