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

🎨 Improved usability of the on-the-fly SiDB gate library #634

Open
wants to merge 88 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
9477cf8
:memo: Update pyfiction docstrings
actions-user Dec 12, 2024
35fed45
Merge branch 'cda-tum:main' into main
Drewniok Dec 26, 2024
bc905b7
Merge branch 'cda-tum:main' into main
Drewniok Jan 2, 2025
f188a69
Merge branch 'cda-tum:main' into main
Drewniok Jan 7, 2025
65ec0a5
Merge branch 'cda-tum:main' into main
Drewniok Jan 8, 2025
24c2421
Merge branch 'cda-tum:main' into main
Drewniok Jan 9, 2025
4113659
:memo: Update pyfiction docstrings
actions-user Jan 9, 2025
72e08f4
Merge branch 'cda-tum:main' into main
Drewniok Jan 11, 2025
dfb71fb
Merge branch 'cda-tum:main' into main
Drewniok Jan 12, 2025
d5c5ff5
Merge branch 'cda-tum:main' into main
Drewniok Jan 13, 2025
9d45592
Merge branch 'cda-tum:main' into main
Drewniok Jan 13, 2025
dfaf039
Merge branch 'cda-tum:main' into main
Drewniok Jan 14, 2025
09c654e
:art: small changes.
Drewniok Jan 14, 2025
da5bc9d
:sparkles: add function to count charged and uncharged defects.
Drewniok Jan 15, 2025
fc096de
:white_check_mark: add test files for apply gate library.
Drewniok Jan 15, 2025
ca3f957
:construction_worker: add TEST_PATH to cmake.
Drewniok Jan 15, 2025
6c4f457
:art: small changes.
Drewniok Jan 15, 2025
bc58c7d
:art: restructure code to make the on-the-fly circuit design more acc…
Drewniok Jan 15, 2025
50fc4cc
:white_check_mark: add test for the apply gate library function.
Drewniok Jan 15, 2025
593bb30
:sparkles: add function to detect defects.
Drewniok Jan 15, 2025
6dd2c89
:art: several smaller fixes and changes.
Drewniok Jan 15, 2025
0d54041
:art: small fix.
Drewniok Jan 15, 2025
be59657
:memo: Update pyfiction docstrings
actions-user Jan 15, 2025
af15694
Merge branch 'cda-tum:main' into main
Drewniok Jan 15, 2025
83f354d
Merge branch 'main' into make_on_the_fly_more_accessible
Drewniok Jan 15, 2025
9b44258
:memo: Update pyfiction docstrings
actions-user Jan 15, 2025
54c0d00
:art: solve merge issue.
Drewniok Jan 15, 2025
3daff0b
Merge remote-tracking branch 'origin/make_on_the_fly_more_accessible'…
Drewniok Jan 15, 2025
7889a43
:memo: Update pyfiction docstrings
actions-user Jan 15, 2025
49ebab6
:art: solve merge issue.
Drewniok Jan 15, 2025
e516acd
:art: solve merge issue.
Drewniok Jan 15, 2025
952a0a5
Merge remote-tracking branch 'origin/make_on_the_fly_more_accessible'…
Drewniok Jan 15, 2025
762a0ff
:art: solve merge issue.
Drewniok Jan 15, 2025
29c480a
:memo: Update pyfiction docstrings
actions-user Jan 15, 2025
4444544
:art: small fix.
Drewniok Jan 18, 2025
78b5962
:alembic: update experiment after renaming.
Drewniok Jan 18, 2025
74dfaab
Merge branch 'cda-tum:main' into main
Drewniok Jan 19, 2025
5598bce
Merge branch 'cda-tum:main' into main
Drewniok Jan 23, 2025
7a1cde8
Merge branch 'cda-tum:main' into main
Drewniok Jan 24, 2025
ecb1fbb
Merge branch 'cda-tum:main' into main
Drewniok Jan 25, 2025
8c6bd0a
Merge branch 'cda-tum:main' into main
Drewniok Jan 28, 2025
7e83ea4
:white_check_mark: add test files.
Drewniok Jan 28, 2025
884e1bb
:art: implement Marcel's feedback.
Drewniok Jan 28, 2025
c669c9a
Merge branch 'main' into make_on_the_fly_more_accessible
Drewniok Jan 28, 2025
afd8ee6
:memo: Update pyfiction docstrings
actions-user Jan 28, 2025
fd2e3eb
:memo: update docu.
Drewniok Jan 28, 2025
3a78118
:art: Slight revamp of the CMake test configuration
marcelwa Jan 28, 2025
2c83095
Merge remote-tracking branch 'origin/make_on_the_fly_more_accessible'…
marcelwa Jan 28, 2025
308da48
:bug: fix typo.
Drewniok Jan 28, 2025
5004cc8
:white_check_mark: update test.
Drewniok Jan 28, 2025
e1b3bed
:white_check_mark: update test.
Drewniok Jan 28, 2025
581e18d
:white_check_mark: add test files.
Drewniok Jan 29, 2025
d1b9fb3
:art: restructuring.
Drewniok Jan 29, 2025
f94f5ab
:memo: Update pyfiction docstrings
actions-user Jan 29, 2025
1c5e90e
:art: small fix.
Drewniok Jan 29, 2025
a8736b8
:art: small fix.
Drewniok Jan 29, 2025
fc8e96d
Merge branch 'cda-tum:main' into main
Drewniok Jan 30, 2025
b2231cc
Merge branch 'main' into make_on_the_fly_more_accessible
Drewniok Jan 30, 2025
e50b86f
:art: small fix.
Drewniok Jan 30, 2025
43dccab
:art: revert changes.
Drewniok Jan 30, 2025
f13556f
:art: try to fix windows CI.
Drewniok Jan 30, 2025
a4ec5fd
:art: small fixes.
Drewniok Jan 30, 2025
affdf46
:memo: Update pyfiction docstrings
actions-user Jan 30, 2025
d99ce1e
:green_heart: try to fix windows CI.
Drewniok Jan 30, 2025
7016d22
:green_heart: try to fix windows CI.
Drewniok Jan 31, 2025
9f1d8a1
Merge branch 'cda-tum:main' into main
Drewniok Jan 31, 2025
3a89613
Merge branch 'main' into make_on_the_fly_more_accessible
Drewniok Jan 31, 2025
82485b8
:green_heart: try to fix windows CI.
Drewniok Jan 31, 2025
943391d
:green_heart: try to fix windows CI.
Drewniok Jan 31, 2025
5073c49
:green_heart: update docu.
Drewniok Jan 31, 2025
71d4430
:green_heart: fix windows CI.
Drewniok Jan 31, 2025
df35a98
:memo: small fix.
Drewniok Jan 31, 2025
9bd5238
Merge branch 'main' into make_on_the_fly_more_accessible
Drewniok Feb 3, 2025
4003bc4
Merge branch 'main' into make_on_the_fly_more_accessible
Drewniok Feb 4, 2025
efcf859
:children_crossing: structure test files in folders.
Drewniok Feb 5, 2025
8e4670d
:art: implement Marcel's feedback.
Drewniok Feb 6, 2025
244101a
:art: implement Marcel's feedback.
Drewniok Feb 6, 2025
4ef728a
:memo: Update pyfiction docstrings
actions-user Feb 6, 2025
28c5311
:art: fix typo.
Drewniok Feb 6, 2025
7ef7b78
:art: small fix.
Drewniok Feb 6, 2025
2ea3faf
:memo: Update pyfiction docstrings
actions-user Feb 6, 2025
0379d50
:art: revert test line.
Drewniok Feb 6, 2025
14b393e
Merge branch 'main' into make_on_the_fly_more_accessible
Drewniok Feb 13, 2025
c5438a1
:memo: adjust readme.
Drewniok Feb 14, 2025
39d528a
Merge branch 'main' into make_on_the_fly_more_accessible
Drewniok Feb 14, 2025
6b05f22
Merge branch 'main' into make_on_the_fly_more_accessible
Drewniok Feb 16, 2025
73ffff3
:art: implement Marcel's feedback.
Drewniok Feb 18, 2025
511f11a
Merge branch 'main' into make_on_the_fly_more_accessible
Drewniok Feb 18, 2025
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
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.. _on_the_fly_design:

