rand_mode() switches randomization of a field off or on without touching its declaration. That’s handy for pinning a field while debugging, and easy to leave behind: the field is still declared rand, still compiles, and every other field keeps randomizing.
The constructor makes two rand_mode() calls: one turns randomization off for the whole object, the other turns it back on for one field. Which field is left pinned?
Fix the class below.
RequirementSeq_num varies across repeated randomize() calls, as channel already does.
One working answer: brokenbench's own fix for this exercise. Try a few runs first.
What changes, against the code you started with:
docker run --pull always --rm -p 127.0.0.1:8787:8787 ghcr.io/adibis/brokenbench-runnerLooking for a runner on this computer…
The first start downloads about 250 MB; after that it starts in seconds and only downloads again when there's an update. Your code goes to the runner on your computer, not to chipdv.io.