nonoverlapping_address_ranges could check each region only against its predecessor because the array was sorted. Physical pages here are scattered in no order, so page 3 can overlap page 9 as easily as page 4. Every pair needs checking: a nested foreach over the same array, inside the constraint.
Fix the class below.
Requirements
p_start_addr + page_size <= 32'hFFFF_FFFF wraps at 32 bits near the top and lets an out-of-range page through.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.