SiDB Circuit Design Algorithm in the Presence of Atomic Defects
SiDB Circuit Design Algorithm on defectivein the Presence of Atomic Defects
---------------------------------------------------------------

This algorithm is designed to create SiDB circuits on a clocked surface, accommodating the presence of atomic defects.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,34 @@ namespace fiction
{

/**
* Exception thrown when no valid placement and routing is found for the given blacklist.
* If the blacklist is overly restrictive, finding a valid placement and routing becomes impossible, resulting in this
* exception being thrown.
*/
class unsuccessful_pr_error : public std::runtime_error
{
public:
/**
* This class inherits from `std::runtime_error` and is used to signal
* errors related to unsuccessful placement and routing.
*
* @param msg The error message describing the unsuccessful placement and routing.
*/
explicit unsuccessful_pr_error(const std::string_view& msg) noexcept : std::runtime_error(msg.data()) {}
};
/**
* Exception thrown when the gate design was unsuccessful.
* Exception thrown if the gate design was unsuccessful. Depending on the given gate design parameters and the defect
* density, the gate design may fail.
*/
class unsuccessful_gate_design_error : public std::runtime_error
{
public:
/**
* This explicit constructor initializes the base `std::runtime_error` class
* with the provided error message, ensuring that the exception contains
* detailed information about the reason for the gate design failure.
*
* @param msg A descriptive message explaining why the gate design failed.
*/
explicit unsuccessful_gate_design_error(const std::string_view& msg) noexcept : std::runtime_error(msg.data()) {}
};
/**
Expand Down Expand Up @@ -133,7 +148,7 @@ template <typename Ntk, typename CellLyt, typename GateLyt>
static_assert(is_cell_level_layout_v<CellLyt>, "CellLyt is not a cell-level layout");
static_assert(has_sidb_technology_v<CellLyt>, "CellLyt is not an SiDB layout");
static_assert(mockturtle::is_network_type_v<Ntk>, "Ntk is not a network type");
static_assert(is_sidb_defect_surface_v<CellLyt>, "CellLyt is not an SiDB defect layout");
static_assert(is_sidb_defect_surface_v<CellLyt>, "CellLyt is not an SiDB defect surface");

on_the_fly_circuit_design_on_defective_surface_stats<GateLyt> st{};

Expand Down Expand Up @@ -183,21 +198,19 @@ template <typename Ntk, typename CellLyt, typename GateLyt>
{
fmt::print(stderr, "[e] Unsupported gate orientation encountered at tile: {} and ports: {}\n",
e.where(), e.which_ports());
fmt::print(stderr, "[e] Terminating loop due to critical error.\n");
break;
}

catch (...)
{
fmt::print(stderr, "[e] An unexpected error occurred during gate design.\n");
fmt::print(stderr, "[e] Terminating loop due to critical error.\n");
break;
}
}
// P&R was unsuccessful
else
{
throw unsuccessful_pr_error("Placement and routing was unsuccessful");
throw unsuccessful_pr_error("Placement and routing is impossible with the current blacklist.");
}
}

Expand Down Expand Up @@ -235,7 +248,7 @@ template <typename CellLyt, typename GateLyt>
static_assert(is_hexagonal_layout_v<GateLyt>, "GateLyt is not a hexagonal");
static_assert(is_cell_level_layout_v<CellLyt>, "CellLyt is not a cell-level layout");
static_assert(has_sidb_technology_v<CellLyt>, "CellLyt is not an SiDB layout");
static_assert(!is_sidb_defect_surface_v<CellLyt>, "CellLyt cannot be an SiDB defect layout");
static_assert(!is_sidb_defect_surface_v<CellLyt>, "CellLyt cannot be an SiDB defect surface");

CellLyt result{};

Expand Down
8 changes: 5 additions & 3 deletions include/fiction/technology/sidb_on_the_fly_gate_library.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class gate_design_exception : public std::exception
/**
* This struct encapsulates parameters for the parameterized SiDB gate library.
*
* @tparam CellType Cell type.
* @tparam CellType SiDB cell type.
*/
template <typename CellType>
struct sidb_on_the_fly_gate_library_params
Expand Down Expand Up @@ -153,12 +153,12 @@ class sidb_on_the_fly_gate_library : public fcn_gate_library<sidb_technology, 60
* case there is no possible SiDB design, the blacklist is updated and an error fcn gate is returned.
*
* @tparam GateLyt Pointy-top hexagonal gate-level layout type.
* @tparam CellLyt The type of the cell-level layout.
* @tparam CellLyt SiDB cell-level layout type.
* @tparam Params Type of the parameter used for the gate library.
* @param lyt Layout that hosts tile `t`.
* @param t Tile to be realized as a Bestagon gate.
* @param parameters Parameter to design SiDB gates.
* @param defect_surface Optional atomic defect surface.
* @param defect_surface Optional atomic defect surface in case atomic defects are present.
* @return Bestagon gate representation of `t` including mirroring.
*/
template <typename GateLyt, typename CellLyt, typename Params>
Expand All @@ -167,6 +167,8 @@ class sidb_on_the_fly_gate_library : public fcn_gate_library<sidb_technology, 60
{
static_assert(is_gate_level_layout_v<GateLyt>, "GateLyt must be a gate-level layout");
static_assert(has_cube_coord_v<CellLyt>, "CellLyt must be based on cube coordinates");
static_assert(is_cell_level_layout_v<CellLyt>, "Lyt is not a cell-level layout");
static_assert(has_sidb_technology_v<CellLyt>, "Lyt is not an SiDB layout");

const auto n = lyt.get_node(t);
const auto f = lyt.node_function(n);
Expand Down
93 changes: 70 additions & 23 deletions test/algorithms/physical_design/apply_gate_library.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <fiction/algorithms/physical_design/design_sidb_gates.hpp>
#include <fiction/algorithms/simulation/sidb/is_operational.hpp>
#include <fiction/io/read_sqd_layout.hpp>
#include <fiction/io/write_sqd_layout.hpp>
#include <fiction/layouts/clocking_scheme.hpp>
#include <fiction/layouts/gate_level_layout.hpp>
#include <fiction/technology/sidb_bestagon_library.hpp>
Expand Down Expand Up @@ -85,7 +86,9 @@ TEST_CASE("Gate-level layout with AND gate", "[apply-gate-library]")
apply_parameterized_gate_library<cell_lyt, sidb_on_the_fly_gate_library, hex_even_row_gate_clk_lyt>(
layout, params);

check_equivalence(bestagon_and, fmt::format("{}/resources/AND_gate.sqd", TEST_PATH));
check_equivalence(
bestagon_and,
fmt::format("{}/resources/sidb_on_the_fly_gate_library/single_tile_layout/AND_gate.sqd", TEST_PATH));

CHECK(is_operational(bestagon_and, std::vector<tt>{create_and_tt()}, design_gate_params.operational_params)
.first == operational_status::OPERATIONAL);
Expand Down Expand Up @@ -145,7 +148,9 @@ TEST_CASE("Gate-level layout with two input wires, one double wire, and two outp
{
const auto double_wire = apply_gate_library<cell_lyt, sidb_bestagon_library, hex_even_row_gate_clk_lyt>(layout);

check_equivalence(double_wire, fmt::format("{}/resources/double_wire.sqd", TEST_PATH));
check_equivalence(
double_wire,
fmt::format("{}/resources/sidb_bestagon_library/multi_tile_layout/double_wire.sqd", TEST_PATH));
}

SECTION("Use parameterized gate library")
Expand All @@ -169,7 +174,10 @@ TEST_CASE("Gate-level layout with two input wires, one double wire, and two outp
apply_parameterized_gate_library<cell_lyt, sidb_on_the_fly_gate_library, hex_even_row_gate_clk_lyt>(
layout, params);

check_equivalence(bestagon_double_wire, fmt::format("{}/resources/predefined_double_wire.sqd", TEST_PATH));
check_equivalence(
bestagon_double_wire,
fmt::format("{}/resources/sidb_on_the_fly_gate_library/multi_tile_layout/predefined_double_wire.sqd",
TEST_PATH));
}
SECTION("Design all gates of the layout on-the-fly")
{
Expand All @@ -187,7 +195,14 @@ TEST_CASE("Gate-level layout with two input wires, one double wire, and two outp
apply_parameterized_gate_library<cell_lyt, sidb_on_the_fly_gate_library, hex_even_row_gate_clk_lyt>(
layout, params);

check_equivalence(bestagon_double_wire, fmt::format("{}/resources/double_wire_gate.sqd", TEST_PATH));
fiction::write_sqd_layout(
bestagon_double_wire,
fmt::format("{}/resources/sidb_on_the_fly_gate_library/multi_tile_layout/double_wire.sqd", TEST_PATH));

// todo
check_equivalence(
bestagon_double_wire,
fmt::format("{}/resources/sidb_on_the_fly_gate_library/multi_tile_layout/double_wire.sqd", TEST_PATH));

SECTION("with defects")
{
Expand All @@ -206,8 +221,11 @@ TEST_CASE("Gate-level layout with two input wires, one double wire, and two outp
CHECK(bestagon_double_wire_with_defects.get_sidb_defect({30, 20, 0}).type == sidb_defect_type::DB);
CHECK(bestagon_double_wire_with_defects.get_sidb_defect({45, 55, 0}).type == sidb_defect_type::DB);

check_equivalence(bestagon_double_wire,
fmt::format("{}/resources/double_wire_and_defects.sqd", TEST_PATH));
check_equivalence(
bestagon_double_wire,
fmt::format(
"{}/resources/sidb_on_the_fly_gate_library/multi_tile_layout/double_wire_and_defects.sqd",
TEST_PATH));
}
}
}
Expand All @@ -228,7 +246,8 @@ TEST_CASE("Gate-level layout with with different gates", "[apply-gate-library]")
const auto inverter =
apply_gate_library<cell_lyt, sidb_bestagon_library, hex_even_row_gate_clk_lyt>(layout);

check_equivalence(inverter, fmt::format("{}/resources/INV.sqd", TEST_PATH));
check_equivalence(inverter,
fmt::format("{}/resources/sidb_bestagon_library/multi_tile_layout/INV.sqd", TEST_PATH));
}

SECTION("Use parameterized gate library")
Expand All @@ -248,7 +267,9 @@ TEST_CASE("Gate-level layout with with different gates", "[apply-gate-library]")
apply_parameterized_gate_library<cell_lyt, sidb_on_the_fly_gate_library, hex_even_row_gate_clk_lyt>(
layout, params);

check_equivalence(inverter, fmt::format("{}/resources/INV.sqd", TEST_PATH));
check_equivalence(
inverter,
fmt::format("{}/resources/sidb_on_the_fly_gate_library/multi_tile_layout/INV.sqd", TEST_PATH));

SECTION("with defects")
{
Expand All @@ -264,7 +285,10 @@ TEST_CASE("Gate-level layout with with different gates", "[apply-gate-library]")

CHECK(inverter_with_defects.num_defects() == 1);

check_equivalence(inverter_with_defects, fmt::format("{}/resources/INV_and_defects.sqd", TEST_PATH));
check_equivalence(
inverter_with_defects,
fmt::format("{}/resources/sidb_on_the_fly_gate_library/multi_tile_layout/INV_and_defects.sqd",
TEST_PATH));
}
}
}
Expand All @@ -283,7 +307,8 @@ TEST_CASE("Gate-level layout with with different gates", "[apply-gate-library]")
const auto or_layout =
apply_gate_library<cell_lyt, sidb_bestagon_library, hex_even_row_gate_clk_lyt>(layout);

check_equivalence(or_layout, fmt::format("{}/resources/OR.sqd", TEST_PATH));
check_equivalence(or_layout,
fmt::format("{}/resources/sidb_bestagon_library/multi_tile_layout/OR.sqd", TEST_PATH));
}

