riscv-non-isa / tg-nexus-trace

RISC-V Nexus Trace TG documentation and reference code
https://jira.riscv.org/browse/RVG-96
Creative Commons Attribution 4.0 International
44 stars 32 forks source link

TYPO: HIST field bit in example pseudo-code are reversed. #68

Closed mipsrobert closed 2 months ago

mipsrobert commented 2 months ago

In example encoder pseudo-code has this section:

if (InfoIsBranchTaken(info)) encoHIST = (encoHIST << 1) | 0; // Mark branch as taken else encoHIST = (encoHIST << 1) | 1; // Mark branch as not-taken

Bits 0 and 1 are reversed. Current reference code (and everywhere else in the spec ...) HIST bit=1 means 'taken' and 0 means 'not-taken'. This is considered a typo.

mipsrobert commented 2 months ago

Fixed (by direct edit).