Пример #1
0
def test_vm_cycles_to_init():
    cycles = test_optimal_08.count_cycles_to_init(SP_PLATFORM)

    assert cycles < 80_000
Пример #2
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))
Пример #3
0
def test_vm_cycles_to_init():
    cycles = test_optimal_08.count_cycles_to_init(platform=LAZY_PLATFORM)

    assert cycles < 112_000
Пример #4
0
def test_vm_cycles_to_init():
    cycles = test_optimal_08.count_cycles_to_init(platform=SHIFT_PLATFORM)

    assert cycles < 130_000
Пример #5
0
def test_cycles_to_init():
    cycles = test_optimal_08.count_cycles_to_init(REG_PLATFORM)

    assert cycles < 60_000
Пример #6
0
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
Пример #7
0
def test_vm_cycles_to_init():
    cycles = test_optimal_08.count_cycles_to_init(platform=EIGHT_PLATFORM)

    assert cycles < 260_000
Пример #8
0
def test_vm_cycles_to_init():
    cycles = test_optimal_08.count_cycles_to_init(platform=THREADED_PLATFORM)

    assert cycles < 180_000