Can it execute in U-mode?
With H implemented: M/HS or V=0 U-mode with HU=1 may execute. V=0 U-mode with HU=0 raises illegal-instruction; V=1 raises virtual-instruction.
Hypervisor virtual-machine load of a signed halfword using VS/VU effective privilege and two-stage translation.
HLV.H is the H-extension virtual-machine load corresponding to LH. It reads a 16-bit halfword at the address in rs1 and sign-extends it to XLEN; the instruction has no immediate offset. It is valid only in M-mode, HS-mode, or U-mode with hstatus.HU=1. The explicit access uses the VU or VS effective privilege selected by hstatus.SPVP and two-stage translation.
Shows HLV.H SYSTEM decoding, privilege checks, two-stage translation, and sign-extended writeback without modeling page walks or TLB implementation.
Assumes H is implemented, relevant privilege modes use the same XLEN, and pointer masking is disabled. Input is an assembled memory value; the selector supplies the access outcome without validating page tables. rs1=x0 fixes address zero. Steps are teaching stages, not processor cycles.
This animation shows only official architectural conditions and outcomes; page walks, TLBs, caches, and platform exception handling are not modeled.
HLV.H reads 16 bits at rs1, sign-extends to XLEN into rd.
Understand this scenario with real code like «# RV64; H 扩展 / H extension; HS-mode, SPVP=0; pointer masking disabled # x11=0x40001000; VS/G-stage access succeeds # 16-bit memory value = 0x8001 hlv.h x10, (x11) # x10 = 0xFFFFFFFFFFFF8001».
Understand this scenario with real code like «# RV64; H 扩展 / H extension; HS-mode, SPVP=0; pointer masking disabled # x11=0x40001000; VS/G-stage access succeeds # 16-bit memory value = 0x8001 hlv.h x10, (x11) # x10 = 0xFFFFFFFFFFFF8001».
Understand this scenario with real code like «# RV64; H 扩展 / H extension; HS-mode, SPVP=0; pointer masking disabled # x11=0x40001000; VS/G-stage access succeeds # 16-bit memory value = 0x8001 hlv.h x10, (x11) # x10 = 0xFFFFFFFFFFFF8001».
With H implemented: M/HS or V=0 U-mode with HU=1 may execute. V=0 U-mode with HU=0 raises illegal-instruction; V=1 raises virtual-instruction.
rs1=x0 supplies zero. With rd=rs1, read the address before writeback. rd=x0 retains exceptions and side effects.