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

✨ Defect-aware on-the-fly SiDB circuit designer #317

Merged
merged 246 commits into from
Aug 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
246 commits
Select commit Hold shift + click to select a range
162421c
:art: Refactored the technology mapping interface into its own header…
marcelwa Sep 6, 2023
c7723ad
:memo: Added documentation
marcelwa Sep 6, 2023
c7098e0
:art: Addressed `clang-tidy`'s warnings
marcelwa Sep 6, 2023
7de9081
:white_check_mark: Increased test coverage
marcelwa Sep 6, 2023
b6960dd
Merge branch 'main' into tech-mapper
marcelwa Sep 8, 2023
6d5f029
:construction_worker: Updated workflows to disable benchmark compilation
marcelwa Sep 8, 2023
c027c3f
Merge branch 'main' into tech-mapper
marcelwa Sep 8, 2023
ffab67e
:sparkles: Introduce support for 2-ary LT, GT, LE, and GE gates
marcelwa Sep 14, 2023
b944649
:sparkles: Introduce support for the LT, GT, LE, and GE gates in the …
marcelwa Sep 15, 2023
1430e98
:sparkles: Added the outline for the SiDB dynamic gate library for on…
marcelwa Sep 15, 2023
5cbc1bb
:sparkles: Added the outline for the SiDB dynamic gate library experi…
marcelwa Sep 15, 2023
d94fc4b
:art: Added folder to write layouts into
marcelwa Sep 15, 2023
7b53df8
:art: Utilize ALL 2-input functions
marcelwa Sep 15, 2023
a064981
:memo: Added truth table helper functions to the RST documentation
marcelwa Sep 15, 2023
0e84fb5
:sparkles: support defects in the ``SiDB Gate Designer``
Drewniok Sep 21, 2023
8dd7ebf
:art: update docu.
Drewniok Sep 21, 2023
6306a97
:art: delete redundant line.
Drewniok Sep 21, 2023
49c0981
:art: implement Marcel's suggestions.
Drewniok Sep 21, 2023
36639cd
Merge branch 'main' into 2-input-pr
Drewniok Sep 21, 2023
341eac8
Merge branch 'main' into design_gates_with_defects
Drewniok Sep 22, 2023
fc8e96a
Merge branch 'main' into design_gates_with_defects
Drewniok Sep 25, 2023
cff1b1a
Merge branch 'design_gates_with_defects' into 2-input-pr
Drewniok Sep 25, 2023
e47e060
:rocket: P&R and gate on the fly works.
Drewniok Sep 27, 2023
d46db79
Merge branch 'main' into 2-input-pr
Drewniok Sep 29, 2023
06c5657
:art: shift skeletons to have same position as the bestagon gates
Drewniok Sep 29, 2023
697f65b
:art: add skeletons
Drewniok Sep 29, 2023
3d6d834
:art: delete redundant code.
Drewniok Sep 29, 2023
20bdee5
:art: choose correct order
Drewniok Sep 29, 2023
d22abaf
:art: add mode to use for gate design
Drewniok Sep 29, 2023
f430f81
:art: add check to ensure that placed SiDBs have the specified distan…
Drewniok Sep 29, 2023
df94713
:art: code cleanup
Drewniok Sep 29, 2023
d5bae81
:construction: latest version.
Drewniok Oct 6, 2023
47f32a8
:art: commit before architectural change
Drewniok Oct 12, 2023
0e11175
:art: architectural change
Drewniok Oct 13, 2023
3d1babc
:art: architectural change and update blacklist.
Drewniok Oct 17, 2023
9afc8e0
Merge branch 'main' into 2-input-pr
Drewniok Oct 23, 2023
f29a8c3
:sparkles: defect-aware SiDB circuit designer with on-the-fly gate de…
Drewniok Oct 24, 2023
e9ee1e1
:art: small fix.
Drewniok Oct 24, 2023
9078a51
:fire: delete bestagon.json
Drewniok Oct 24, 2023
44290cd
:art: add previous bestagon.json file
Drewniok Oct 24, 2023
64e34fb
:art: add additional parameter ``influence_radius_charged_defects``
Drewniok Oct 25, 2023
a5bfa7b
:bug: fix smaller bugs.
Drewniok Oct 25, 2023
ff5ea7c
:art: update evaluation script.
Drewniok Oct 25, 2023
4aa58a2
:art: small fix.
Drewniok Oct 25, 2023
2fe77ce
:fire: delete skeletons.
Drewniok Oct 25, 2023
39f640c
:fire: delete .gitkeep.
Drewniok Oct 25, 2023
514de49
:art: take original generate_defective_surface.py file
Drewniok Oct 25, 2023
b3dbe95
:art: ClangFormat changes
Oct 25, 2023
8429ab5
:bug: fix docu issue.
Drewniok Oct 25, 2023
8630f50
:art: update lambda expression.
Drewniok Oct 25, 2023
09797cb
:art: update docu.
Drewniok Oct 25, 2023
7df1652
:bug: add runtime digit.
Drewniok Oct 25, 2023
8a3bcf1
:art: delete ``const``
Drewniok Oct 25, 2023
5bd209c
:art: define error gate in fcn_gate_library.hpp
Drewniok Oct 25, 2023
4f97f83
:bug: fix small issue.
Drewniok Oct 25, 2023
c0bf4f1
:sparkles: function to check if gate design is impossible due to defects
Drewniok Oct 25, 2023
8ea1700
:white_check_mark: add test.
Drewniok Oct 25, 2023
7a83a58
:art: small adaptations.
Drewniok Oct 25, 2023
9cb8733
:art: ClangFormat changes
Oct 25, 2023
45c4140
Merge branch 'main' into 2-input-pr
Drewniok Oct 30, 2023
77160f3
:art: small adaptations.
Drewniok Oct 30, 2023
2a31019
:art: add note.
Drewniok Oct 30, 2023
c152ace
:art: remove ``const``.
Drewniok Oct 30, 2023
d9989a8
:art: ClangFormat changes
Oct 30, 2023
d14bab8
:art: treat neutral atomic defects differently in quickexact.hpp.
Drewniok Oct 30, 2023
ad692e5
:art: use exceptions instead of ``ERROR`` gate
Drewniok Oct 31, 2023
3389598
:art: ClangFormat changes
Oct 31, 2023
d0a1cc6
Merge branch 'main' into 2-input-pr
Drewniok Oct 31, 2023
c9c0831
:art: add more exceptions.
Drewniok Oct 31, 2023
4ebf4a4
:art: ClangFormat changes
Oct 31, 2023
2de5d75
:art: change structure.
Drewniok Oct 31, 2023
113c887
:art: implement clang-tidy suggestion.
Drewniok Oct 31, 2023
7da1df6
:art: smaller changes here and there.
Drewniok Nov 2, 2023
55e1486
:art: ClangFormat changes
Nov 2, 2023
e12e659
Merge branch 'main' into 2-input-pr
Drewniok Nov 10, 2023
e86789f
Merge branch 'main' into 2-input-pr
Drewniok Nov 13, 2023
ff5ebe7
:art: revert changes in experiment script.
Drewniok Nov 13, 2023
cad6aa7
:art: implement Marcel's suggestions, first batch.
Drewniok Nov 13, 2023
0520b2c
:art: ClangFormat changes
Nov 13, 2023
30460dc
:art: rename dynamic to on-the-fly.
Drewniok Nov 13, 2023
34d77bb
:art: introduce new exception class.
Drewniok Nov 13, 2023
b72638c
:art: rename ``tile`` to ``error_tile``.
Drewniok Nov 13, 2023
a1f09de
:art: fix typo.
Drewniok Nov 13, 2023
ff748dd
:art: small fix.
Drewniok Nov 13, 2023
1812232
:art: add reference.
Drewniok Nov 14, 2023
88639a3
:art: ClangFormat changes
Nov 14, 2023
cb0f2e6
:white_check_mark: update unit test.
Drewniok Nov 14, 2023
f3df805
Merge branch 'main' into 2-input-pr
Drewniok Nov 16, 2023
7b7667c
Merge branch 'main' into 2-input-pr
Drewniok Nov 17, 2023
ac96346
:art: implement Marcel's suggestions.
Drewniok Nov 17, 2023
5a0a22f
:art: ClangFormat changes
Nov 17, 2023
a4e1ee9
:art: small fix.
Drewniok Nov 17, 2023
ad3e93e
:art: add parameter as typename.
Drewniok Nov 20, 2023
10eb70a
:art: allow fiction coordinates for simulation.
Drewniok Nov 21, 2023
b8e2160
:art: remove redundant static_cast.
Drewniok Nov 21, 2023
c22e3e8
:art: add static_cast
Drewniok Nov 22, 2023
835a19b
:white_check_mark: add further test for bdl input iterator.
Drewniok Nov 22, 2023
91f2d1a
:art: add missing namespace.
Drewniok Nov 22, 2023
6ccb477
:art: allow offset coordinates for gate design
Drewniok Nov 22, 2023
559e189
:art: reformat code
Drewniok Nov 22, 2023
e28b1b4
:art: small fix.
Drewniok Nov 22, 2023
2bc311e
Merge branch 'avoid_siqad_coordinates_in_simulation' into 2-input-pr
Drewniok Nov 22, 2023
2788e87
:art: structural changes.
Drewniok Nov 23, 2023
ac9dcae
Merge branch 'main' into 2-input-pr
Drewniok Nov 23, 2023
5037d2e
:art: small change.
Drewniok Nov 27, 2023
cd7a205
Merge branch 'main' into 2-input-pr
Drewniok Nov 27, 2023
53e5038
Merge branch 'main' into 2-input-pr
Drewniok Nov 27, 2023
4a2b37f
:art: add termination condition.
Drewniok Nov 27, 2023
e04513b
Merge branch 'main' into 2-input-pr
Drewniok Nov 27, 2023
e99c505
:art: small fix.
Drewniok Nov 27, 2023
5178b68
Merge branch 'main' into 2-input-pr
Drewniok Dec 3, 2023
9c661a7
:construction: trying to fix windows CI issue.
Drewniok Dec 3, 2023
faa5570
:art: ClangFormat changes
Dec 3, 2023
93afb11
:construction: trying to fix windows CI issue.
Drewniok Dec 3, 2023
5ecdda3
Merge remote-tracking branch 'upstream/2-input-pr' into 2-input-pr
Drewniok Dec 3, 2023
8268543
Merge branch 'main' into 2-input-pr
Drewniok Dec 3, 2023
8a37c18
:construction: trying to fix windows CI issue.
Drewniok Dec 3, 2023
68d50e9
:art: ClangFormat changes
Dec 3, 2023
a54c86e
:construction: trying to fix windows CI issue.
Drewniok Dec 3, 2023
4b84d07
Merge remote-tracking branch 'upstream/2-input-pr' into 2-input-pr
Drewniok Dec 3, 2023
c95d8eb
:art: implement the first batch.
Drewniok Dec 5, 2023
2726ed6
Merge branch 'main' into 2-input-pr
Drewniok Dec 12, 2023
906129b
:art: some changes here and there.
Drewniok Dec 12, 2023
25beafd
Merge branch 'main' into 2-input-pr
Drewniok Jan 29, 2024
1f7f348
:art: ClangFormat changes
Jan 29, 2024
c3e7e6d
Merge branch 'main' into 2-input-pr
Drewniok Jan 29, 2024
8fad6b6
Merge remote-tracking branch 'upstream/2-input-pr' into 2-input-pr
Drewniok Jan 29, 2024
b19d7cd
:art: more consistency.
Drewniok Jan 30, 2024
2cf2c21
:art: ClangFormat changes
Jan 30, 2024
25f7b49
:art: update experiments.
Drewniok Jan 30, 2024
ec974c6
:white_check_mark: add unit test.
Drewniok Jan 30, 2024
22f4eae
Merge branch 'main' into 2-input-pr
Drewniok Mar 8, 2024
0a2b4ab
:twisted_rightwards_arrows: resolve merge conflict.
Drewniok Mar 8, 2024
a1ccd5e
Merge branch 'main' into 2-input-pr
Drewniok Mar 22, 2024
8f96508
:art: small update of experiment script.
Drewniok Mar 22, 2024
9a0634a
Merge branch 'main' into 2-input-pr
Drewniok Mar 27, 2024
1a18cdc
Merge branch 'main' into 2-input-pr
Drewniok Apr 7, 2024
c33c5e0
:twisted_rightwards_arrows: merge ``main`` in.
Drewniok Apr 7, 2024
0406b6a
Merge branch 'main' into 2-input-pr
Drewniok Apr 13, 2024
886b630
:art: ClangFormat changes
Apr 13, 2024
ba293c3
Merge branch 'main' into 2-input-pr
Drewniok Apr 19, 2024
2cd33aa
🎨 Incorporated pre-commit fixes
pre-commit-ci[bot] Apr 19, 2024
dd3c919
:art: update code after merge.
Drewniok Apr 24, 2024
bd8b5e9
Merge branch 'main' into 2-input-pr
Drewniok Apr 24, 2024
9a09cb9
:art: update code after merge.
Drewniok Apr 24, 2024
7fecd25
:memo: small fix.
Drewniok Apr 24, 2024
6437bd9
:memo: small fix.
Drewniok Apr 24, 2024
1a2f65b
:memo: small fix.
Drewniok Apr 25, 2024
713b528
:memo: small fix.
Drewniok Apr 25, 2024
dc25546
:memo: small fix.
Drewniok Apr 25, 2024
ac71a11
:art: small update of experiments.
Drewniok Apr 25, 2024
75fb5ae
Merge branch 'main' into 2-input-pr
Drewniok May 3, 2024
db31040
Merge branch 'main' into 2-input-pr
Drewniok May 26, 2024
ee0f25a
:art: fix smaller issues.
Drewniok May 26, 2024
d4dc6bb
:memo: Update pyfiction docstrings
actions-user May 26, 2024
31a6c3b
:art: small fix.
Drewniok May 26, 2024
f239635
:art: add defect support to bounding box.
Drewniok May 27, 2024
1658dcb
:art: small fixes.
Drewniok May 27, 2024
3ce98c0
🎨 Incorporated pre-commit fixes
pre-commit-ci[bot] May 27, 2024
b5b3432
:bug: ``min`` and ``max`` are calculated correctly.
Drewniok May 27, 2024
9a405fa
Merge remote-tracking branch 'origin/2-input-pr' into 2-input-pr
Drewniok May 27, 2024
f4e3b32
:art: small fix.
Drewniok May 27, 2024
ea3b798
:art: simplify the experiment script.
Drewniok May 28, 2024
ded3285
:art: small fix.
Drewniok Jun 25, 2024
a7d95ad
:art: small fix.
Drewniok Jun 25, 2024
518005b
:art: minor changes.
Drewniok Jun 26, 2024
80a9309
:art: resize via bb.
Drewniok Jun 26, 2024
0ac92b6
:art: a few structural changes.
Drewniok Jun 27, 2024
523c5e4
:memo: Update pyfiction docstrings
actions-user Jun 27, 2024
e1618fc
:art: delete header comments.
Drewniok Jun 27, 2024
d8d1d83
Merge branch 'main' into 2-input-pr
Drewniok Jul 1, 2024
48dfa4a
:art: add missing header.
Drewniok Jul 1, 2024
5d7fc87
:art: small fix.
Drewniok Jul 1, 2024
3cf6fe9
Merge branch 'main' into 2-input-pr
Drewniok Jul 2, 2024
73528b0
:art: small fix.
Drewniok Jul 9, 2024
826dc12
Merge branch 'main' into 2-input-pr
Drewniok Jul 9, 2024
0e7bc03
:art: small renaming.
Drewniok Jul 12, 2024
4385648
:art: small change.
Drewniok Jul 12, 2024
7eea636
:art: small fixes.
Drewniok Jul 12, 2024
57242a1
Merge remote-tracking branch 'origin/2-input-pr' into 2-input-pr
Drewniok Jul 12, 2024
66da426
Merge branch 'main' into 2-input-pr
Drewniok Jul 12, 2024
122e637
:memo: Update pyfiction docstrings
actions-user Jul 12, 2024
2b94c9f
:art: small fixes.
Drewniok Jul 15, 2024
71727a0
:memo: Update pyfiction docstrings
actions-user Jul 15, 2024
333fd9f
:art: small fixes.
Drewniok Jul 15, 2024
c5fcb13
:art: small fixes.
Drewniok Jul 15, 2024
0618650
Merge branch 'main' into 2-input-pr
Drewniok Jul 24, 2024
0bf8fe5
:memo: Update pyfiction docstrings
actions-user Jul 24, 2024
b9a7b9e
:art: integrate first batch of Marcel's comments.
Drewniok Jul 28, 2024
b815039
Merge branch 'main' into 2-input-pr
Drewniok Jul 28, 2024
7ae0dcf
:memo: Update pyfiction docstrings
actions-user Jul 28, 2024
074f7e3
:art: small fix.
Drewniok Jul 28, 2024
50ae700
Merge remote-tracking branch 'origin/2-input-pr' into 2-input-pr
Drewniok Jul 28, 2024
744305e
🎨 Incorporated pre-commit fixes
pre-commit-ci[bot] Jul 28, 2024
3c08eec
:memo: Update pyfiction docstrings
actions-user Jul 28, 2024
bca4e19
Merge branch 'main' into 2-input-pr
Drewniok Aug 3, 2024
8bfb234
:art: implement Marcel's suggestions.
Drewniok Aug 3, 2024
9c20c1e
:memo: add docu.
Drewniok Aug 3, 2024
8c26f93
🎨 Incorporated pre-commit fixes
pre-commit-ci[bot] Aug 3, 2024
4989db1
:memo: small fix.
Drewniok Aug 3, 2024
6340e03
Merge remote-tracking branch 'origin/2-input-pr' into 2-input-pr
Drewniok Aug 3, 2024
c962404
:memo: small fix.
Drewniok Aug 3, 2024
e580dd4
:memo: update docu.
Drewniok Aug 6, 2024
b15f85c
Merge branch 'main' into 2-input-pr
Drewniok Aug 6, 2024
9b9a09a
:memo: Update pyfiction docstrings
actions-user Aug 6, 2024
6bd6d3f
:art: remove superfluous header files.
Drewniok Aug 6, 2024
8c7fe8d
:art: add missing headers.
Drewniok Aug 6, 2024
ffae62d
:art: fix headers.
Drewniok Aug 8, 2024
88bd546
Merge branch 'main' into 2-input-pr
Drewniok Aug 8, 2024
860b191
Merge branch 'main' into 2-input-pr
Drewniok Aug 11, 2024
0e3802d
🎨 Incorporated pre-commit fixes
pre-commit-ci[bot] Aug 11, 2024
95a1fb1
:memo: Update pyfiction docstrings
actions-user Aug 11, 2024
9ff7da0
:memo: small fix.
Drewniok Aug 12, 2024
2e51488
:art: Consistency changes and docstring fixes
marcelwa Aug 14, 2024
1727fca
:memo: Update pyfiction docstrings
actions-user Aug 14, 2024
c0b0cf7
:art: small renaming.
Drewniok Aug 16, 2024
b304143
:art: small fix.
Drewniok Aug 16, 2024
21b2a2b
:memo: Update pyfiction docstrings
actions-user Aug 16, 2024
e5cc5f1
Merge branch 'main' into 2-input-pr
Drewniok Aug 16, 2024
e1fee6f
🎨 Incorporated pre-commit fixes
pre-commit-ci[bot] Aug 16, 2024
f88bc18
:art: small fix.
Drewniok Aug 16, 2024
c44f621
Merge remote-tracking branch 'origin/2-input-pr' into 2-input-pr
Drewniok Aug 16, 2024
a4170d4
:art: symplify code.
Drewniok Aug 16, 2024
99ac4de
🎨 Incorporated pre-commit fixes
pre-commit-ci[bot] Aug 16, 2024
b64d3e6
:art: integrate Marcel's comment.
Drewniok Aug 16, 2024
09434f5
:memo: Update pyfiction docstrings
actions-user Aug 16, 2024
82a69b8
:art: fix missing renaming.
Drewniok Aug 16, 2024
cecca38
Merge branch 'main' into 2-input-pr
Drewniok Aug 16, 2024
f5a547c
Merge branch 'main' into 2-input-pr
marcelwa Aug 16, 2024
d7fa79e
:art: integrate marcel's feedback.
Drewniok Aug 17, 2024
0b1ab57
:green_heart: try to fix codecov issue.
Drewniok Aug 17, 2024
2a4315f
:memo: Update pyfiction docstrings
actions-user Aug 17, 2024
e9d8980
:green_heart: try to fix codecov issue.
Drewniok Aug 17, 2024
b1c76e7
Merge remote-tracking branch 'origin/2-input-pr' into 2-input-pr
Drewniok Aug 17, 2024
fc0074c
:green_heart: try to fix codecov issue.
Drewniok Aug 17, 2024
9252e4d
:green_heart: try to fix codecov issue.
Drewniok Aug 17, 2024
d27bdb2
:green_heart: try to fix codecov issue.
Drewniok Aug 17, 2024
57b6e9f
:green_heart: try to fix codecov issue.
Drewniok Aug 17, 2024
4eefa56
:green_heart: try to fix codecov issue.
Drewniok Aug 17, 2024
9da21e6
:green_heart: try to fix codecov issue.
Drewniok Aug 17, 2024
0191ac1
:green_heart: try to fix codecov issue.
Drewniok Aug 17, 2024
e220cfc
:green_heart: try to fix codecov issue.
Drewniok Aug 17, 2024
8c437c0
:green_heart: try to fix codecov issue.
Drewniok Aug 17, 2024
c0160f8
:rewind: revert changes.
Drewniok Aug 17, 2024
234f060
:memo: small fix.
Drewniok Aug 17, 2024
a8fff29
:memo: small fix.
Drewniok Aug 17, 2024
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
Expand Up @@ -10,6 +10,7 @@

