Skip to question
asic.fyi
DesignVerificationSystemVerilogFirmwareArchitectureInterviews
asic.fyi/Interview questions/Read a changing MMIO register

Hardware interview practice

Read a changing MMIO register

EasyFirmwareC

Firmware polls a device status register whose value may change independently of the CPU. The register is mapped at a fixed physical address. Why should the C access use a volatile-qualified MMIO pointer?

Try it in the question bankReason first. Then compare.

Keep this exact question selected while you check your answer and review the full solution.

Practice this question →
Choose one

Answer choices

  1. A. It tells the compiler that each access is observable and must actually read or write the addressed register rather than reuse or remove the access.
  2. B. It prevents the device from changing the register while firmware is reading it.
  3. C. It converts the physical address into a cache-coherent virtual address automatically.
  4. D. It makes the hardware register atomic and supplies all required CPU and interconnect memory barriers.
Continue practicing

Related questions

FirmwareBounded MMIO polling helper→
asic.fyi · Learn silicon end to end.info@asic.fyi