Physical Properties
Area Requirements
Header: fiction/technology/area.hpp
-
template<typename Technology>
struct area_params Parameters for area computation of cell-level layouts. Default parameters are loaded from the given cell technology.
- Template Parameters:
Technology – Cell technology.
Public Members
-
double width = {static_cast<double>(Technology::CELL_WIDTH)}
Width of each cell.
-
double height = {static_cast<double>(Technology::CELL_HEIGHT)}
Height of each cell.
-
double hspace = {static_cast<double>(Technology::CELL_HSPACE)}
Horizontal spacing between cells.
-
double vspace = {static_cast<double>(Technology::CELL_VSPACE)}
Vertical spacing between cells.
-
struct area_stats
Statistics class to store area-related information including width, height, and area of a layout. Additionally, it provides a method to print a formatted report of these statistics to an output stream.
Public Functions
-
inline void report(std::ostream &out = std::cout) const
Prints a report of the area statistics to the given output stream.
- Parameters:
out – Output stream to write the report to. Defaults to
std::cout.
-
inline void report(std::ostream &out = std::cout) const
-
template<typename Lyt>
double fiction::area(const Lyt &lyt, const area_params<technology<Lyt>> &ps = {}, area_stats *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.
- Parameters:
lyt – The cell-level layout whose area is desired.
ps – Area parameters.
pst – Area statistics.
- Returns:
Area requirements in nm².
-
template<typename Lyt>
double fiction::area(const bounding_box_2d<Lyt> &bb, const area_params<technology<Lyt>> &ps = {}, area_stats *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.
- 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.pyfiction.qca_layout, width: typing.SupportsFloat = 18, height: typing.SupportsFloat = 18, hspace: typing.SupportsFloat = 2, vspace: typing.SupportsFloat = 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.pyfiction.inml_layout, width: typing.SupportsFloat = 50, height: typing.SupportsFloat = 100, hspace: typing.SupportsFloat = 10, vspace: typing.SupportsFloat = 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.pyfiction.sidb_layout, width: typing.SupportsFloat = 0.0, height: typing.SupportsFloat = 0.0, hspace: typing.SupportsFloat = 0.384, vspace: typing.SupportsFloat = 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.