#include <fiction/algorithms/network_transformation/fanout_substitution.hpp>

#include <pybind11/cast.h>
#include <pybind11/pybind11.h>

namespace pyfiction
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

#include <fiction/algorithms/network_transformation/technology_mapping.hpp>

#include <pybind11/cast.h>
#include <pybind11/pybind11.h>

namespace pyfiction
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "pyfiction/documentation.hpp"
#include "pyfiction/types.hpp"

#include <fiction/io/print_layout.hpp>
#include <fiction/traits.hpp>

#include <pybind11/pybind11.h>
Expand Down
660 changes: 625 additions & 35 deletions bindings/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ inline void sidb_defects(pybind11::module& m)
m.def("is_neutrally_charged_defect", &fiction::is_neutrally_charged_defect, "defect"_a,
DOC(fiction_is_neutrally_charged_defect));

m.def("defect_extent", &fiction::defect_extent, "defect"_a, DOC(fiction_defect_extent));
m.def("defect_extent", &fiction::defect_extent, "defect"_a, "charged_defect_spacing_overwrite"_a,
"neutral_defect_spacing_overwrite"_a, DOC(fiction_defect_extent));
}

} // namespace pyfiction
Expand Down
4 changes: 4 additions & 0 deletions cli/cmd/logic/map.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ class map_command : public command
add_flag("--nor", ps.nor2, "Enable the use of NOR gates");
add_flag("--xor,-x", ps.xor2, "Enable the use of XOR gates");
add_flag("--xnor", ps.xnor2, "Enable the use of XNOR gates");
add_flag("--lt", ps.lt2, "Enable the use of LT gates");
add_flag("--gt", ps.gt2, "Enable the use of GT gates");
add_flag("--le", ps.le2, "Enable the use of LE gates");
add_flag("--ge", ps.ge2, "Enable the use of GE gates");
add_flag("--inv,-i", ps.inv, "Enable the use of NOT gates");

