def test_pong_first_iteration(): cycles = test_optimal_08.count_pong_cycles_first_iteration(SP_PLATFORM) assert cycles < 27_500
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_pong_first_iteration(): cycles = test_optimal_08.count_pong_cycles_first_iteration( platform=LAZY_PLATFORM) assert cycles < 37_500
def test_pong_first_iteration(): cycles = test_optimal_08.count_pong_cycles_first_iteration(platform=SHIFT_PLATFORM) assert cycles < 19_850
def test_pong_first_iteration(): cycles = test_optimal_08.count_pong_cycles_first_iteration(REG_PLATFORM) assert cycles < 19_200
def test_pong_first_iteration(): cycles = test_optimal_08.count_pong_cycles_first_iteration(REDUCE_PLATFORM) # Note: this isn't deterministic, but it assert cycles < 20_300
def test_pong_first_iteration(): cycles = test_optimal_08.count_pong_cycles_first_iteration(platform=EIGHT_PLATFORM) assert cycles < 85_000
def test_pong_first_iteration(): cycles = test_optimal_08.count_pong_cycles_first_iteration( platform=THREADED_PLATFORM) assert cycles < 50_000