I found references to hart on page 35 of the RISC-V 2.1 spec. However, I could not find a definition for hart in this document. Does hart refer to a hardware-thread or something more sinister?
Yes, a hart
is a hardware thread.
A RISC-V compatible core might support multiple RISC-V-compatible hardware threads, or harts, through multithreading.
The RISC-V Instruction Set Manual
Volume I: Unprivileged ISA Document Version 20191214-draft
Page 2
In simple language, a hart is a RISC-V execution context that contains a full set of RISC-V architectural registers and that executes its program independently from other harts in a RISC-V system. What constitutes a "RISC-V system" depends on the software's execution environment but for standard user-level programs, it means the user-visible harts and memory (i.e., a multithreaded Unix user process). "Execute independently" means that each hart will eventually fetch and execute its next instruction in program order regardless of the activity of other harts (at least at user level).
This is closest answer I ever got after spending a lot of time to understand what 'hart' is https://groups.google.com/a/groups.riscv.org/forum/#!topic/sw-dev/QKjUDjz_vKo
From page 20 of the RISCV Spec v2.2:
We use the term hart to unambiguously and concisely describe a hardware thread as opposed to software-managed thread contexts.
© 2022 - 2024 — McMap. All rights reserved.