add_flag("--maj,-m", ps.maj3, "Enable the use of MAJ gates");
Expand Down
1 change: 1 addition & 0 deletions docs/algorithms/algorithms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ Physical Design
determine_clocking.rst
apply_gate_library.rst
design_sidb_gates.rst
on_the_fly_circuit_design_on_defective_surface.rst


Verification
Expand Down
1 change: 1 addition & 0 deletions docs/algorithms/apply_gate_library.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ implementations for each gate present in the passed ``gate_level_layout``.
**Header:** ``fiction/algorithms/physical_design/apply_gate_library.hpp``

.. doxygenfunction:: fiction::apply_gate_library(const GateLyt& lyt)
.. doxygenfunction:: fiction::apply_parameterized_gate_library(const GateLyt& lyt, const Params& params)

.. tab:: Python
.. autofunction:: mnt.pyfiction.apply_qca_one_library
Expand Down
33 changes: 33 additions & 0 deletions docs/algorithms/on_the_fly_circuit_design_on_defective_surface.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
.. _on_the_fly_design:

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

This algorithm is designed to create SiDB circuits on a clocked surface, accommodating the presence of atomic defects.

1. **Blacklist Generation**:

Initially, a blacklist of gate-tile pairs is generated. This blacklist is based on the locations of neutrally charged atomic defects and their overlap with the I/O pins of the SiDB skeletons.