SECTION("Use parameterized gate library")
Expand All @@ -303,7 +328,9 @@ TEST_CASE("Gate-level layout with with different gates", "[apply-gate-library]")
apply_parameterized_gate_library<cell_lyt, sidb_on_the_fly_gate_library, hex_even_row_gate_clk_lyt>(
layout, params);

check_equivalence(or_layout, fmt::format("{}/resources/OR.sqd", TEST_PATH));
check_equivalence(
or_layout,
fmt::format("{}/resources/sidb_on_the_fly_gate_library/multi_tile_layout/OR.sqd", TEST_PATH));

SECTION("with defects")
{
Expand All @@ -319,7 +346,10 @@ TEST_CASE("Gate-level layout with with different gates", "[apply-gate-library]")

CHECK(or_layout_with_defects.num_defects() == 1);

check_equivalence(or_layout_with_defects, fmt::format("{}/resources/OR_and_defects.sqd", TEST_PATH));
check_equivalence(
or_layout_with_defects,
fmt::format("{}/resources/sidb_on_the_fly_gate_library/multi_tile_layout/OR_and_defects.sqd",
TEST_PATH));
}
}
}
Expand All @@ -338,7 +368,8 @@ TEST_CASE("Gate-level layout with with different gates", "[apply-gate-library]")
const auto nand_layout =
apply_gate_library<cell_lyt, sidb_bestagon_library, hex_even_row_gate_clk_lyt>(layout);

