Skip to content

Commit

Permalink
👽 Updated the QLL layout writer regarding recent changes in the mQCA …
Browse files Browse the repository at this point in the history
…format (#102)
  • Loading branch information
marcelwa authored Jan 30, 2023
1 parent 3cb0b99 commit 0f2d8bb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions include/fiction/io/write_qll_layout.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ inline constexpr const char* OPEN_LAYOUT = "\t<layout>\n";
inline constexpr const char* CLOSE_LAYOUT = "\t</layout>\n";

inline constexpr const char* INML_COMPONENT_ITEM = "\t\t<item tech=\"{}\" name=\"{}\"/>\n";
inline constexpr const char* MQCA_COMPONENT_ITEM = "\t\t<item tech=\"MolQCA\" name=\"Bisferrocene\"/>\n";
inline constexpr const char* MQCA_COMPONENT_ITEM = "\t\t<item tech=\"MolFCN\" name=\"Bisferrocene\"/>\n";

inline constexpr const char* OPEN_INML_LAYOUT_ITEM = "\t\t<item comp=\"{}\" id=\"{}\" x=\"{}\" y=\"{}\">\n";
inline constexpr const char* OPEN_MQCA_LAYOUT_ITEM =
Expand Down Expand Up @@ -144,7 +144,7 @@ class write_qll_layout_impl
uint64_t cell_id{1};

const char* tech_name{std::is_same_v<technology<Lyt>, inml_technology> ? "iNML" :
std::is_same_v<technology<Lyt>, qca_technology> ? "MolQCA" :
std::is_same_v<technology<Lyt>, qca_technology> ? "MolFCN" :
"?"};

[[nodiscard]] std::vector<cell<Lyt>> sorted_pis() const noexcept
Expand Down
28 changes: 14 additions & 14 deletions test/io/write_qll_layout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ TEST_CASE("Write empty mQCA layout", "[qll]")
"<!--Generated by {} ({})-->\n"
"<qcalayout>\n"
"\t<technologies>\n"
"\t\t<settings tech=\"MolQCA\">\n"
"\t\t<settings tech=\"MolFCN\">\n"
"\t\t\t<property name=\"Layoutwidth\" value=\"2\"/>\n"
"\t\t\t<property name=\"Layoutheight\" value=\"2\"/>\n"
"\t\t\t<property name=\"layersEnabled\" value=\"true\"/>\n"
Expand All @@ -353,7 +353,7 @@ TEST_CASE("Write empty mQCA layout", "[qll]")
"\t\t</settings>\n"
"\t</technologies>\n"
"\t<components>\n"
"\t\t<item tech=\"MolQCA\" name=\"Bisferrocene\"/>\n"
"\t\t<item tech=\"MolFCN\" name=\"Bisferrocene\"/>\n"
"\t</components>\n"
"\t<layout>\n"
"\t</layout>\n"
Expand All @@ -376,7 +376,7 @@ TEST_CASE("Write single-layer mQCA AND gate", "[qll]")
"<!--Generated by {} ({})-->\n"
"<qcalayout>\n"
"\t<technologies>\n"
"\t\t<settings tech=\"MolQCA\">\n"
"\t\t<settings tech=\"MolFCN\">\n"
"\t\t\t<property name=\"Layoutwidth\" value=\"4\"/>\n"
"\t\t\t<property name=\"Layoutheight\" value=\"4\"/>\n"
"\t\t\t<property name=\"layersEnabled\" value=\"false\"/>\n"
Expand All @@ -386,10 +386,10 @@ TEST_CASE("Write single-layer mQCA AND gate", "[qll]")
"\t\t</settings>\n"
"\t</technologies>\n"
"\t<components>\n"
"\t\t<item tech=\"MolQCA\" name=\"Bisferrocene\"/>\n"
"\t\t<item tech=\"MolFCN\" name=\"Bisferrocene\"/>\n"
"\t</components>\n"
"\t<layout>\n"
"\t\t<pin tech=\"MolQCA\" name=\"const0\" direction=\"0\" id=\"1\" x=\"2\" y=\"0\" layer=\"0\"/>\n"
"\t\t<pin tech=\"MolFCN\" name=\"const0\" direction=\"0\" id=\"1\" x=\"2\" y=\"0\" layer=\"0\"/>\n"
"\t\t<item comp=\"0\" id=\"2\" x=\"2\" y=\"1\" layer=\"0\">\n"
"\t\t\t<property name=\"phase\" value=\"0\"/>\n"
"\t\t</item>\n"
Expand All @@ -405,9 +405,9 @@ TEST_CASE("Write single-layer mQCA AND gate", "[qll]")
"\t\t<item comp=\"0\" id=\"6\" x=\"2\" y=\"3\" layer=\"0\">\n"
"\t\t\t<property name=\"phase\" value=\"0\"/>\n"
"\t\t</item>\n"
"\t\t<pin tech=\"MolQCA\" name=\"a\" direction=\"0\" id=\"7\" x=\"0\" y=\"2\" layer=\"0\"/>\n"
"\t\t<pin tech=\"MolQCA\" name=\"b\" direction=\"0\" id=\"8\" x=\"2\" y=\"4\" layer=\"0\"/>\n"
"\t\t<pin tech=\"MolQCA\" name=\"f\" direction=\"1\" id=\"9\" x=\"4\" y=\"2\" layer=\"0\"/>\n"
"\t\t<pin tech=\"MolFCN\" name=\"a\" direction=\"0\" id=\"7\" x=\"0\" y=\"2\" layer=\"0\"/>\n"
"\t\t<pin tech=\"MolFCN\" name=\"b\" direction=\"0\" id=\"8\" x=\"2\" y=\"4\" layer=\"0\"/>\n"
"\t\t<pin tech=\"MolFCN\" name=\"f\" direction=\"1\" id=\"9\" x=\"4\" y=\"2\" layer=\"0\"/>\n"
"\t</layout>\n"
"</qcalayout>\n",
FICTION_VERSION, FICTION_REPO);
Expand All @@ -428,7 +428,7 @@ TEST_CASE("Write dual-layer mQCA crossover", "[qll]")
"<!--Generated by {} ({})-->\n"
"<qcalayout>\n"
"\t<technologies>\n"
"\t\t<settings tech=\"MolQCA\">\n"
"\t\t<settings tech=\"MolFCN\">\n"
"\t\t\t<property name=\"Layoutwidth\" value=\"4\"/>\n"
"\t\t\t<property name=\"Layoutheight\" value=\"4\"/>\n"
"\t\t\t<property name=\"layersEnabled\" value=\"true\"/>\n"
Expand All @@ -438,7 +438,7 @@ TEST_CASE("Write dual-layer mQCA crossover", "[qll]")
"\t\t</settings>\n"
"\t</technologies>\n"
"\t<components>\n"
"\t\t<item tech=\"MolQCA\" name=\"Bisferrocene\"/>\n"
"\t\t<item tech=\"MolFCN\" name=\"Bisferrocene\"/>\n"
"\t</components>\n"
"\t<layout>\n"
"\t\t<item comp=\"0\" id=\"1\" x=\"2\" y=\"1\" layer=\"0\">\n"
Expand Down Expand Up @@ -471,10 +471,10 @@ TEST_CASE("Write dual-layer mQCA crossover", "[qll]")
"\t\t<item comp=\"0\" id=\"10\" x=\"4\" y=\"2\" layer=\"2\">\n"
"\t\t\t<property name=\"phase\" value=\"0\"/>\n"
"\t\t</item>\n"
"\t\t<pin tech=\"MolQCA\" name=\"b\" direction=\"0\" id=\"11\" x=\"2\" y=\"0\" layer=\"0\"/>\n"
"\t\t<pin tech=\"MolQCA\" name=\"a\" direction=\"0\" id=\"12\" x=\"0\" y=\"2\" layer=\"0\"/>\n"
"\t\t<pin tech=\"MolQCA\" name=\"a'\" direction=\"1\" id=\"13\" x=\"4\" y=\"2\" layer=\"0\"/>\n"
"\t\t<pin tech=\"MolQCA\" name=\"b'\" direction=\"1\" id=\"14\" x=\"2\" y=\"4\" layer=\"0\"/>\n"
"\t\t<pin tech=\"MolFCN\" name=\"b\" direction=\"0\" id=\"11\" x=\"2\" y=\"0\" layer=\"0\"/>\n"
"\t\t<pin tech=\"MolFCN\" name=\"a\" direction=\"0\" id=\"12\" x=\"0\" y=\"2\" layer=\"0\"/>\n"
"\t\t<pin tech=\"MolFCN\" name=\"a'\" direction=\"1\" id=\"13\" x=\"4\" y=\"2\" layer=\"0\"/>\n"
"\t\t<pin tech=\"MolFCN\" name=\"b'\" direction=\"1\" id=\"14\" x=\"2\" y=\"4\" layer=\"0\"/>\n"
"\t</layout>\n"
"</qcalayout>\n",
FICTION_VERSION, FICTION_REPO);
Expand Down

0 comments on commit 0f2d8bb

Please sign in to comment.