2. **Gate-Level Layout Design**:

Using the generated blacklist, a gate-level layout is designed with the ``exact`` algorithm. This process involves:

- **Valid Layout Found**:

If a valid gate-level layout is found, the corresponding gates are implemented with SiDBs.

- **Invalid Layout**:

If a valid layout is not found, the blacklist is updated, and the placement and routing process is repeated.

This iterative approach ensures that the designed SiDB circuits can effectively handle defects present on the surface.


**Header:** ``fiction/algorithms/physical_design/on_the_fly_circuit_design_on_defective_surface.hpp``

.. doxygenstruct:: fiction::on_the_fly_circuit_design_params
:members:
.. doxygenstruct:: fiction::on_the_fly_circuit_design_stats
:members:
.. doxygenfunction:: fiction::on_the_fly_circuit_design_on_defective_surface
15 changes: 15 additions & 0 deletions docs/technology/gate_libraries.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ Abstract Gate Library
:members:

.. doxygenclass:: fiction::unsupported_gate_type_exception
:members:
.. doxygenclass:: fiction::unsupported_gate_orientation_exception
:members:

**Header:** ``fiction/technology/cell_ports.hpp``

Expand Down Expand Up @@ -58,3 +60,16 @@ SiDB Bestagon Library

.. doxygenclass:: fiction::sidb_bestagon_library
:members:

