Verification #13 · 2026-10-06 · Constraints · Medium · about 15 min

The burst that runs off the end of memory

burst describes a random burst of bytes that must stay inside one memory region. The test sets first and last, the region's lowest and highest addresses, then calls randomize():

  • len is the number of bytes minus one, 0 to 255, so the burst covers addr to addr + len.
  • Every byte of the burst is inside first to last. Addresses are 16 bits, and a burst never wraps from 16'hFFFF back to 0.
  • Every burst that fits must stay possible: one that starts at first, one that ends at last, one byte, or the whole of a small region.

Run makes eight bursts in each of two regions. Some of them aren't inside their region. Fix the constraints in burst.sv.

Write and run your answer in the browser. The hidden tests check it, and it’s free.