RISC-V Design · All levels

RISC-V ISA Fundamentals: Tricky Q&A

Senior interview and review questions for RISC-V ISA Fundamentals.

Section Q&A bank

Use these drills after completing all topics in RISC-V ISA Fundamentals. Answer with workload framing, mechanism proof, owner, and release decision.

Why does RISC-V keep the base integer ISA minimal instead of adding many specialized operations to RV32I/RV64I?

diagram
[INT][RISCV][RISCV-ISA-FUNDAMENTALS]

Q: Why does RISC-V keep the base integer ISA minimal instead of adding many specialized operations to RV32I/RV64I?

A:
A minimal base keeps decode, verification, and toolchain support predictable across a wide range of implementations, from tiny embedded cores to high-performance CPUs. Specialized capabilities are then added through explicit extensions, which preserves portability and makes feature negotiation clear at compile time and runtime. This separation also reduces long-term architectural debt because optional domains can evolve without destabilizing the base software contract.

FOLLOW-UP TRAP: Assuming a minimal base means the architecture is weak rather than deliberately modular.

What is the main hardware benefit of RISC-V's repeated field placement across instruction formats?

diagram
[INT][RISCV][RISCV-ISA-FUNDAMENTALS]

Q: What is the main hardware benefit of RISC-V's repeated field placement across instruction formats?

A:
Keeping register fields in consistent bit locations across multiple formats shortens and regularizes decode logic. The decoder can extract rs1, rs2, and rd with fewer special cases, reducing critical-path pressure and implementation bugs. Immediate handling still varies by format, but the overall structure is intentionally designed so frontend logic scales well from simple in-order cores to deeper pipelines.

FOLLOW-UP TRAP: Focusing only on mnemonic simplicity and ignoring decode-path timing and complexity.

Where do calling-convention bugs most often appear in RISC-V systems?

diagram
[INT][RISCV][RISCV-ISA-FUNDAMENTALS]

Q: Where do calling-convention bugs most often appear in RISC-V systems?

A:
They usually appear at software boundaries: handwritten assembly routines, interrupt/trap entry and exit code, context switches, and foreign-function interfaces. These paths may accidentally clobber callee-saved registers, violate stack alignment, or mishandle return state. Because compilers assume ABI contracts are always respected, one boundary violation can cause nondeterministic failures far from the original bug site.

FOLLOW-UP TRAP: Believing ABI rules matter only for compiler-generated C/C++ and not low-level runtime code.

Why can enabling the C extension improve performance even though it primarily targets code size?

diagram
[INT][RISCV][RISCV-ISA-FUNDAMENTALS]

Q: Why can enabling the C extension improve performance even though it primarily targets code size?

A:
Smaller code often improves frontend efficiency: instruction-cache hit rate rises, fetch bandwidth pressure drops, and branch target footprint shrinks. Those effects can reduce stalls and improve energy efficiency, especially in instruction-footprint-limited workloads. The net gain still depends on decoder design and workload characteristics, so teams validate C-extension impact with both performance and power measurements.

FOLLOW-UP TRAP: Treating compressed instructions as code-size-only with no microarchitectural performance consequences.