예제 #1
0
def test_src_child_edge():
    base_path = "./test_dfgs"
    file_path = f"{base_path}/linear_dfg.json"

    test_sched = Schedule()
    test_sched.load_dfg(file_path)
    sched_edge_id = test_sched.get_parent_edge_id(10, 3)
    sched_edge = test_sched.get_schedule_edge(sched_edge_id)
    assert sched_edge.is_src_edge
예제 #2
0
def test_data_insertion():
    Component.reset_ids()
    base_path = "./test_dfgs"
    file_path = f"{base_path}/linear_dfg.json"

    with open('config.json') as config_file:
        data = json.load(config_file)

    new_arch = TablaTemplate(data)
    test_sched = Schedule()
    test_sched.load_dfg(file_path)
    pe_id = new_arch.cat_component_map['pe'][0].component_id
    sched_edge = test_sched.get_schedule_edge(14)
    sched_edge.set_ready_cycle(0)
    sched_edge.add_source_component(pe_id)
    sched_edge.add_dest_component(pe_id)
    _ = new_arch.add_namespace_data(1, pe_id, sched_edge.namespace_name, sched_edge)