riscv-non-isa / riscv-trace-spec

RISC-V Processor Trace Specification
https://jira.riscv.org/browse/RVG-88
Creative Commons Attribution 4.0 International
152 stars 47 forks source link

The difference between encoder_mode and ioptions fileds in Format 3 subformat 3 - Support #116

Closed zhangdujiao closed 3 months ago

zhangdujiao commented 3 months ago

The width of encoder_mode and ioptions is both "N". It seems that they all indicate the trace mode of the encoder. What is the difference between them? The encoder_mode parameter in the configuration file indicates that only value 0 is supported, which means Branch trace mode. How should this mode be understood? Is it not the BTM mode in N-Trace?

IainCRobertson commented 3 months ago

That's a poor choice of variable name that should have been spotted before. The two 'N' are not at all related. Allowing encoder_mode to be more than 1 bit is an attempt to future-proof for alternative or extended trace modes. The E-Trace spec currently only defines one mode (branch trace), hence this will be a single bit set to 0 for any implementation that just implements this standard.

Iain

From: zhangdujiao @.> Sent: 11 June 2024 08:22 To: riscv-non-isa/riscv-trace-spec @.> Cc: Subscribed @.***> Subject: [riscv-non-isa/riscv-trace-spec] The difference between encoder_mode and ioptions fileds in Format 3 subformat 3 - Support (Issue #116)

The width of encoder_mode and ioptions is both "N". It seems that they all indicate the trace mode of the encoder. What is the difference between them? The encoder_mode parameter in the configuration file indicates that only value 0 is supported, which means Branch trace mode. How should this mode be understood? Is it not the BTM mode in N-Trace?

- Reply to this email directly, view it on GitHubhttps://github.com/riscv-non-isa/riscv-trace-spec/issues/116, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALQOPST5UYHQPURCUR4UGBDZG2QTBAVCNFSM6AAAAABJDW6HHKVHI2DSMVQWIX3LMV43ASLTON2WKOZSGM2DKNRQGU2DSMY. You are receiving this because you are subscribed to this thread.Message ID: @.**@.>>

zhangdujiao commented 3 months ago

That's a poor choice of variable name that should have been spotted before. The two 'N' are not at all related. Allowing encoder_mode to be more than 1 bit is an attempt to future-proof for alternative or extended trace modes. The E-Trace spec currently only defines one mode (branch trace), hence this will be a single bit set to 0 for any implementation that just implements this standard. Iain From: zhangdujiao @.> Sent: 11 June 2024 08:22 To: riscv-non-isa/riscv-trace-spec @.> Cc: Subscribed @.> Subject: [riscv-non-isa/riscv-trace-spec] The difference between encoder_mode and ioptions fileds in Format 3 subformat 3 - Support (Issue #116) The width of encoder_mode and ioptions is both "N". It seems that they all indicate the trace mode of the encoder. What is the difference between them? The encoder_mode parameter in the configuration file indicates that only value 0 is supported, which means Branch trace mode. How should this mode be understood? Is it not the BTM mode in N-Trace? - Reply to this email directly, view it on GitHub<#116>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALQOPST5UYHQPURCUR4UGBDZG2QTBAVCNFSM6AAAAABJDW6HHKVHI2DSMVQWIX3LMV43ASLTON2WKOZSGM2DKNRQGU2DSMY. You are receiving this because you are subscribed to this thread.Message ID: @*.**@*.***>>

Got it, thanks!