check_equivalence(nand_layout, fmt::format("{}/resources/NAND.sqd", TEST_PATH));
check_equivalence(nand_layout,
fmt::format("{}/resources/sidb_bestagon_library/multi_tile_layout/NAND.sqd", TEST_PATH));
}

SECTION("Use parameterized gate library")
Expand All @@ -358,7 +389,9 @@ TEST_CASE("Gate-level layout with with different gates", "[apply-gate-library]")
apply_parameterized_gate_library<cell_lyt, sidb_on_the_fly_gate_library, hex_even_row_gate_clk_lyt>(
layout, params);

check_equivalence(nand_layout, fmt::format("{}/resources/NAND.sqd", TEST_PATH));
check_equivalence(
nand_layout,
fmt::format("{}/resources/sidb_on_the_fly_gate_library/multi_tile_layout/NAND.sqd", TEST_PATH));

SECTION("with defects")
{
Expand All @@ -379,8 +412,10 @@ TEST_CASE("Gate-level layout with with different gates", "[apply-gate-library]")

CHECK(nand_layout_with_defects.num_defects() == 2);

check_equivalence(nand_layout_with_defects,
fmt::format("{}/resources/NAND_and_defects.sqd", TEST_PATH));
check_equivalence(
nand_layout_with_defects,
fmt::format("{}/resources/sidb_on_the_fly_gate_library/multi_tile_layout/NAND_and_defects.sqd",
TEST_PATH));
}
}
}
Expand All @@ -399,7 +434,8 @@ TEST_CASE("Gate-level layout with with different gates", "[apply-gate-library]")
const auto nor_layout =
apply_gate_library<cell_lyt, sidb_bestagon_library, hex_even_row_gate_clk_lyt>(layout);

