Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Add ISCAS85 and EPFL benchmarks #221

Merged
merged 5 commits into from
May 23, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion experiments/bestagon/bestagon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ int main() // NOLINT

static constexpr const uint64_t bench_select = fiction_experiments::all & ~fiction_experiments::b1_r2 &
~fiction_experiments::clpl & ~fiction_experiments::two_bit_add_maj &
~fiction_experiments::parity;
~fiction_experiments::parity & ~fiction_experiments::iscas85 &
~fiction_experiments::epfl;

for (const auto& benchmark : fiction_experiments::all_benchmarks(bench_select))
{
Expand Down
5 changes: 3 additions & 2 deletions experiments/color_routing/color_routing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,9 @@ void ortho_sat_complete()
"runtime graph coloring (sec)",
"equivalent"};

constexpr const uint64_t bench_select =
fiction_experiments::all & ~fiction_experiments::majority & ~fiction_experiments::newtag;
constexpr const uint64_t bench_select = fiction_experiments::all & ~fiction_experiments::majority &
~fiction_experiments::newtag & ~fiction_experiments::iscas85 &
~fiction_experiments::epfl;

for (const auto& benchmark : fiction_experiments::all_benchmarks(bench_select))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ int main() // NOLINT

constexpr const uint64_t bench_select = fiction_experiments::all & ~fiction_experiments::parity &
~fiction_experiments::two_bit_add_maj & ~fiction_experiments::b1_r2 &
~fiction_experiments::clpl;
~fiction_experiments::clpl & ~fiction_experiments::iscas85 &
~fiction_experiments::epfl;

