Skip to main content

fiction – Design Automation for Field-coupled Nanotechnologies

Ubuntu macOS Windows Docker CodeQL Documentation Status codecov License PyPI Release arXiv

This code base provides a C++20 framework for field-coupled technology-independent open nanocomputing developed as part of the Munich Nanotech Toolkit (MNT) by the Chair for Design Automation at the Technical University of Munich. Within fiction, algorithms for logic synthesis, placement, routing, clocking, verification, and simulation for Field-coupled Nanocomputing (FCN) technologies are implemented.

To this end, most physical design tasks can be performed on generic data structures that abstract from particular technology or cell design. Using an extensible set of gate libraries, technologies, and cell types, these can easily be compiled down to any desired FCN technology for physical simulation.

For these use cases, fiction provides a C++ header-only library as well as Python bindings that provide data types and algorithms for recurring tasks, e.g., logic network and layout types on different abstraction levels, clocking schemes, gate libraries, design automation algorithms, etc. Additionally, fiction comes with an ABC-like CLI tool that allows quick access to its core functionality.

Documentation

If you have any questions, feel free to contact us via nanotech.cda@xcit.tum.de or by creating an issue on GitHub.

🚀 Getting Started

To help you get started with fiction, pick the interface that best fits your use case:

Goal Recommended Path Section
Try the tool immediately 🐳 Docker CLI image CLI (Docker)
Full-featured local CLI build 💻 Native build CLI (Source)
Integrate into a C++ project 📚 Header-only library C++ Library
Script / notebooks / rapid prototyping 🐍 Python bindings (PyPI) Python Bindings

For a full getting started guide, CLI command list, or API reference, see the documentation.

🐳 CLI (Docker)

This is the fastest zero-install path. We release pre-built images of the latest CLI on Docker Hub. Make sure you have Docker installed on your local system.

Pull the latest image:

docker pull mawalter/fiction:latest

Run the interactive CLI session:

docker run --rm -it mawalter/fiction

Internally, the repository lives at /app/fiction.

💻 CLI (Source)

When you want to add your own algorithms or contribute to the project, you should build fiction from source.

Clone the project with its submodules:

git clone --recursive https://github.com/cda-tum/fiction.git
cd fiction

Configure and build with CMake:

cmake -S . -B build
cmake --build build --parallel

Run the CLI:

build/cli/fiction

Here is an example of running fiction to perform a full physical design flow on a QCA circuit layout that can afterward be simulated in QCADesigner:

CLI example

📚 C++ Library

If you want to use fiction as a dependency in your project, use its header-only library.

Add fiction as a subdirectory to your CMake project and link against libfiction (assuming your project is called fanfiction):

add_subdirectory(fiction)
target_link_libraries(fanfiction PRIVATE libfiction)

Then include what you need:

#include <fiction/layouts/cell_level_layout.hpp>
#include <fiction/layouts/clocking_scheme.hpp>
#include <fiction/technology/qca_one_library.hpp>
#include <fiction/io/write_qca_layout.hpp>
#include <fiction/...>

🐍 Python Bindings

Ideal for notebooks, exploratory scripts, and integration with Python tooling.

Install the library from PyPI:

pip install mnt.pyfiction

Import it in your script:

from mnt import pyfiction

🧪 Supported Technologies

Physical design in fiction can be performed technology-independently. Only if the resulting layouts are to be physically simulated is a specific technology implementation required. To this end, fiction supports various FCN implementations together with gate libraries to compile gate-level layout abstractions down to the cell level. Additionally, output formats for external physical simulator engines are also supported.

Quantum-dot Cellular Automata (QCA)

QCA cells

Gate libraries:

File formats:

Many thanks to Frank Sill Torres for his support with the QCADesigner format, to Willem Lambooy for his support with the QCA-STACK format, and to Sophia Kuhn for implementing the SVG writer!

in-plane Nanomagnet Logic (iNML)

iNML cells

Gate libraries:

File formats:

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

Silicon Dangling Bonds (SiDBs)

SiDB cells

Gate libraries:

File formats:

Many thanks to Samuel Sze Hang Ng for his support!

⚙️ Implemented Design Automation Algorithms

The fiction framework provides implementations of state-of-the-art design automation algorithms for FCN technologies. These algorithms can be used in evaluation scripts to perform logic synthesis, physical design, layout verification, and physical simulation.