check_equivalence(nor_layout, fmt::format("{}/resources/NOR.sqd", TEST_PATH));
check_equivalence(nor_layout,
fmt::format("{}/resources/sidb_bestagon_library/multi_tile_layout/NOR.sqd", TEST_PATH));
}

SECTION("Use parameterized gate library")
Expand All @@ -419,7 +455,9 @@ TEST_CASE("Gate-level layout with with different gates", "[apply-gate-library]")
apply_parameterized_gate_library<cell_lyt, sidb_on_the_fly_gate_library, hex_even_row_gate_clk_lyt>(
layout, params);

check_equivalence(nor_layout, fmt::format("{}/resources/NOR.sqd", TEST_PATH));
check_equivalence(
nor_layout,
fmt::format("{}/resources/sidb_on_the_fly_gate_library/multi_tile_layout/NOR.sqd", TEST_PATH));
}
}

Expand All @@ -437,7 +475,8 @@ TEST_CASE("Gate-level layout with with different gates", "[apply-gate-library]")
const auto xor_layout =
apply_gate_library<cell_lyt, sidb_bestagon_library, hex_even_row_gate_clk_lyt>(layout);

check_equivalence(xor_layout, fmt::format("{}/resources/XOR.sqd", TEST_PATH));
check_equivalence(xor_layout,
fmt::format("{}/resources/sidb_bestagon_library/multi_tile_layout/XOR.sqd", TEST_PATH));
}

