Skip to question
asic.fyi
DesignVerificationSystemVerilogFirmwareArchitectureInterviews
asic.fyi/Interview questions/Clear a write-one-to-clear interrupt

Hardware interview practice

Clear a write-one-to-clear interrupt

MediumFirmwareC

STATUS bits are write-one-to-clear. Bit 2 is pending, and other bits may become pending between the firmware read and write. Which write clears only bit 2 without clearing newly pending unrelated bits?

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. Write zero to bit 2 and ones to every other bit so only bit 2 changes.
  2. B. Write `1u << 2` directly to STATUS.
  3. C. Read STATUS twice and write the bitwise OR of both readings back.
  4. D. Read STATUS, clear bit 2 in the read value, and write the modified full word back.
Continue practicing

Related questions

FirmwareWrite-one-to-clear status bit→
asic.fyi · Learn silicon end to end.info@asic.fyi