Parameterized SiDB Library
--------------------------

**Header:** ``fiction/technology/sidb_on_the_fly_gate_library.hpp``

.. doxygenstruct:: fiction::sidb_on_the_fly_gate_library_params
:members:
.. doxygenclass:: fiction::sidb_on_the_fly_gate_library
:members:

.. doxygenclass:: fiction::gate_design_exception
:members:
10 changes: 10 additions & 0 deletions docs/technology/simulation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,16 @@ distributions of the SiDBs. Charge distribution surfaces are returned by the SiD
:members:


Is SiDB gate design deemed impossible
-------------------------------------

**Header:** ``fiction/technology/is_sidb_gate_design_impossible.hpp``

.. doxygenstruct:: fiction::is_sidb_gate_design_impossible_params
:members:
.. doxygenfunction:: fiction::is_sidb_gate_design_impossible


Physical Constants
------------------

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
//
// Created by Jan Drewniok on 20.10.23.
//

#if (FICTION_Z3_SOLVER)

#include "fiction_experiments.hpp"

#include <fiction/algorithms/network_transformation/technology_mapping.hpp>
#include <fiction/algorithms/physical_design/design_sidb_gates.hpp>
#include <fiction/algorithms/physical_design/on_the_fly_circuit_design_on_defective_surface.hpp>
#include <fiction/algorithms/simulation/sidb/sidb_simulation_engine.hpp>
#include <fiction/io/read_sidb_surface_defects.hpp>
#include <fiction/layouts/bounding_box.hpp>
#include <fiction/technology/area.hpp>
#include <fiction/technology/cell_technologies.hpp>
#include <fiction/technology/sidb_defect_surface.hpp>
#include <fiction/technology/sidb_defects.hpp>
#include <fiction/traits.hpp>
#include <fiction/types.hpp>