Logic Synthesis

For logic synthesis, fiction utilizes ABC and the mockturtle library that offer a multitude of logic network types and optimization algorithms. Logic synthesis can be performed in external tools and resulting Verilog/AIGER/BLIF/... files can be parsed by fiction. Alternatively, since mockturtle is included in fiction, synthesis can be applied in the same evaluation script.

Physical Design

For automatic FCN layout obtainment, fiction provides algorithms that receive mockturtle logic networks as input specification and output placed, routed, and clocked generic FCN circuits.

QCA Layout

Among these algorithms are

plus several path-finding algorithms that work on generic layouts:

On top, there is a hexagonalization algorithm to transform Cartesian layouts suitable for QCA into hexagonal layouts suitable for SiDBs, and multiple algorithms to optimize gate-level layouts post-placement:

Verification

Layout correctness can be validated using

Physical Simulation

SiDB simulation result

When a layout is compiled to the cell level via the application of a technology-dependent gate library, it can be simulated using a physical model. Currently, the following simulation algorithms are implemented in fiction:

⏰ Clocking Schemes

Regular clocking schemes have been proposed in the FCN literature and can be used as floor plans for physical design. However, sometimes it makes sense to assign clock numbers on the fly. Therefore, fiction supports both regular and irregular clocking schemes with variable numbers of clock phases: for instance, QCA uses four phases, whereas iNML needs only three.

Built-in schemes are

Columnar Row 2DDWave
Columnar Row 2DDWave
USE RES ESR
USE RES ESR
CFE Ripple SRS
CFE Ripple SRS
BANCS
BANCS

plus the mentioned irregular open clocking that works via a clock map instead of a regular extrapolated cutout.

❎ Wire Crossings

Second layer crossing

With many FCN technologies considered planar, wire crossings should be minimized if possible. However, there are some options in QCA where, using a second layer, crossings over short distances and co-planar rotated cells become possible. As both are just technical implementations of the same concept, fiction supports crossings as wires in a second grid layer in its data structures for all FCN technologies. They will also be represented as such in corresponding SVG and QCADesigner output. However, note that it is to be interpreted as the concept of crossings and could also be realized co-planar.

Wires are only allowed to cross other wires! Wires crossing gates is considered to lead to unstable signals.

⏳ Synchronization Elements

Synchronization element

A technology extension proposes to utilize the external clock signal generator in an unconventional way: by creating further asymmetric clock signals with extended Hold phases that are assigned to specific wire tiles, synchronization elements can be created that stall signals over multiple clock cycles. These artificial latches are able to feed information to any other clock number, but their usage reduces the overall throughput of the layout. In return, long wire detours for signal synchronization can be prevented.

💰 Cost Metrics

Designed layouts can be evaluated with regard to several cost functions. The following metrics are currently implemented:

Gate-level layouts:

  • Circuit dimension in tiles
  • Number of gate tiles
  • Number of wire tiles
  • Number of wire crossings
  • Number of synchronization elements
  • Critical path
  • Throughput
  • Bounding box
  • Energy dissipation based on a physical model (QCA only)

Cell-level layouts:

  • Circuit dimension in cells
  • Number of cells
  • Bounding box
  • Area usage in nm²

📊 Benchmark Library

To objectively evaluate and compare software and design automation tools, MNT Bench provides gate-level layouts for various gate libraries and clocking schemes, generated using the latest physical design and optimization algorithms, with fiction offering the corresponding read and write utilities to generate gate-level layouts from gate-level layout files (.fgl) and vice versa.

Additionally, the benchmarks folder contains the function descriptions of frequently used benchmark sets in Verilog format (.v) provided by MNT Bench.

📜 Reference

Since fiction is academic software, we would be thankful if you referred to it by citing the following publications:

@misc{fiction,
      author = {Walter, Marcel and Wille, Robert and Sill Torres, Frank and Gro{\ss}e, Daniel and Drechsler, Rolf},
      title = {{fiction: An Open Source Framework for the Design of Field-coupled Nanocomputing Circuits}},
      archivePrefix = {arXiv},
      eprint = {1905.02477},
      note = {arXiv:1905.02477},
      year = {2019},
      month = {May}
}

and

