Equivalence Checking¶
Header: fiction/verification/equivalence_checking.hpp
-
enum class fiction::verification::eq_type¶
Equivalence classification for logic and layout throughput.
Values:
-
enumerator NO¶
SpecandImpldiffer logically, contain required topology defects, or either layout has DRVs.
-
enumerator WEAK¶
SpecandImplare logically equivalent and have different throughput denominators.
-
enumerator STRONG¶
SpecandImplare logically equivalent and have equal throughput denominators.
-
enumerator NO¶
-
struct equivalence_checking_stats¶
Physical equivalence result, throughput, and diagnostics.
Public Members
-
int64_t tp_spec = 1ll¶
Specification throughput denominator. Defaults to
1.
-
int64_t tp_impl = 1ll¶
Implementation throughput denominator. Defaults to
1.
-
int64_t tp_diff = 0ll¶
Absolute difference between the throughput denominators. Defaults to
0.
-
std::vector<bool> counter_example = {}¶
Stores a possible counter example.
-
fiction::verification::gate_level_drv_stats spec_drv_stats = {}¶
Design rule violations in the specification layout.
-
fiction::verification::gate_level_drv_stats impl_drv_stats = {}¶
Design rule violations in the implementation layout.
-
int64_t tp_spec = 1ll¶
-
template<typename Spec, typename Impl>
eq_type fiction::verification::equivalence_checking(const Spec &spec, const Impl &impl, equivalence_checking_stats *pst = nullptr)¶ Performs SAT-based equivalence checking between a specification of type
Specand an implementation of typeImpl. Each operand is a logic network or a placed gate-level layout. Layout logic is extracted before SAT checking. Interfaces match by names unique on both sides, then by remaining declared positions. Unequal interface sizes, missing required inputs, and required dependency cycles returnNO.This implementation enables the comparison of two logic networks, a logic network and a gate-level layout or two gate-level layouts. Since gate-level layouts have a notion of timing that logic networks do not, this function does not simply prove logical equivalence but, additionally, takes timing aspects into account as well.
Thereby, three different types of equivalences arise:
NOequivalence: Spec and Impl are not logically equivalent or one of them is a gate-level layout that contains DRVs and, thus, cannot be checked for equivalence.WEAKequivalence: Spec and Impl are logically equivalent and have different throughput denominators.STRONGequivalence: Spec and Impl are logically equivalent and have equal throughput denominators. Logic networks have throughput denominator one.
This approach was first proposed in “Verification for Field-coupled Nanocomputing Circuits” by M. Walter, R. Wille, F. Sill Torres, D. Große, and R. Drechsler in DAC 2020.
- Template Parameters:
Spec – Specification type.
Impl – Implementation type.
- Parameters:
spec – The specification.
impl – The implementation.
pst – Statistics.
- Returns:
The equivalence type of
specandimpl.
- class eq_type(*values)¶
Equivalence classification for logic and layout throughput.
- NO = 0¶
- WEAK = 1¶
- STRONG = 2¶
- class equivalence_checking_stats¶
Physical equivalence result, throughput, and diagnostics.
- property counter_example¶
Stores a possible counter example.
- property eq¶
Stores the equivalence type.
- property impl_drv_stats¶
Design rule violations in the implementation layout.
- property runtime¶
Stores the runtime.
- property spec_drv_stats¶
Design rule violations in the specification layout.
- property tp_diff¶
Absolute difference between the throughput denominators. Defaults to
0.
- property tp_impl¶
Implementation throughput denominator. Defaults to
1.
- property tp_spec¶
Specification throughput denominator. Defaults to
1.
- equivalence_checking(specification: technology_network, implementation: technology_network, statistics: equivalence_checking_stats | None = None) eq_type¶
- equivalence_checking(specification: technology_network, implementation: cartesian_gate_layout, statistics: equivalence_checking_stats | None = None) eq_type
- equivalence_checking(specification: technology_network, implementation: shifted_cartesian_gate_layout, statistics: equivalence_checking_stats | None = None) eq_type
- equivalence_checking(specification: technology_network, implementation: hexagonal_gate_layout, statistics: equivalence_checking_stats | None = None) eq_type
- equivalence_checking(specification: cartesian_gate_layout, implementation: technology_network, statistics: equivalence_checking_stats | None = None) eq_type
- equivalence_checking(specification: cartesian_gate_layout, implementation: cartesian_gate_layout, statistics: equivalence_checking_stats | None = None) eq_type
- equivalence_checking(specification: cartesian_gate_layout, implementation: shifted_cartesian_gate_layout, statistics: equivalence_checking_stats | None = None) eq_type
- equivalence_checking(specification: cartesian_gate_layout, implementation: hexagonal_gate_layout, statistics: equivalence_checking_stats | None = None) eq_type
- equivalence_checking(specification: shifted_cartesian_gate_layout, implementation: technology_network, statistics: equivalence_checking_stats | None = None) eq_type
- equivalence_checking(specification: shifted_cartesian_gate_layout, implementation: cartesian_gate_layout, statistics: equivalence_checking_stats | None = None) eq_type
- equivalence_checking(specification: shifted_cartesian_gate_layout, implementation: shifted_cartesian_gate_layout, statistics: equivalence_checking_stats | None = None) eq_type
- equivalence_checking(specification: shifted_cartesian_gate_layout, implementation: hexagonal_gate_layout, statistics: equivalence_checking_stats | None = None) eq_type
- equivalence_checking(specification: hexagonal_gate_layout, implementation: technology_network, statistics: equivalence_checking_stats | None = None) eq_type
- equivalence_checking(specification: hexagonal_gate_layout, implementation: cartesian_gate_layout, statistics: equivalence_checking_stats | None = None) eq_type
- equivalence_checking(specification: hexagonal_gate_layout, implementation: shifted_cartesian_gate_layout, statistics: equivalence_checking_stats | None = None) eq_type
- equivalence_checking(specification: hexagonal_gate_layout, implementation: hexagonal_gate_layout, statistics: equivalence_checking_stats | None = None) eq_type
Performs SAT-based equivalence checking between a specification of type
Specand an implementation of typeImpl. Each operand is a logic network or a placed gate-level layout. Layout logic is extracted before SAT checking. Interfaces match by names unique on both sides, then by remaining declared positions. Unequal interface sizes, missing required inputs, and required dependency cycles returnNO.This implementation enables the comparison of two logic networks, a logic network and a gate-level layout or two gate-level layouts. Since gate-level layouts have a notion of timing that logic networks do not, this function does not simply prove logical equivalence but, additionally, takes timing aspects into account as well.
Thereby, three different types of equivalences arise:
NOequivalence: Spec and Impl are not logically equivalent or one of them is a gate-level layout that contains DRVs and, thus, cannot be checked for equivalence.WEAKequivalence: Spec and Impl are logically equivalent and have different throughput denominators. -STRONGequivalence: Spec and Impl are logically equivalent and have equal throughput denominators. Logic networks have throughput denominator one.
This approach was first proposed in "Verification for Field-coupled Nanocomputing Circuits" by M. Walter, R. Wille, F. Sill Torres, D. Große, and R. Drechsler in DAC 2020.
- Parameters:
specification – The specification.
implementation – The implementation.
statistics – Statistics.
- Template Args:
Spec – Specification type.
Impl – Implementation type.
- Returns:
The equivalence type of
specificationandimplementation.