<gh_stars>1-10
#!/usr/bin/python3

import sys
import pandas as pd

# Read argument: either ISCAS or EPFL
bench_set = sys.argv[1]
# Read CSV file generated by table-generator
df = pd.read_csv("./csv/" + bench_set + ".table.csv", sep="\t")
# Adjust circuit names
df = df.replace(regex=r"\.bench", value="")
df = df.replace(regex=r"\.aig", value="")
df = df.replace(regex=r"arithmetic/", value="")
df = df.replace(regex=r"random_control/", value="")
df = df.replace(regex=r"mem_ctrl", value="mem\_ctrl")
# Drop useless rows
df = df.drop([0, 1])
df = df[df["tool"] != "c17"]
# Drop useless columns
df = df.drop(["ABC "], axis=1)
df.columns = ["Circuit", "PI", "PO", "And", "Level"]
# Sort rows by circuit names
df = df.sort_values(by=["Circuit"])
# Write out a parsed csv file
df.to_csv("./csv/parsed-" + bench_set + ".csv", sep="\t", index=False)

#!/usr/bin/python3

import sys
import pandas as pd

# Read argument: either ISCAS or EPFL
bench_set = sys.argv[1]
# Read CSV file generated by table-generator
df = pd.read_csv("./csv/" + bench_set + ".table.csv", sep="\t")
# Adjust circuit names
df = df.replace(regex=r"\.bench", value="")
df = df.replace(regex=r"\.aig", value="")
df = df.replace(regex=r"arithmetic/", value="")
df = df.replace(regex=r"random_control/", value="")
df = df.replace(regex=r"mem_ctrl", value="mem\_ctrl")
# Drop useless rows
df = df.drop([0, 1])
df = df[df["tool"] != "c17"]
# Drop useless columns
df = df.drop(["ABC "], axis=1)
df.columns = ["Circuit", "PI", "PO", "And", "Level"]
# Sort rows by circuit names
df = df.sort_values(by=["Circuit"])
# Write out a parsed csv file
df.to_csv("./csv/parsed-" + bench_set + ".csv", sep="\t", index=False)
#!/usr/bin/python3 # Read argument: either ISCAS or EPFL # Read CSV file generated by table-generator # Adjust circuit names # Drop useless rows # Drop useless columns # Sort rows by circuit names # Write out a parsed csv file