@inproceedings{mnt,
    author = {Walter, Marcel and Drewniok, Jan and Hofmann, Simon and Hien, Benjamin and Wille, Robert},
    title = {{The Munich Nanotech Toolkit (MNT)}},
    booktitle = {IEEE International Conference on Nanotechnology (IEEE NANO)},
    pages = {454--459},
    year = {2024}
}

Additionally, many algorithms implemented in fiction have been published individually. For a full list of publications, please refer to the documentation.

🙏 Acknowledgements

The Munich Nanotech Toolkit has been supported by the Bavarian State Ministry for Science and Arts through the Distinguished Professorship Program.

TUM Logo       Coat of Arms of Bavaria

Metadata

Release files for mnt.pyfiction 0.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mnt.pyfiction 0.8.0
File Size Uploaded
mnt_pyfiction-0.8.0.tar.gz 883.7 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for mnt.pyfiction 0.8.0
File
mnt_pyfiction-0.8.0-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details
mnt_pyfiction-0.8.0-cp310-abi3-manylinux_2_34_aarch64.whl CPython 3.10 abi3 Linux glibc 2.34+ ARM64 Details
mnt_pyfiction-0.8.0-cp310-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.10 abi3 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
mnt_pyfiction-0.8.0-cp310-abi3-macosx_13_0_arm64.whl CPython 3.10 abi3 macOS 13.0+ ARM64 Details

Total release size: 49.5 MB

Release files / mnt_pyfiction-0.8.0.tar.gz

Download URL mnt_pyfiction-0.8.0.tar.gz
Size 883.7 kB
Tags Source
SHA-256 checksum
How to use checksums
0c26bc2a0bbc210196172749837dc86b5ed0b6d49e1f7f5103c8d1eb0b2da50d
BLAKE2b-256 checksum
How to use checksums
d3a3c1a1809e6203ec93bcb5311dcb4f3dc6b1347a8ffb9fa3158d7a7955d483
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / mnt_pyfiction-0.8.0-cp310-abi3-win_amd64.whl

Download URL mnt_pyfiction-0.8.0-cp310-abi3-win_amd64.whl
Size 10.9 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
1fc316e1ce83384440a78b2e271273f46cb5dad917cba86078db1b73fd85eebb
BLAKE2b-256 checksum
How to use checksums
deb8028d1c910661079d9a1a9f5e29e8b5eec581bb1432498919eba8ade5d9a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / mnt_pyfiction-0.8.0-cp310-abi3-manylinux_2_34_aarch64.whl

Download URL mnt_pyfiction-0.8.0-cp310-abi3-manylinux_2_34_aarch64.whl
Size 12.0 MB
Tags CPython 3.10 Linux glibc 2.34+ ARM64 abi3
SHA-256 checksum
How to use checksums
a8c3753425df127e904a857c33df4c5996cbf0719ba369f2f1b968fc0ed67ee5
BLAKE2b-256 checksum
How to use checksums
837840ca914a028770edf5908a401a20e9dd1090dff871e30be13ee9a47adabd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / mnt_pyfiction-0.8.0-cp310-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL mnt_pyfiction-0.8.0-cp310-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 13.0 MB
Tags CPython 3.10 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
f847cf90f7d0f8cd7b8c77eeff1ef0a985c56d54f705179d5a75f8d55a1e1fdc
BLAKE2b-256 checksum
How to use checksums
2e67ce147725f70a8a36fff9b37e790549273108e986cfc9a87a81263a1860d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / mnt_pyfiction-0.8.0-cp310-abi3-macosx_13_0_arm64.whl

Download URL mnt_pyfiction-0.8.0-cp310-abi3-macosx_13_0_arm64.whl
Size 12.6 MB
Tags CPython 3.10 abi3 macOS 13.0+ ARM64
SHA-256 checksum
How to use checksums
c6260d6ed148edb8231534546515059ae0066bfb56e90140fc541ffb0619269a
BLAKE2b-256 checksum
How to use checksums
c222b412d2fa96170c162a97cdda82aa206f1b152ee807b97053febce82465f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

0.8.0 This release

5 release files

0.7.0

25 release files

0.6.9

31 release files

0.6.8

31 release files

0.6.7

7 release files

0.6.6

25 release files

0.6.5

21 release files

0.6.4

21 release files

0.6.3

21 release files

0.6.2

21 release files

0.6.1

21 release files

0.6.0

5 release files

0.5.0

20 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page