Reusable UVM agent topology model — checker

Phase 7 Wave 5 Python 3 checker file.

Download original file
import json
from pathlib import Path

d = json.loads(Path('starter.json').read_text())
assert d['agent']['passive'] == ['monitor']
assert {'sequencer', 'driver', 'monitor'} == set(d['agent']['active'])
assert set(d['analysis_subscribers']) <= set(d['environment'])
assert d['phases'] == ['build', 'connect', 'run', 'report']
print(f"PASS uvm_topology active_components={len(d['agent']['active'])} passive_drivers=0 subscribers={len(d['analysis_subscribers'])}")