Physical Properties
Area Requirements
Header: fiction/technology/area.hpp
-
template<typename Lyt, typename AreaType = double>
AreaType fiction::area(const Lyt &lyt, area_params<technology<Lyt>, AreaType> &ps = {}, area_stats<AreaType> *pst = nullptr) noexcept Computes real-world area requirements in nm² of a given cell-level layout. For this purpose, each cell position in the layout is assigned a vertical and horizontal size. Additionally, a spacing between cell positions in horizontal and vertical direction is taken into account.
- Template Parameters:
Lyt – Cell-level layout type.
AreaType – Type for area representation.
- Parameters:
lyt – The cell-level layout whose area is desired.
ps – Area parameters.
pst – Area statistics.
- Returns:
Area requirements in nm².
-
template<typename Lyt, typename AreaType = double>
AreaType fiction::area(const bounding_box_2d<Lyt> &bb, area_params<technology<Lyt>, AreaType> &ps = {}, area_stats<AreaType> *pst = nullptr) noexcept Computes real-world area requirements in nm² of the bounding box of a given cell-level layout. For this purpose, each cell position in the layout is assigned a vertical and horizontal size. Additionally, a spacing between cell positions in horizontal and vertical direction is taken into account.
- Template Parameters:
Lyt – Cell-level layout type.
AreaType – Type for area representation.
- Parameters:
bb – The bounding box of the cell-level layout whose area is desired.
ps – Area parameters.
pst – Area statistics.
- Returns:
Area requirements in nm².
- mnt.pyfiction.area(*args, **kwargs)
Overloaded function.
area(layout: mnt.pyfiction.qca_layout, width: float = 18, height: float = 18, hspace: float = 2, vspace: float = 2) -> float
Computes the area of a given coordinate assuming its origin is (0, 0, 0). Calculates \((|x| + 1) \cdot (|y| + 1)\) by default. The exception is SiQAD coordinates, for which it computes \((|x| + 1) \cdot (2 \cdot |y| + |z| + 1)\).
- Template parameter
CoordinateType
: Coordinate type.
- Parameter
coord
: Coordinate.
- Returns:
Area of coord.
area(layout: mnt.pyfiction.inml_layout, width: float = 50, height: float = 100, hspace: float = 10, vspace: float = 25) -> float
Computes the area of a given coordinate assuming its origin is (0, 0, 0). Calculates \((|x| + 1) \cdot (|y| + 1)\) by default. The exception is SiQAD coordinates, for which it computes \((|x| + 1) \cdot (2 \cdot |y| + |z| + 1)\).
- Template parameter
CoordinateType
: Coordinate type.
- Parameter
coord
: Coordinate.
- Returns:
Area of coord.
area(layout: mnt.pyfiction.sidb_layout, width: float = 0.0, height: float = 0.0, hspace: float = 0.384, vspace: float = 0.384) -> float
Computes the area of a given coordinate assuming its origin is (0, 0, 0). Calculates \((|x| + 1) \cdot (|y| + 1)\) by default. The exception is SiQAD coordinates, for which it computes \((|x| + 1) \cdot (2 \cdot |y| + |z| + 1)\).
- Template parameter
CoordinateType
: Coordinate type.
- Parameter
coord
: Coordinate.
- Returns:
Area of coord.
MagCAD Magnet Count
Header: fiction/technology/magcad_magnet_count.hpp
-
template<typename Lyt>
uint64_t fiction::magcad_magnet_count(const Lyt &lyt) noexcept Calculates the number of magnets for an iNML layout the way MagCAD (https://topolinano.polito.it/) would do it. That is, counting chains of 4 inverters as a single entity.
- Template Parameters:
Lyt – iNML cell-level layout type.
- Parameters:
lyt – The iNML cell-level layout whose area is desired.
- Returns:
Number of magnets as counted by MagCAD.