def test_vm_cycles_to_init(): cycles = test_optimal_08.count_cycles_to_init(SP_PLATFORM) assert cycles < 80_000
def measure(platform, simulator="codegen"): return (gate_count(platform.chip)['nands'], test_optimal_08.count_pong_instructions(platform), test_optimal_08.count_pong_cycles_first_iteration( platform, simulator), test_optimal_08.count_cycles_to_init(platform, simulator))
def test_vm_cycles_to_init(): cycles = test_optimal_08.count_cycles_to_init(platform=LAZY_PLATFORM) assert cycles < 112_000
def test_vm_cycles_to_init(): cycles = test_optimal_08.count_cycles_to_init(platform=SHIFT_PLATFORM) assert cycles < 130_000
def test_cycles_to_init(): cycles = test_optimal_08.count_cycles_to_init(REG_PLATFORM) assert cycles < 60_000
def test_cycles_to_init(): cycles = test_optimal_08.count_cycles_to_init(REDUCE_PLATFORM) # compare to the project_08 solution (about 130k) assert cycles < 130_000
def test_vm_cycles_to_init(): cycles = test_optimal_08.count_cycles_to_init(platform=EIGHT_PLATFORM) assert cycles < 260_000
def test_vm_cycles_to_init(): cycles = test_optimal_08.count_cycles_to_init(platform=THREADED_PLATFORM) assert cycles < 180_000