Verification #34 · 2026-10-27 · post_randomize · Easy · about 10 min

The check byte that belongs to the last frame

A frame has a random payload of 1 to 4 bytes and a check byte crc. After every call to randomize():

  • crc is the XOR of all the payload bytes, or its bitwise inverse if the test has set bad_crc to 1.
  • bad_crc is chosen by the test and is never randomized.

Run randomizes one frame six times and the check byte never matches its payload. Fix frame.sv. Grading uses three hidden checks.

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