Beispiel #1
0
def simulate_original(output,cb_filepath, trace_filepath):
    set_name = os.path.basename(cb_filepath)
    output_dir = os.path.join(output, "original")
    if not os.path.exists(output_dir):
        os.makedirs(output_dir)
    output_file = os.path.join(output_dir, (set_name + "_dump_original"))
    cmd = "./UPF -i " + cb_filepath + " -cb -o " + output_file + " -dump"
    print(cmd)
    subprocess.call(cmd, shell=True)
    simulate_dump(output_file, trace_filepath, output_dir)
    # os.system("mv " + output_file + "_stats " + os.path.join(output_dir))
    os.unlink(output_file)
Beispiel #2
0
def simulate_saxpac(output, cb_filepath, trace_filepath, block_size, switch, complete):
    set_name = os.path.basename(cb_filepath)
    output_dir = os.path.join(output, "saxpac",)
    if not os.path.exists(output_dir):
        os.makedirs(output_dir)
    output_file = os.path.join(output_dir, (set_name + "_dump_saxpac_" + "block_" + str(block_size)))
    cmd = "./UPF -i " + cb_filepath + " -cb -o " + output_file + " -dump" +\
		  " -optimize " + "saxpac " + "--block_size " + \
		str(block_size)
    print(cmd)
    subprocess.call(cmd, shell=True)
    simulate_dump(output_file, trace_filepath, output_dir)
    # os.system("mv " + output_file + "_stats " + os.path.join(output_dir))
    os.unlink(output_file)
Beispiel #3
0
def simulate_fdd_and_hyp(output, cb_filepath, trace_filepath, block_size, binth, complete):
    set_name = os.path.basename(cb_filepath)
    output_dir = os.path.join(output, "fdd_and_hyp")
    if not os.path.exists(output_dir):
        os.makedirs(output_dir)
    output_file = os.path.join(output_dir, (set_name + "_dump_fdd_and_hyp_" + "block_" + str(block_size) + "_binth_" + str(binth)))
    cmd = "./UPF -i " + cb_filepath + " -cb -o " + output_file + " -dump" +\
		  " -optimize " "fdd_redundancy" + " --block_size " + \
		str(block_size) + " hypersplit " + " --binth " + str(binth) +" --block_size " + \
		str(block_size)
    print(cmd)
    subprocess.call(cmd, shell=True)
    simulate_dump(output_file, trace_filepath, output_dir)
    # os.system("mv " + output_file + "_stats " + os.path.join(output_dir))
    os.unlink(output_file)