UVM RAL prediction model — checker

Phase 7 Wave 6 Python 3 checker file.

Download original file
import json
from pathlib import Path

d = json.loads(Path('starter.json').read_text())
regs = {r['name']: r for r in d['registers']}
assert len({r['address'] for r in d['registers']}) == len(regs)
assert {r['access'] for r in d['registers']} == {'rw', 'ro', 'w1c'}
mirror = {name: r['reset'] for name, r in regs.items()}
mirror['control'] = 5
assert mirror['control'] == d['operations'][1][2]
print(f"PASS uvm_ral registers={len(regs)} unique_addresses=yes mirror_prediction=matched access_policies=3")