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.

Public Members

double width = {0.0}

Layout width in nm.

double height = {0.0}

Layout height in nm.

double area = {0.0}

Layout area in nm².

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².

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.