Synchronization Element Layout
Header: fiction/layouts/synchronization_element_layout.hpp
The synchronization element layout can be layered on top of any clocked layout type at compile time to extend its functionality by a notion of synchronization elements (SEs). SEs are a technology extension that proposes to utilize the external clock generator to produce additional asymmetric clock signals with extended hold phases. Assigned to a clock zone, they would transform it into a latch-like device that stalls information over multiple full clock cycles. Such clock zones are called SEs.
-
template<typename ClockedLayout>
class synchronization_element_layout : public ClockedLayout This layout provides synchronization elements on top of a clocked layout as a technology extension to the FCN concept proposed in “Synchronization of Clocked Field-Coupled Circuits” by F. Sill Torres, M. Walter, R. Wille, D. Große, and R. Drechsler in IEEE NANO 2018. More in-depth information can be found in “Design Automation for Field-coupled Nanotechnologies” by M. Walter, R. Wille, F. Sill Torres, and R. Drechsler published by Springer Nature in 2022.
A synchronization element is a clock zone whose clock signal is altered such that it provides an extended Hold phase of a multitude of full clock cycles. It thereby stalls information in place and acts as a latch. Additionally, the pipeline-like behavior of FCN circuits allows clock zones that act as synchronization elements to transmit information to every clock number instead of just its consecutive one.
The exploration of synchronization elements further allows for interesting sequential applications like D Latches built from single MAJ gates as also proposed in the above publications. However, fiction does not yet support sequential FCN circuits. Therefore, support for these applications is limited. It is advised to use synchronization elements only on wire tiles.
- Template Parameters:
ClockedLayout – The clocked layout type whose clocking system should be extended by synchronization elements.
Public Functions
-
inline explicit synchronization_element_layout(const typename ClockedLayout::aspect_ratio &ar = {})
Standard constructor. Creates a clocked synchronization element layout of the given aspect ratio. To this end, it calls
ClockedLayout
’s standard constructor.- Parameters:
ar – Highest possible position in the layout.
-
inline synchronization_element_layout(const typename ClockedLayout::aspect_ratio &ar, const typename ClockedLayout::clocking_scheme_t &scheme)
Standard constructor. Creates a clocked synchronization element layout of the given aspect ratio and clocks it via the given clocking scheme. To this end, it calls
ClockedLayout
’s standard constructor.- Parameters:
ar – Highest possible position in the layout.
scheme – Clocking scheme to apply to this layout.
Copy constructor from another layout’s storage.
- Parameters:
s – Storage of another synchronization_element_layout.
-
inline explicit synchronization_element_layout(const ClockedLayout &lyt)
Copy constructor from another
ClockedLayout
.- Parameters:
lyt – Clocked layout.
-
inline synchronization_element_layout clone() const noexcept
Clones the layout returning a deep copy.
- Returns:
Deep copy of the layout.
-
inline void assign_synchronization_element(const clock_zone<ClockedLayout> &cz, const sync_elem_t se) noexcept
Assigns a synchronization element to the provided clock zone.
- Parameters:
cz – Clock zone to turn into a synchronization element.
se – Number of full clock cycles to extend
cz
’s Hold phase by. If this value is 0,cz
is turned back into a normal clock zone.
-
inline bool is_synchronization_element(const clock_zone<ClockedLayout> &cz) const noexcept
Check whether the provided clock zone is a synchronization element.
- Parameters:
cz – Clock zone to check.
- Returns:
true
iffcz
is a synchronization element.
-
inline sync_elem_t get_synchronization_element(const clock_zone<ClockedLayout> &cz) const noexcept
Returns the Hold phase extension in clock cycles of clock zone
cz
.- Parameters:
cz – Clock zone to check.
- Returns:
Synchronization element value, i.e., Hold phase extension, of clock zone
cz
.
-
inline bool is_incoming_clocked(const clock_zone<ClockedLayout> &cz1, const clock_zone<ClockedLayout> &cz2) const noexcept
Overwrites the function from
ClockedLayout
to account for synchronization elements. Evaluates whether clock zonecz2
feeds information to clock zonecz1
, i.e., whethercz2
is clocked with a clock number that is lower by 1 modulonum_clocks()
or if one of them is a synchronization element. Due to their extended Hold phase, they feed information to any clock number.- Parameters:
cz1 – Base clock zone.
cz2 – Clock zone to check whether it feeds information to
cz1
.
- Returns:
true
iffcz2
’s clock number is lower by 1 modulonum_clocks()
or ifcz1
orcz2
are synchronization elements.
-
inline bool is_outgoing_clocked(const clock_zone<ClockedLayout> &cz1, const clock_zone<ClockedLayout> &cz2) const noexcept
Overwrites the function from
ClockedLayout
to account for synchronization elements. Evaluates whether clock zonecz1
feeds information to clock zonecz2
, i.e., whethercz2
is clocked with a clock number that is higher by 1 modulonum_clocks()
or if one of them is a synchronization element. Due to their extended Hold phase, they feed information to any clock number.- Parameters:
cz1 – Base clock zone.
cz2 – Clock zone to check whether it accepts information from
cz1
.
- Returns:
true
iffcz2
’s clock number is higher by 1 modulonum_clocks()
or ifcz1
orcz2
are synchronization elements.
-
inline auto incoming_clocked_zones(const clock_zone<ClockedLayout> &cz) const noexcept
Overwrites the function from
ClockedLayout
to account for synchronization elements. Returns a container with all clock zones that are incoming to the given one.- Parameters:
cz – Base clock zone.
- Returns:
A container with all clock zones that are incoming to
cz
.
-
template<typename Fn>
inline void foreach_incoming_clocked_zone(const clock_zone<ClockedLayout> &cz, Fn &&fn) const Overwrites the function from
ClockedLayout
to account for synchronization elements. Applies a function to all incoming clock zones of a given one in accordance withincoming_clocked_zones
.- Template Parameters:
Fn – Functor type that has to comply with the restrictions imposed by
mockturtle::foreach_element
.- Parameters:
cz – Base clock zone.
fn – Functor to apply to each of
cz
’s incoming clock zones.
-
inline auto outgoing_clocked_zones(const clock_zone<ClockedLayout> &cz) const noexcept
Overwrites the function from
ClockedLayout
to account for synchronization elements. Returns a container with all clock zones that are outgoing from the given one.- Parameters:
cz – Base clock zone.
- Returns:
A container with all clock zones that are outgoing from
cz
.
-
template<typename Fn>
inline void foreach_outgoing_clocked_zone(const clock_zone<ClockedLayout> &cz, Fn &&fn) const Overwrites the function from
ClockedLayout
to account for synchronization elements. Applies a function to all outgoing clock zones of a given one in accordance withoutgoing_clocked_zones
.- Template Parameters:
Fn – Functor type that has to comply with the restrictions imposed by
mockturtle::foreach_element
.- Parameters:
cz – Base clock zone.
fn – Functor to apply to each of
cz
’s outgoing clock zones.
-
inline uint32_t num_se() const noexcept
Returns the number of clock zones acting as synchronization elements in the layout.
- Returns:
Number of synchronization elements in the layout.
-
inline ClockedLayout::degree_t in_degree(const clock_zone<ClockedLayout> &cz) const noexcept
Overwrites the function from
ClockedLayout
to account for synchronization elements. Returns the number of incoming clock zones to the given one.- Parameters:
cz – Base clock zone.
- Returns:
Number of
cz
’s incoming clock zones.
-
inline ClockedLayout::degree_t out_degree(const clock_zone<ClockedLayout> &cz) const noexcept
Overwrites the function from
ClockedLayout
to account for synchronization elements. Returns the number of outgoing clock zones from the given one.- Parameters:
cz – Base clock zone.
- Returns:
Number of
cz
’s outgoing clock zones.
-
inline ClockedLayout::degree_t degree(const clock_zone<ClockedLayout> &cz) const noexcept
Overwrites the function from
ClockedLayout
to account for synchronization elements. Returns the number of incoming plus outgoing clock zones of the given one.- Parameters:
cz – Base clock zone.
- Returns:
Number of
cz
’s incoming plus outgoing clock zones.
-
struct synchronization_element_layout_storage