SECTION("Use parameterized gate library")
Expand All @@ -457,7 +496,9 @@ TEST_CASE("Gate-level layout with with different gates", "[apply-gate-library]")
apply_parameterized_gate_library<cell_lyt, sidb_on_the_fly_gate_library, hex_even_row_gate_clk_lyt>(
layout, params);

check_equivalence(xor_layout, fmt::format("{}/resources/XOR.sqd", TEST_PATH));
check_equivalence(
xor_layout,
fmt::format("{}/resources/sidb_on_the_fly_gate_library/multi_tile_layout/XOR.sqd", TEST_PATH));
}

SECTION("Use parameterized gate library, reject kinks")
Expand All @@ -479,7 +520,10 @@ TEST_CASE("Gate-level layout with with different gates", "[apply-gate-library]")
apply_parameterized_gate_library<cell_lyt, sidb_on_the_fly_gate_library, hex_even_row_gate_clk_lyt>(
layout, params);

check_equivalence(xor_layout, fmt::format("{}/resources/XOR_rejecting_kinks.sqd", TEST_PATH));
check_equivalence(
xor_layout,
fmt::format("{}/resources/sidb_on_the_fly_gate_library/multi_tile_layout/XOR_rejecting_kinks.sqd",
TEST_PATH));
}
}

Expand All @@ -497,7 +541,8 @@ TEST_CASE("Gate-level layout with with different gates", "[apply-gate-library]")
const auto xnor_layout =
apply_gate_library<cell_lyt, sidb_bestagon_library, hex_even_row_gate_clk_lyt>(layout);

check_equivalence(xnor_layout, fmt::format("{}/resources/XNOR.sqd", TEST_PATH));
check_equivalence(xnor_layout,
fmt::format("{}/resources/sidb_bestagon_library/multi_tile_layout/XNOR.sqd", TEST_PATH));
}

SECTION("Use parameterized gate library")
Expand All @@ -517,7 +562,9 @@ TEST_CASE("Gate-level layout with with different gates", "[apply-gate-library]")
apply_parameterized_gate_library<cell_lyt, sidb_on_the_fly_gate_library, hex_even_row_gate_clk_lyt>(
layout, params);

check_equivalence(xnor_layout, fmt::format("{}/resources/XNOR.sqd", TEST_PATH));
check_equivalence(
xnor_layout,
fmt::format("{}/resources/sidb_on_the_fly_gate_library/multi_tile_layout/XNOR.sqd", TEST_PATH));
}
}
}
Loading