예제 #1
0
def test_vm_pong_instructions():
    instruction_count = test_optimal_08.count_pong_instructions(
        platform=LAZY_PLATFORM)

    assert instruction_count < 24_000
예제 #2
0
def test_vm_pong_instructions():
    instruction_count = test_optimal_08.count_pong_instructions(SP_PLATFORM)

    assert instruction_count < 14_200
예제 #3
0
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))
예제 #4
0
def test_vm_pong_instructions():
    instruction_count = test_optimal_08.count_pong_instructions(platform=SHIFT_PLATFORM)

    assert instruction_count < 26_100
예제 #5
0
def test_pong_instructions():
    instruction_count = test_optimal_08.count_pong_instructions(REG_PLATFORM)

    assert instruction_count < 21_550
예제 #6
0
def test_pong_instructions():
    instruction_count = test_optimal_08.count_pong_instructions(
        REDUCE_PLATFORM)

    # compare to the project_08 solution (about 27k)
    assert instruction_count < 27_400
예제 #7
0
def test_vm_pong_instructions():
    instruction_count = test_optimal_08.count_pong_instructions(
        platform=THREADED_PLATFORM)

    assert instruction_count < 8_200