Is CBO.ZERO equivalent to a fence?
No. It produces zero stores governed by store-ordering rules; it is not itself a memory fence.
cache-block zero (Zicboz).
base selects integer x0–x31; x0 gives address 0. Any explicit offset must be 0 and may be omitted; no destination register is written.
32-bit MISC-MEM: operation=000000000100, rs1=base, funct3=010, rd=00000, opcode=0001111.
RV32/RV64 Zicboz; CBZE and privilege/virtualization state control execution. Illegal, virtual, or store-class access/page/guest-page faults are possible. CMOs have no address-misaligned exception.
Store zero to all corresponding bytes; whole-block atomicity is not guaranteed. Translation selects a physical cache block; the environment supplies its size. Zero stores obey store-ordering rules.
CBO.ZERO is a Zicboz cache-block zero instruction that performs stores of zero to all bytes corresponding to the cache block containing the address in rs1. rs1 need not be aligned to the cache-block size; an implementation may update bytes in any order, granularity, and atomicity, and whole-block atomicity is not guaranteed. The cache-block size is discovered from the execution environment and is not fixed at 64 bytes; the offset may be omitted, and if present must be 0.
Shows the official CMO/prefetch encoding, offset(base) operands, effective-address-to-cache-block selection, and ISA-visible effects.
CBO.ZERO uses a 32-bit encoding; the animation starts by splitting the official fields.
The example cache-block size is 64 bytes only to show how the address selects a block; the real size is discovered from the execution environment and is not fixed at 64 bytes. This demonstration assumes identical virtual and physical addresses for the selected block; base x0 gives address 0.
This animation shows only architectural semantics from the RISC-V CMO extension: the effective address is translated before a cache block is selected, CBO execution can be environment-controlled, and prefetch is an ignorable HINT; it does not model concrete cache state, physical mappings, cache-line size, bus transactions, timing, or performance.
CBO.ZERO stores zero to every byte corresponding to the target cache block; it does not perform clean or invalidate.
cbo.zero 0(a1). Initialize the example source and enable the required extensions and state. Assume permitted access, identical virtual/physical addresses, and 64-byte cache blocks.
No. It produces zero stores governed by store-ordering rules; it is not itself a memory fence.
CBO instructions do not require rs1 to be aligned to cache-block size.