#include <fmt/format.h>
#include <lorina/lorina.hpp>
#include <mockturtle/algorithms/cut_rewriting.hpp>
#include <mockturtle/algorithms/equivalence_checking.hpp>
#include <mockturtle/algorithms/miter.hpp>
#include <mockturtle/algorithms/node_resynthesis/xag_npn.hpp>
#include <mockturtle/io/verilog_reader.hpp>
#include <mockturtle/networks/klut.hpp>
#include <mockturtle/networks/xag.hpp>
#include <mockturtle/utils/stopwatch.hpp>
#include <mockturtle/views/depth_view.hpp>

#include <cassert>
#include <cstdlib>
#include <string>

// This script conducts defect-aware placement and routing with defect-aware on-the-fly SiDB gate design. Thereby, SiDB
// circuits can be designed in the presence of atomic defects.

int main() // NOLINT
{
using gate_lyt = fiction::hex_even_row_gate_clk_lyt;
using cell_lyt = fiction::sidb_cell_clk_lyt_cube;

fiction::design_sidb_gates_params<fiction::cell<cell_lyt>> design_gate_params{};
design_gate_params.simulation_parameters = fiction::sidb_simulation_parameters{2, -0.32};
// needs to be changed if a different skeleton is used.
design_gate_params.canvas = {{24, 17}, {34, 28}};

design_gate_params.number_of_sidbs = 3;
design_gate_params.sim_engine = fiction::sidb_simulation_engine::QUICKEXACT;
design_gate_params.termination_cond =
fiction::design_sidb_gates_params<fiction::cell<cell_lyt>>::termination_condition::AFTER_FIRST_SOLUTION;

// save atomic defects which their respective physical parameters as experimentally determined by T. R. Huff, T.
// Dienel, M. Rashidi, R. Achal, L. Livadaru, J. Croshaw, and R. A. Wolkow, "Electrostatic landscape of a
// Hydrogen-terminated Silicon Surface Probed by a Moveable Quantum Dot."
const auto stray_db = fiction::sidb_defect{fiction::sidb_defect_type::DB, -1, 4.1, 1.8};
const auto si_vacancy = fiction::sidb_defect{fiction::sidb_defect_type::SI_VACANCY, -1, 10.6, 5.9};

static const std::string layouts_folder =
fmt::format("{}/physical_design_with_on_the_fly_gate_design/layouts", EXPERIMENTS_PATH);

// read-in the initial defects. Physical parameters of the defects are not stored yet.
auto surface_lattice_initial = fiction::read_sidb_surface_defects<cell_lyt>(
"../../experiments/physical_design_with_on_the_fly_gate_design/1_percent_with_charged_surface.txt");

// create an empty surface.
fiction::sidb_defect_surface<cell_lyt> surface_lattice{};

// add physical parameters of the defects to the surface_lattice.
surface_lattice_initial.foreach_sidb_defect(
[&surface_lattice, &stray_db, &si_vacancy](const auto& cd)
{
if (cd.second.type == fiction::sidb_defect_type::DB)
{
surface_lattice.assign_sidb_defect(cd.first, stray_db);
}
else if (cd.second.type == fiction::sidb_defect_type::SI_VACANCY)
{
surface_lattice.assign_sidb_defect(cd.first, si_vacancy);
}
else
{
surface_lattice.assign_sidb_defect(cd.first, cd.second);
}
});

// determine bounding-box of the surface to set the aspect ratio of the surface lattice.
const auto bb_defect_surface = fiction::bounding_box_2d{surface_lattice};
surface_lattice.resize(bb_defect_surface.get_max());

const auto lattice_tiling = gate_lyt{{11, 30}};

experiments::experiment<std::string, double, uint64_t, bool> sidb_circuits_with_defects{
"sidb_circuits_with_defects", "benchmark", "runtime", "number of aspect ratios", "equivalent"};

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::iscas85 &
~fiction_experiments::epfl & ~fiction_experiments::half_adder & ~fiction_experiments::full_adder &
~fiction_experiments::one_bit_add_aoig & ~fiction_experiments::one_bit_add_maj & ~fiction_experiments::cm82a_5;

for (const auto& benchmark : fiction_experiments::all_benchmarks(bench_select))
{
fmt::print("[attempts] processing {}\n", benchmark);
mockturtle::xag_network xag{};

[[maybe_unused]] const auto read_verilog_result =
lorina::read_verilog(fiction_experiments::benchmark_path(benchmark), mockturtle::verilog_reader(xag));
assert(read_verilog_result == lorina::return_code::success);

// compute depth
const mockturtle::depth_view depth_xag{xag};

const fiction::technology_mapping_params tech_map_params = fiction::all_2_input_functions();

// parameters for cut rewriting
mockturtle::cut_rewriting_params cut_params{};
cut_params.cut_enumeration_ps.cut_size = 4;

const mockturtle::xag_npn_resynthesis<mockturtle::xag_network, // the input network type
mockturtle::xag_network, // the database network type
mockturtle::xag_npn_db_kind::xag_complete> // the kind of database to use

resynthesis_function{};

// rewrite network cuts using the given re-synthesis function
const auto cut_xag = mockturtle::cut_rewriting(xag, resynthesis_function, cut_params);

// perform technology mapping
const auto mapped_network = fiction::technology_mapping(cut_xag, tech_map_params);

fiction::on_the_fly_circuit_design_params<cell_lyt> params{};
params.exact_design_parameters.scheme = "ROW4";
params.exact_design_parameters.crossings = true;
params.exact_design_parameters.border_io = false;
params.exact_design_parameters.desynchronize = true;
params.exact_design_parameters.upper_bound_x = 11; // 12 x 31 tiles
params.exact_design_parameters.upper_bound_y = 30; // 12 x 31 tiles
params.exact_design_parameters.timeout = 3'600'000; // 1h in ms

params.sidb_on_the_fly_gate_library_parameters.defect_surface = surface_lattice;
params.sidb_on_the_fly_gate_library_parameters.design_gate_params = design_gate_params;

fiction::on_the_fly_circuit_design_stats<gate_lyt> st{};

const auto result =
fiction::on_the_fly_circuit_design_on_defective_surface<decltype(mapped_network), cell_lyt, gate_lyt>(
mapped_network, lattice_tiling, params, &st);

// check equivalence
const auto miter = mockturtle::miter<mockturtle::klut_network>(mapped_network, st.gate_layout.value());
const auto eq = mockturtle::equivalence_checking(*miter);
assert(eq.has_value());

// determine bounding box and exclude atomic defects
const auto bb = fiction::bounding_box_2d<cell_lyt>(static_cast<cell_lyt>(result));

// compute area
fiction::area_stats area_stats{};
fiction::area_params<fiction::sidb_technology> area_ps{};
fiction::area(bb, area_ps, &area_stats);

sidb_circuits_with_defects(benchmark, mockturtle::to_seconds(st.time_total), st.exact_stats.num_aspect_ratios,
*eq);
sidb_circuits_with_defects.save();
sidb_circuits_with_defects.table();

// write a SiQAD simulation file
// fiction::write_sqd_layout(result, fmt::format("{}/{}.sqd", layouts_folder, benchmark));
}

return EXIT_SUCCESS;
}

#else // FICTION_Z3_SOLVER

#include <cstdlib>
#include <iostream>

int main() // NOLINT
{
std::cerr << "[e] Z3 solver is not available, please install Z3 and recompile the code" << std::endl;

return EXIT_FAILURE;
}

#endif // FICTION_Z3_SOLVER
Loading
Loading