for (const auto& benchmark : fiction_experiments::all_benchmarks(bench_select))
{
Expand Down
81 changes: 77 additions & 4 deletions experiments/fiction_experiments.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ inline constexpr uint64_t xor2_f = 0b000000000000000000000000000000000
inline constexpr uint64_t one_bit_add_aoig = 0b0000000000000000000000000000000000000000000000000000000100000000;
inline constexpr uint64_t t = 0b0000000000000000000000000000000000000000000000000000001000000000;
inline constexpr uint64_t t_5 = 0b0000000000000000000000000000000000000000000000000000010000000000;
inline constexpr uint64_t c17 = 0b0000000000000000000000000000000000000000000000000000100000000000;
inline constexpr uint64_t c17_f = 0b0000000000000000000000000000000000000000000000000000100000000000;
inline constexpr uint64_t b1_r2 = 0b0000000000000000000000000000000000000000000000000001000000000000;
inline constexpr uint64_t majority = 0b0000000000000000000000000000000000000000000000000010000000000000;
inline constexpr uint64_t majority_5_r1 = 0b0000000000000000000000000000000000000000000000000100000000000000;
Expand All @@ -49,15 +49,60 @@ inline constexpr uint64_t xor5_maj = 0b000000000000000000000000000000000
inline constexpr uint64_t parity = 0b0000000000000000000000000000000000000000010000000000000000000000;
inline constexpr uint64_t fontes18 = 0b0000000000000000000000000000000000000000011111111111111110000000;

inline constexpr uint64_t all = 0b0000000000000000000000000000000000000000011111111111111111111111;
/* ISCAS benchmarks */
inline constexpr uint64_t c17 = 0b0000000000000000000000000000000000000000100000000000000000000000;
inline constexpr uint64_t c432 = 0b0000000000000000000000000000000000000001000000000000000000000000;
inline constexpr uint64_t c499 = 0b0000000000000000000000000000000000000010000000000000000000000000;
inline constexpr uint64_t c880 = 0b0000000000000000000000000000000000000100000000000000000000000000;
inline constexpr uint64_t c1355 = 0b0000000000000000000000000000000000001000000000000000000000000000;
inline constexpr uint64_t c1908 = 0b0000000000000000000000000000000000010000000000000000000000000000;
inline constexpr uint64_t c2670 = 0b0000000000000000000000000000000000100000000000000000000000000000;
inline constexpr uint64_t c3540 = 0b0000000000000000000000000000000001000000000000000000000000000000;
inline constexpr uint64_t c5315 = 0b0000000000000000000000000000000010000000000000000000000000000000;
inline constexpr uint64_t c6288 = 0b0000000000000000000000000000000100000000000000000000000000000000;
inline constexpr uint64_t c7552 = 0b0000000000000000000000000000001000000000000000000000000000000000;
inline constexpr uint64_t iscas85 = 0b0000000000000000000000000000001111111111100000000000000000000000;

/* EPFL benchmarks */
inline constexpr uint64_t adder = 0b0000000000000000000000000000010000000000000000000000000000000000;
inline constexpr uint64_t bar = 0b0000000000000000000000000000100000000000000000000000000000000000;
inline constexpr uint64_t max = 0b0000000000000000000000000001000000000000000000000000000000000000;
inline constexpr uint64_t sin = 0b0000000000000000000000000010000000000000000000000000000000000000;
inline constexpr uint64_t cavlc = 0b0000000000000000000000000100000000000000000000000000000000000000;
inline constexpr uint64_t ctrl = 0b0000000000000000000000001000000000000000000000000000000000000000;
inline constexpr uint64_t dec = 0b0000000000000000000000010000000000000000000000000000000000000000;
inline constexpr uint64_t i2c = 0b0000000000000000000000100000000000000000000000000000000000000000;
inline constexpr uint64_t int2float = 0b0000000000000000000001000000000000000000000000000000000000000000;
inline constexpr uint64_t priority = 0b0000000000000000000010000000000000000000000000000000000000000000;
inline constexpr uint64_t router = 0b0000000000000000000100000000000000000000000000000000000000000000;
inline constexpr uint64_t arbiter = 0b0000000000000000001000000000000000000000000000000000000000000000;
inline constexpr uint64_t voter = 0b0000000000000000010000000000000000000000000000000000000000000000;
inline constexpr uint64_t square = 0b0000000000000000100000000000000000000000000000000000000000000000;
inline constexpr uint64_t log2 = 0b0000000000000001000000000000000000000000000000000000000000000000;
inline constexpr uint64_t sqrt = 0b0000000000000010000000000000000000000000000000000000000000000000;
inline constexpr uint64_t multiplier = 0b0000000000000100000000000000000000000000000000000000000000000000;
inline constexpr uint64_t epfl = 0b0000000000000111111111111111110000000000000000000000000000000000;

inline constexpr uint64_t all = 0b000000000000011111111111111111111111111111111111111111111111111;

/* extra functions */


static constexpr const std::array benchmarks {
"trindade16/mux21", "trindade16/xor2", "trindade16/xnor2", "trindade16/par_gen",
"trindade16/HA", "trindade16/FA", "trindade16/par_check",

"fontes18/xor", "fontes18/1bitAdderAOIG", "fontes18/t", "fontes18/t_5", "fontes18/c17", "fontes18/b1_r2",
"fontes18/majority", "fontes18/majority_5_r1", "fontes18/newtag", "fontes18/clpl", "fontes18/xor5_r1",
"fontes18/1bitAdderMaj", "fontes18/cm82a_5", "fontes18/2bitAdderMaj", "fontes18/xor5Maj", "fontes18/parity"};
"fontes18/1bitAdderMaj", "fontes18/cm82a_5", "fontes18/2bitAdderMaj", "fontes18/xor5Maj", "fontes18/parity",

"iscas85/c17", "iscas85/c432", "iscas85/c499", "iscas85/c880", "iscas85/c1355", "iscas85/c1908", "iscas85/c2670",
"iscas85/c3540", "iscas85/c5315", "iscas85/c6288", "iscas85/c7552",

"epfl/adder", "epfl/bar", "epfl/max", "epfl/sin", "epfl/cavlc", "epfl/ctrl", "epfl/dec", "epfl/i2c",
"epfl/int2float", "epfl/priority", "epfl/router", "epfl/arbiter", "epfl/voter", "epfl/square", "epfl/log2",
"epfl/sqrt", "epfl/multiplier",
};

// clang-format on
// NOLINTEND(readability-identifier-naming)
Expand Down Expand Up @@ -90,10 +135,38 @@ std::vector<std::string> fontes18_benchmarks(uint64_t selection = fontes18)
return result;
}

std::vector<std::string> iscas85_benchmarks(uint64_t selection = iscas85)
simon1hofmann marked this conversation as resolved.
Show resolved Hide resolved
{
std::vector<std::string> result{};
for (uint64_t i = 23u; i < 34u; ++i)
{
if (((selection >> i) & 1u) != 0u)
{
result.emplace_back(benchmarks.at(i));
}
}

return result;
}

std::vector<std::string> epfl_benchmarks(uint64_t selection = epfl)
simon1hofmann marked this conversation as resolved.
Show resolved Hide resolved
{
std::vector<std::string> result{};
for (uint64_t i = 34u; i < 51u; ++i)
{
if (((selection >> i) & 1u) != 0u)
{
result.emplace_back(benchmarks.at(i));
}
}

return result;
}

std::vector<std::string> all_benchmarks(uint64_t selection = all)
{
std::vector<std::string> result{};
for (uint64_t i = 0u; i < 23u; ++i)
for (uint64_t i = 0u; i < 51u; ++i)
{
if (((selection >> i) & 1u) != 0u)
{
Expand Down