Skip to content

Commit

Permalink
✨ QLL writer for mQCA (MagCAD & SCERPA) (#49)
Browse files Browse the repository at this point in the history
* ✨ Adjusted write_qll_layout for mQCA files aimed at the SCERPA simulator and MagCAD's mQCA plugin

* 🐛 Prevent I/O cells from being handled twice in the mQCA qll writer and represent constant cells as input pins

* 🐛 Correctly handle multi-layer mQCA designs

* 🐛 Fix additional via cells

* 📝 Added documentation on SCERPA
  • Loading branch information
marcelwa committed Sep 8, 2022
1 parent 37f76b5 commit 696412d
Show file tree
Hide file tree
Showing 7 changed files with 630 additions and 118 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ Gate libraries:
File formats:

- `*.qca` for [QCADesigner](https://waluslab.ece.ubc.ca/qcadesigner/)
- `*.qll` for [MagCAD](https://topolinano.polito.it/) and [SCERPA](https://ieeexplore.ieee.org/document/8935211)
- `*.fqca` for [QCA-STACK](https://github.com/wlambooy/QCA-STACK)
- `*.svg` for visual representation

Expand All @@ -89,10 +90,10 @@ Gate libraries:

File formats:

- `*.qll` for [ToPoliNano and MagCAD](https://topolinano.polito.it/)
- `*.qcc` for [ToPoliNano and MagCAD](https://topolinano.polito.it/)
- `*.qcc` for [ToPoliNano](https://topolinano.polito.it/)
- `*.qll` for [ToPoliNano & MagCAD](https://topolinano.polito.it/)

Many thanks to Umberto Garlando and Fabrizio Riente for their support!
Many thanks to Umberto Garlando, Fabrizio Riente, and Giuliana Beretta for their support!

### Silicon Dangling Bonds (SiDBs)

Expand Down
5 changes: 3 additions & 2 deletions cli/cmd/io/qll.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,14 @@ class qll_command : public command
{
using Lyt = typename std::decay_t<decltype(lyt_ptr)>::element_type;

if constexpr (std::is_same_v<fiction::technology<Lyt>, fiction::inml_technology>)
if constexpr (std::is_same_v<fiction::technology<Lyt>, fiction::inml_technology> ||
std::is_same_v<fiction::technology<Lyt>, fiction::qca_technology>)
{
fiction::write_qll_layout(*lyt_ptr, filename);
}
else
{
env->out() << fmt::format("[e] {}'s cell technology is not iNML but {}", get_name(lyt_ptr),
env->out() << fmt::format("[e] {}'s cell technology is neither iNML nor QCA but {}", get_name(lyt_ptr),
fiction::tech_impl_name<fiction::technology<Lyt>>)
<< std::endl;
}
Expand Down
4 changes: 2 additions & 2 deletions docs/cli.rst
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,8 @@ Cell-level layouts can be written to files parsable by various physical simulato
simulators are currently supported:

- ``qca <filename>`` creates a `QCADesigner <https://waluslab.ece.ubc.ca/qcadesigner/>`_ QCA file
- ``qll <filename>`` creates a `ToPoliNano & MagCAD <https://topolinano.polito.it/>`_ QLL file
- ``qcc <filename>`` creates a `ToPoliNano & MagCAD <https://topolinano.polito.it/>`_ QCC file
- ``qcc <filename>`` creates a `ToPoliNano <https://topolinano.polito.it/>`_ design component QCC file
- ``qll <filename>`` creates a `ToPoliNano & MagCAD <https://topolinano.polito.it/>`_ or `SCERPA <https://ieeexplore.ieee.org/document/8935211>`_ layout QLL file
- ``sqd <filename>`` creates a `SiQAD <https://github.com/siqad/siqad>`_ SQD file
- ``fqca <filename>`` creates a `QCA-STACK <https://github.com/wlambooy/QCA-STACK>`_ FQCA file

Expand Down
18 changes: 10 additions & 8 deletions docs/io/physical_simulation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,22 @@ QCA-STACK
.. doxygenfunction:: fiction::read_fqca_layout(std::istream& is, const std::string& name = "")
.. doxygenfunction:: fiction::read_fqca_layout(const std::string& filename, const std::string& name = "")

ToPoliNano & MagCAD
###################

**Header:** ``fiction/io/write_qll_layout.hpp``

.. doxygenfunction:: fiction::write_qll_layout(const Lyt& lyt, std::ostream& os)
.. doxygenfunction:: fiction::write_qll_layout(const Lyt& lyt, const std::string& filename)

ToPoliNano
##########

**Header:** ``fiction/io/write_qcc_layout.hpp``

.. doxygenfunction:: fiction::write_qcc_layout(const Lyt& lyt, std::ostream& os, write_qcc_layout_params ps = {})
.. doxygenfunction:: fiction::write_qcc_layout(const Lyt& lyt, const std::string& filename, write_qcc_layout_params ps = {})

MagCAD & SCERPA
###############

**Header:** ``fiction/io/write_qll_layout.hpp``

.. doxygenfunction:: fiction::write_qll_layout(const Lyt& lyt, std::ostream& os)
.. doxygenfunction:: fiction::write_qll_layout(const Lyt& lyt, const std::string& filename)

SiQAD
#####

Expand Down
Loading

0 comments on commit 696412d

Please sign in to comment.