RISC-V Design ยท All levels
Bitmanip and Crypto Extensions: Debug Playbook
Debug Playbook for Bitmanip and Crypto Extensions.
Debug playbook
Debug Playbook for Bitmanip and Crypto Extensions is anchored on Latency and throughput for SHA/AES/SM primitives versus scalar baselines, with constant-time behavior validation.. Convert observations into mechanism-backed decisions with explicit ownership.
Freeze workload seed, binary, compiler, firmware, and platform setup.
Find earliest persistent mechanism failure in the timeline.
Build one reduced reproducer for dominant hypothesis.
Patch minimal fix with explicit rollback gate.
Rerun correctness + performance + power matrix.
Decision tree
diagram
ROOT CAUSE TREE - Bitmanip and Crypto Extensions
Latency and throughput for SHA/AES/SM primitives versus scalar baselines, with constant-time behavior validation. regressed
|
reproducible on fixed seed?
/ \
no yes
| |
env/tool drift first failing domain?
/ | \
decode execute memory/MMU
| | |
control map bypass/FU TLB/walk/perm
|
privilege/CSR side effects checked?
Stop at first confirmed mechanism, then assign explicit owner + fix proof.Review memo template
diagram
RISC-V REVIEW MEMO - Extensions: Vector & Crypto / Bitmanip and Crypto Extensions
1. Symptom
- Failing metric: Latency and throughput for SHA/AES/SM primitives versus scalar baselines, with constant-time behavior validation.
- Failing workload slice: <name>
- Triggering mode: <privilege/virtualization/interrupt/cache/boot>
- Build and runtime tags: <toolchain/firmware/RTL revision>
2. Mechanism hypothesis
- Primary mechanism: Bitmanip (Zb*) and crypto (Zk*) extensions reduce instruction count for rotates, carry-less arithmetic, S-box style transforms, and authenticated-encryption building blocks. Integration decisions include whether to map operations onto existing integer datapaths, add dedicated crypto pipes, or share units with vector lanes. Security signoff must confirm constant-time execution, no data-dependent stall leakage, and correct interaction with privilege, trap, and debug flows.
- Competing hypotheses: <decode control / hazard / MMU / privilege / integration>
- Missing evidence: <trace/counter/proof/report>
3. Proposed action
- Smallest reversible change: <RTL/compiler/runtime/config>
- Expected movement: <throughput/latency/tail/perf-per-watt>
- Regression risk: correctness, security, power, timing, software compatibility
4. Signoff
- Required artifact: Extension coverage matrix mapping each Zb and Zk subset to microarchitectural path, benchmark gain, and side-channel checks.
- Required owners: security architecture lead, integer and crypto pipeline owner, compiler backend owner, post-silicon validation owner
- Final decision: ship, bounded rollout, rollback, or escalate