RISC-V Interview Questions: ISA, Privilege Levels, and Extensions
RISC-V interviews test whether you understand how the ISA is built and how hardware behaves, not just the extension letters. Know the small mandatory base with optional extensions, the M, S, and U privilege modes, CSRs and trap handling, and the weak RVWMO memory model. A good test is walking through an illegal instruction executed from user mode.
Practice these questions live in a mock interview with a verified chip design engineer. Find an expert
Someone hands you a RISC-V core and says a user program just executed an instruction the core does not implement. What happens next, in order, and which registers change? If you can answer that without hand waving, you are already ahead of many candidates who can only recite the extension letters.
This guide uses the public RISC-V Instruction Set Manual (unprivileged and privileged volumes) as its technical base. The practice prompts and the scenario are ours, not questions reported from any employer.
How is the RISC-V ISA built?
The unprivileged specification says every implementation must include a small base integer ISA, with optional standard extensions added for general-purpose software. The base is kept small on purpose, so it can serve as a starting point for custom processors or teaching. New functionality arrives as separate optional extensions, not as a new version of the whole ISA.
RV32I and RV64I have 32-bit and 64-bit address spaces, and XLEN is the integer register width. RV32E and RV64E are for small microcontrollers and have half as many integer registers.
The RV32I chapter explains several design choices worth probing. There are no condition codes, so branches compare two registers directly. Arithmetic does not trap on overflow, and there are no delay slots. The register file has 32 entries because 16 could not fit a full three-address ISA in 16-bit instructions. Be ready to say why each choice helps a simple pipeline, and where it costs something.
Describe each standard extension in a sentence: M for multiply and divide, A for atomics, F and D for floating point, and C for 16-bit compressed instructions. The manual estimates roughly a 25 to 30 percent code size reduction from C. Treat that as an estimate, not a guarantee for your workload.
Know the details that separate you
Small facts show you read the manual. In the M extension, division by zero does not trap: the quotient has all bits set and the remainder equals the dividend, which the spec says simplifies divider hardware.
The A extension offers AMOs and LR/SC, with aq and rl bits for ordering. The manual's forward progress guarantee covers only "constrained" LR/SC loops (at most 16 instructions, with restrictions on what sits between the pair). Unconstrained sequences may never succeed on some implementations, so portable code needs a fallback.
The V extension is vector-length agnostic. Each hart defines VLEN, software sets element width and register grouping through vtype, and vsetvli returns how many elements vl the hardware will process this pass. The same binary can run on harts with different VLEN. Fixed-width SIMD usually bakes the width into the instruction, a fair contrast if you say you are generalizing.
How do privilege levels, CSRs, and traps work in RISC-V?
The privileged specification defines Machine (M), Supervisor (S), and User (U) modes. M is the highest and the only one every platform must have. An implementation can offer M only (simple embedded systems), M and U (secure embedded systems), or M, S, and U (systems running Unix-like operating systems).
CSRs are the control and status registers, a 4096-entry space per hart accessed with the Zicsr instructions. Each CSR instruction atomically reads and modifies one register, which is why csrrw can swap a value in and return the old one in a single step.
On the trap side, know mtvec (handler base and mode), mepc (address of the interrupted or faulting instruction), mcause (interrupt bit plus exception code), mtval (extra information such as a faulting address), and mstatus fields MIE, MPIE, and MPP. By default every trap goes to M-mode. Harts with S-mode can use medeleg and mideleg to delegate exceptions and interrupts to S-mode, which then updates scause, sepc, and stval instead.
What is the RISC-V memory model?
The default model is RVWMO, a weak model. A single hart appears to run its own memory operations in program order, but other harts may see them reordered unless something preserves the order: a FENCE, acquire and release annotations, paired LR/SC, or certain address, data, and control dependencies. An implementation may optionally choose the stronger Ztso. A good practice answer explains why message passing needs a fence or a release and acquire pair.
A study table
| Topic | What the specification says | Practice prompt |
|---|---|---|
| Base ISA | Small mandatory base, optional extensions | Why keep the base small, and what does it cost software? |
| Branches | No condition codes, compare and branch | What does this simplify in a pipeline? |
| M extension | Divide by zero does not trap | How would software detect it cheaply? |
| Vector | Length agnostic, set by vl and vtype | How does a strip-mined loop adapt to a different VLEN? |
| Privilege | M required, S and U optional | When would a product ship with M and U only? |
| Traps | mepc, mcause, mtvec, MPP, delegation | What does hardware write on trap entry? |
| Memory | RVWMO, FENCE, aq/rl | Where does a producer need a release? |
An illustrative scenario: an illegal instruction from user mode
Imagine a U-mode program executes an encoding the core does not implement, and delegation is not set up. Walk through the sequence the manual describes:
- Hardware writes
mepcwith the address of the faulting instruction andmcausewith the illegal-instruction code, with the interrupt bit clear. mtvalis set to zero or, optionally, to the instruction bits.mstatus.MPIEtakes the old MIE, MIE is cleared, and MPP records U.- The PC loads from
mtvec, according to its mode. - The handler saves state (often swapping a register with
mscratch), decides what to do, and ends withmret, which restores MIE from MPIE and the mode from MPP.
Then add the extension decision. If your team wants a custom instruction, the manual reserves custom encoding space for vendor extensions and separates it from standard and reserved space. You could argue for one on a hot loop, then weigh toolchain support, software that will not port, and verification effort.
Comparisons, stated carefully
If asked about Arm or x86, stay with what you can defend. RISC-V's base uses a fixed 32-bit encoding with a separate compressed extension, and its extensions are modular. Do not claim one ISA is faster or cheaper without evidence on a specific implementation. Our Arm interview process guide covers how that architecture is presented publicly.
Pair this with microarchitecture
The ISA is the software-visible interface, not a hardware design. For the other half of the conversation, practice with our CPU microarchitecture questions on pipelines, hazards, and branch prediction. If you are targeting smaller companies, read about RISC-V and CPU startup interviews. For lab-facing roles, see post-silicon bring-up questions. A two-week schedule is in our day-by-day preparation plan, and you can book a mock interview on MockVise to rehearse the trap walkthrough out loud.
Sources: RISC-V International ratified specifications, Unprivileged ISA introduction, RV32I chapter, M extension, A extension, C extension, V extension, Zicsr, RVWMO, Privileged introduction, Machine-level ISA. This article is general technical preparation guidance, not an official process or reported company questions. Specification versions change, so check the current manual and your recruiter for what a given team expects. MockVise is not affiliated with or endorsed by RISC-V International or Arm.FAQ
Q: Is the base ISA the whole RISC-V ISA? No. Every implementation must include a small base integer ISA, and optional standard extensions are added for general-purpose software. New functionality arrives as separate extensions, not as a new version of the whole ISA.
Q: Which privilege modes must a RISC-V platform support? Machine mode is the highest and the only one every platform must have. An implementation can offer M only, M and U, or M, S, and U.
Q: What happens on division by zero in the M extension? It does not trap. The quotient has all bits set and the remainder equals the dividend, which the spec says simplifies divider hardware.
Q: What memory model does RISC-V use by default? The default is RVWMO, a weak model. Other harts may see a hart's memory operations reordered unless a FENCE, acquire and release annotations, paired LR/SC, or certain dependencies preserve the order, and an implementation may optionally choose the stronger Ztso.
Related guides
Cache Coherence and Memory System Interview Questions
Prepare for CPU, SoC, and architecture interviews with cache organization, AMAT, MESI, false sharing, memory consistency, and TLB basics, grounded in public university course notes.
FPGA Prototyping vs Emulation for Pre-Silicon Verification
Compare FPGA prototyping and hardware emulation on speed, capacity, debug visibility, compile time, and use cases, grounded in public vendor and industry documentation.
SiFive, Ampere, and Rivos: RISC-V and CPU Startup Interviews
Prepare for CPU and server silicon interviews at SiFive, Ampere, and Rivos with verified public company context, labeled candidate reports, and a clear list of what to ask your recruiter.
DDR and Memory Controller Interview Questions
Prepare for memory controller and DRAM interface interviews with a practical walk through DRAM organization, timing parameters, refresh, scheduling, and training, grounded in public lecture notes and a vendor datasheet.
Practice with engineers who've run these interviews
Book a 1-on-1 mock interview with verified experts from Intel, NVIDIA, Qualcomm, and Apple. Practice these questions live in a mock interview with a verified chip design engineer.
Find your expertAlready running these interviews at work? Get paid to run them on MockVise, anonymously and on your own hours. Become an expert