-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Virtual pi network #543
base: main
Are you sure you want to change the base?
Virtual pi network #543
Conversation
Signed-off-by: GitHub Actions <[email protected]>
Signed-off-by: GitHub Actions <[email protected]>
Signed-off-by: GitHub Actions <[email protected]>
Signed-off-by: GitHub Actions <[email protected]>
Signed-off-by: GitHub Actions <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #543 +/- ##
=========================================
Coverage 98.13% 98.13%
=========================================
Files 232 242 +10
Lines 35410 36476 +1066
Branches 1691 1743 +52
=========================================
+ Hits 34748 35797 +1049
- Misses 660 677 +17
Partials 2 2
... and 3 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
Signed-off-by: GitHub Actions <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
include/fiction/algorithms/network_transformation/delete_virtual_pis.hpp
Show resolved
Hide resolved
# Conflicts: # bindings/mnt/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp
Signed-off-by: GitHub Actions <[email protected]>
I think it makes more sense that @marcelwa is doing a review now as he is more familiar with the topic and may suggest restructuring the code. Afterwards, I will review it again. What do you think? |
Signed-off-by: GitHub Actions <[email protected]>
Signed-off-by: GitHub Actions <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
* @tparam NodeCostFn A function to compute the costs associated with nodes. | ||
*/ | ||
template <typename Ntk, typename NodeCostFn> | ||
class depth_view<Ntk, NodeCostFn, false> : public Ntk |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: class 'depth_view' defines a default destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions]
class depth_view<Ntk, NodeCostFn, false> : public Ntk
^
/** | ||
* Depth view parameters. | ||
*/ | ||
depth_view_params _ps; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: invalid case style for member '_ps' [readability-identifier-naming]
include/fiction/networks/views/depth_view.hpp:96:
- _ps(ps),
+ ps(ps),
include/fiction/networks/views/depth_view.hpp:123:
- _ps(ps),
+ ps(ps),
include/fiction/networks/views/depth_view.hpp:146:
- _ps(other._ps),
+ ps(other.ps),
include/fiction/networks/views/depth_view.hpp:169:
- _ps = other._ps;
+ ps = other.ps;
include/fiction/networks/views/depth_view.hpp:257:
- return _levels[n] = _ps.pi_cost ? _cost_fn(*this, n) - 1 : 0;
+ return _levels[n] = ps.pi_cost ? _cost_fn(*this, n) - 1 : 0;
include/fiction/networks/views/depth_view.hpp:265:
- if (_ps.count_complements && this->is_complemented(f))
+ if (ps.count_complements && this->is_complemented(f))
include/fiction/networks/views/depth_view.hpp:285:
- if (_ps.count_complements && this->is_complemented(f))
+ if (ps.count_complements && this->is_complemented(f))
include/fiction/networks/views/depth_view.hpp:298:
- if (_ps.count_complements && this->is_complemented(f))
+ if (ps.count_complements && this->is_complemented(f))
include/fiction/networks/views/depth_view.hpp:336:
- if (!this->is_constant(n) && !(_ps.pi_cost && this->is_pi(n)))
+ if (!this->is_constant(n) && !(ps.pi_cost && this->is_pi(n)))
include/fiction/networks/views/depth_view.hpp:344:
- if (_ps.count_complements && this->is_complemented(f))
+ if (ps.count_complements && this->is_complemented(f))
depth_view_params _ps; | |
depth_view_params ps; |
/** | ||
* Hashmap assigning levels to nodes. | ||
*/ | ||
phmap::flat_hash_map<node, uint32_t> _levels; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: invalid case style for member '_levels' [readability-identifier-naming]
include/fiction/networks/views/depth_view.hpp:108:
- _levels.rehash(this->size());
+ levels.rehash(this->size());
include/fiction/networks/views/depth_view.hpp:135:
- _levels.rehash(this->size());
+ levels.rehash(this->size());
include/fiction/networks/views/depth_view.hpp:147:
- _levels(other._levels),
+ levels(other.levels),
include/fiction/networks/views/depth_view.hpp:170:
- _levels = other._levels;
+ levels = other.levels;
include/fiction/networks/views/depth_view.hpp:197:
- return _levels.at(n);
+ return levels.at(n);
include/fiction/networks/views/depth_view.hpp:213:
- _levels[n] = level;
+ levels[n] = level;
include/fiction/networks/views/depth_view.hpp:229:
- _levels.clear();
- _levels.rehash(this->size());
+ levels.clear();
+ levels.rehash(this->size());
include/fiction/networks/views/depth_view.hpp:246:
- return _levels[n];
+ return levels[n];
include/fiction/networks/views/depth_view.hpp:252:
- return _levels[n] = 0;
+ return levels[n] = 0;
include/fiction/networks/views/depth_view.hpp:257:
- return _levels[n] = _ps.pi_cost ? _cost_fn(*this, n) - 1 : 0;
+ return levels[n] = _ps.pi_cost ? _cost_fn(*this, n) - 1 : 0;
include/fiction/networks/views/depth_view.hpp:272:
- return _levels[n] = level + _cost_fn(*this, n);
+ return levels[n] = level + _cost_fn(*this, n);
include/fiction/networks/views/depth_view.hpp:310:
- if (_levels[n] == _depth)
+ if (levels[n] == _depth)
include/fiction/networks/views/depth_view.hpp:322:
- if (_levels[n] == _depth)
+ if (levels[n] == _depth)
include/fiction/networks/views/depth_view.hpp:338:
- const auto lvl = _levels[n];
+ const auto lvl = levels[n];
include/fiction/networks/views/depth_view.hpp:348:
- if (_levels[cn] + offset == lvl && !_crit_path[cn])
+ if (levels[cn] + offset == lvl && !_crit_path[cn])
phmap::flat_hash_map<node, uint32_t> _levels; | |
phmap::flat_hash_map<node, uint32_t> levels; |
/** | ||
* Hashmap assigning nodes on the critical path. | ||
*/ | ||
phmap::flat_hash_map<node, uint32_t> _crit_path; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: invalid case style for member '_crit_path' [readability-identifier-naming]
include/fiction/networks/views/depth_view.hpp:148:
- _crit_path(other._crit_path),
+ crit_path(other.crit_path),
include/fiction/networks/views/depth_view.hpp:171:
- _crit_path = other._crit_path;
+ crit_path = other.crit_path;
include/fiction/networks/views/depth_view.hpp:205:
- return _crit_path.contains(n);
+ return crit_path.contains(n);
include/fiction/networks/views/depth_view.hpp:231:
- _crit_path.clear();
- _crit_path.rehash(this->size());
+ crit_path.clear();
+ crit_path.rehash(this->size());
include/fiction/networks/views/depth_view.hpp:335:
- _crit_path[n] = true;
+ crit_path[n] = true;
include/fiction/networks/views/depth_view.hpp:348:
- if (_levels[cn] + offset == lvl && !_crit_path[cn])
+ if (_levels[cn] + offset == lvl && !crit_path[cn])
phmap::flat_hash_map<node, uint32_t> _crit_path; | |
phmap::flat_hash_map<node, uint32_t> crit_path; |
/** | ||
* The depth of the network. | ||
*/ | ||
uint32_t _depth{}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: invalid case style for member '_depth' [readability-identifier-naming]
include/fiction/networks/views/depth_view.hpp:149:
- _depth(other._depth),
+ depth(other.depth),
include/fiction/networks/views/depth_view.hpp:172:
- _depth = other._depth;
+ depth = other.depth;
include/fiction/networks/views/depth_view.hpp:189:
- return _depth;
+ return depth;
include/fiction/networks/views/depth_view.hpp:221:
- _depth = level;
+ depth = level;
include/fiction/networks/views/depth_view.hpp:280:
- _depth = 0;
+ depth = 0;
include/fiction/networks/views/depth_view.hpp:289:
- _depth = std::max(_depth, clevel);
+ depth = std::max(depth, clevel);
include/fiction/networks/views/depth_view.hpp:302:
- _depth = std::max(_depth, clevel);
+ depth = std::max(depth, clevel);
include/fiction/networks/views/depth_view.hpp:310:
- if (_levels[n] == _depth)
+ if (_levels[n] == depth)
include/fiction/networks/views/depth_view.hpp:322:
- if (_levels[n] == _depth)
+ if (_levels[n] == depth)
uint32_t _depth{}; | |
uint32_t depth{}; |
{ | ||
for (auto l = 0; l < ranks.size(); ++l) | ||
{ | ||
foreach_gate_in_rank(l, std::forward<Fn>(fn)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: implicit conversion changes signedness: 'int' to 'uint32_t' (aka 'unsigned int') [clang-diagnostic-sign-conversion]
foreach_gate_in_rank(l, std::forward<Fn>(fn));
^
Additional context
test/networks/views/extended_rank_view.cpp:130: in instantiation of function template specialization 'fiction::extended_rank_viewfiction::technology_network::foreach_gate<(lambda at /github/workspace/test/networks/views/extended_rank_view.cpp:131:24)>' requested here
tec_r.foreach_gate([&node_vector](const auto& n) { node_vector.push_back(n); });
^
|
||
mockturtle::equivalence_checking_stats st; | ||
const auto maybe_cec_m = | ||
mockturtle::equivalence_checking(*fiction::virtual_miter<technology_network>(ntk, ntk_r), {}, &st); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: unchecked access to optional value [bugprone-unchecked-optional-access]
mockturtle::equivalence_checking(*fiction::virtual_miter<technology_network>(ntk, ntk_r), {}, &st);
^
const auto maybe_cec_m = | ||
mockturtle::equivalence_checking(*fiction::virtual_miter<technology_network>(ntk, ntk_r), {}, &st); | ||
REQUIRE(maybe_cec_m.has_value()); | ||
const bool cec_m = *maybe_cec_m; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: unchecked access to optional value [bugprone-unchecked-optional-access]
const bool cec_m = *maybe_cec_m;
^
|
||
mockturtle::equivalence_checking_stats st; | ||
const auto maybe_cec_m = | ||
mockturtle::equivalence_checking(*fiction::virtual_miter<technology_network>(tec, vpi), {}, &st); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: unchecked access to optional value [bugprone-unchecked-optional-access]
mockturtle::equivalence_checking(*fiction::virtual_miter<technology_network>(tec, vpi), {}, &st);
^
const auto maybe_cec_m = | ||
mockturtle::equivalence_checking(*fiction::virtual_miter<technology_network>(tec, vpi), {}, &st); | ||
REQUIRE(maybe_cec_m.has_value()); | ||
const bool cec_m = *maybe_cec_m; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: unchecked access to optional value [bugprone-unchecked-optional-access]
const bool cec_m = *maybe_cec_m;
^
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
|
||
mockturtle::equivalence_checking_stats st; | ||
const auto maybe_cec_m = | ||
mockturtle::equivalence_checking(*fiction::virtual_miter<technology_network>(tec, vpi_r), {}, &st); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: unchecked access to optional value [bugprone-unchecked-optional-access]
mockturtle::equivalence_checking(*fiction::virtual_miter<technology_network>(tec, vpi_r), {}, &st);
^
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technology Network | ||
================== |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be "Virtual PI Network" or similar, right?
return virtual_pi_network( | ||
// Clone the parent network | ||
Ntk::clone(), | ||
// Create a new shared pointer to `virtual_storage` using a copy of the current `_storage` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Create a new shared pointer to `virtual_storage` using a copy of the current `_storage` | |
// Create a new shared pointer to `virtual_storage` using a copy of the current `v_storage` |
} | ||
|
||
/** | ||
* Calculate the real size of the virtual_pi_network`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Calculate the real size of the virtual_pi_network`. | |
* Calculate the real size of the `virtual_pi_network`. |
template <typename Fn> | ||
void foreach_real_pi(Fn&& fn) const | ||
{ | ||
static_cast<const Ntk*>(this)->foreach_pi( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
static_cast<const Ntk*>(this)->foreach_pi( | |
Ntk::foreach_pi( |
Would this work instead? In my opinion, it looks a bit cleaner.
template <typename Fn> | ||
void foreach_real_ci(Fn&& fn) const | ||
{ | ||
static_cast<const Ntk*>(this)->foreach_ci( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see above
TEST_CASE("create different depth views", "[depth_view]") | ||
{ | ||
test_depth_view<mockturtle::aig_network>(); | ||
test_depth_view<mockturtle::mig_network>(); | ||
test_depth_view<mockturtle::klut_network>(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could add technology_network
and mockturtle::xmg_network
here
CHECK(mockturtle::has_level_v<depth_depth_ntk>); | ||
}; | ||
|
||
TEST_CASE("create different depth views", "[depth_view]") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We usually start test case names with an upper case character
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Applies to all your test files
CHECK(mockturtle::has_level_v<depth_depth_ntk>); | ||
}; | ||
|
||
TEST_CASE("create different depth views", "[depth_view]") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For tags, we use dashes instead of underscores
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Applies to all your test files
{ | ||
const std::unique_ptr<depth_view<mockturtle::xag_network>> tmp = | ||
std::make_unique<depth_view<mockturtle::xag_network>>(xag); | ||
dxag = *tmp; /* copy assignment */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see above
std::uint32_t size_real_pis = 0; | ||
std::uint32_t size_virtual_pis = 0; | ||
std::uint32_t size_real_cis = 0; | ||
std::uint32_t size_virtual_cis = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::uint32_t size_real_pis = 0; | |
std::uint32_t size_virtual_pis = 0; | |
std::uint32_t size_real_cis = 0; | |
std::uint32_t size_virtual_cis = 0; | |
uint32_t size_real_pis = 0; | |
uint32_t size_virtual_pis = 0; | |
uint32_t size_real_cis = 0; | |
uint32_t size_virtual_cis = 0; |
For consistency
# Conflicts: # bindings/mnt/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp
# Conflicts: # bindings/mnt/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
this->_events = other._events; | ||
|
||
// update the virtual storage | ||
if constexpr (has_is_virtual_pi_v<Ntk>) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: use of undeclared identifier 'has_is_virtual_pi_v' [clang-diagnostic-error]
if constexpr (has_is_virtual_pi_v<Ntk>)
^
// update the virtual storage | ||
if constexpr (has_is_virtual_pi_v<Ntk>) | ||
{ | ||
this->v_storage = other.v_storage; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no member named 'v_storage' in 'fiction::depth_viewmockturtle::xag_network' [clang-diagnostic-error]
this->v_storage = other.v_storage;
^
Additional context
test/networks/views/depth_view.cpp:170: in instantiation of member function 'fiction::depth_viewmockturtle::xag_network::operator=' requested here
dxag = *tmp; /* copy assignment */
^
/** | ||
* Depth view parameters. | ||
*/ | ||
depth_view_params _ps; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: invalid case style for member '_ps' [readability-identifier-naming]
include/fiction/networks/views/depth_view.hpp:96:
- _ps(ps),
+ ps(ps),
include/fiction/networks/views/depth_view.hpp:123:
- _ps(ps),
+ ps(ps),
include/fiction/networks/views/depth_view.hpp:146:
- _ps(other._ps),
+ ps(other.ps),
include/fiction/networks/views/depth_view.hpp:178:
- _ps = other._ps;
+ ps = other.ps;
include/fiction/networks/views/depth_view.hpp:261:
- if (_ps.count_complements && this->is_complemented(f))
+ if (ps.count_complements && this->is_complemented(f))
include/fiction/networks/views/depth_view.hpp:296:
- return _levels[n] = _ps.pi_cost ? _cost_fn(*this, n) - 1 : 0;
+ return _levels[n] = ps.pi_cost ? _cost_fn(*this, n) - 1 : 0;
include/fiction/networks/views/depth_view.hpp:304:
- if (_ps.count_complements && this->is_complemented(f))
+ if (ps.count_complements && this->is_complemented(f))
include/fiction/networks/views/depth_view.hpp:324:
- if (_ps.count_complements && this->is_complemented(f))
+ if (ps.count_complements && this->is_complemented(f))
include/fiction/networks/views/depth_view.hpp:337:
- if (_ps.count_complements && this->is_complemented(f))
+ if (ps.count_complements && this->is_complemented(f))
include/fiction/networks/views/depth_view.hpp:375:
- if (!this->is_constant(n) && !(_ps.pi_cost && this->is_pi(n)))
+ if (!this->is_constant(n) && !(ps.pi_cost && this->is_pi(n)))
include/fiction/networks/views/depth_view.hpp:383:
- if (_ps.count_complements && this->is_complemented(f))
+ if (ps.count_complements && this->is_complemented(f))
depth_view_params _ps; | |
depth_view_params ps; |
/** | ||
* Hashmap assigning levels to nodes. | ||
*/ | ||
phmap::flat_hash_map<node, uint32_t> _levels; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: invalid case style for member '_levels' [readability-identifier-naming]
include/fiction/networks/views/depth_view.hpp:108:
- _levels.rehash(this->size());
+ levels.rehash(this->size());
include/fiction/networks/views/depth_view.hpp:135:
- _levels.rehash(this->size());
+ levels.rehash(this->size());
include/fiction/networks/views/depth_view.hpp:147:
- _levels(other._levels),
+ levels(other.levels),
include/fiction/networks/views/depth_view.hpp:179:
- _levels = other._levels;
+ levels = other.levels;
include/fiction/networks/views/depth_view.hpp:206:
- return _levels.at(n);
+ return levels.at(n);
include/fiction/networks/views/depth_view.hpp:222:
- _levels[n] = level;
+ levels[n] = level;
include/fiction/networks/views/depth_view.hpp:238:
- _levels.clear();
- _levels.rehash(this->size());
+ levels.clear();
+ levels.rehash(this->size());
include/fiction/networks/views/depth_view.hpp:254:
- _levels.rehash(this->size());
+ levels.rehash(this->size());
include/fiction/networks/views/depth_view.hpp:260:
- auto clevel = _levels[f];
+ auto clevel = levels[f];
include/fiction/networks/views/depth_view.hpp:269:
- _levels[n] = level;
+ levels[n] = level;
include/fiction/networks/views/depth_view.hpp:273:
- _levels[n] = level + _cost_fn(*this, n);
+ levels[n] = level + _cost_fn(*this, n);
include/fiction/networks/views/depth_view.hpp:285:
- return _levels[n];
+ return levels[n];
include/fiction/networks/views/depth_view.hpp:291:
- return _levels[n] = 0;
+ return levels[n] = 0;
include/fiction/networks/views/depth_view.hpp:296:
- return _levels[n] = _ps.pi_cost ? _cost_fn(*this, n) - 1 : 0;
+ return levels[n] = _ps.pi_cost ? _cost_fn(*this, n) - 1 : 0;
include/fiction/networks/views/depth_view.hpp:311:
- return _levels[n] = level + _cost_fn(*this, n);
+ return levels[n] = level + _cost_fn(*this, n);
include/fiction/networks/views/depth_view.hpp:349:
- if (_levels[n] == _depth)
+ if (levels[n] == _depth)
include/fiction/networks/views/depth_view.hpp:361:
- if (_levels[n] == _depth)
+ if (levels[n] == _depth)
include/fiction/networks/views/depth_view.hpp:377:
- const auto lvl = _levels[n];
+ const auto lvl = levels[n];
include/fiction/networks/views/depth_view.hpp:387:
- if (_levels[cn] + offset == lvl && !_crit_path[cn])
+ if (levels[cn] + offset == lvl && !_crit_path[cn])
phmap::flat_hash_map<node, uint32_t> _levels; | |
phmap::flat_hash_map<node, uint32_t> levels; |
/** | ||
* Hashmap assigning nodes on the critical path. | ||
*/ | ||
phmap::flat_hash_map<node, uint32_t> _crit_path; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: invalid case style for member '_crit_path' [readability-identifier-naming]
include/fiction/networks/views/depth_view.hpp:148:
- _crit_path(other._crit_path),
+ crit_path(other.crit_path),
include/fiction/networks/views/depth_view.hpp:180:
- _crit_path = other._crit_path;
+ crit_path = other.crit_path;
include/fiction/networks/views/depth_view.hpp:214:
- return _crit_path.contains(n);
+ return crit_path.contains(n);
include/fiction/networks/views/depth_view.hpp:240:
- _crit_path.clear();
- _crit_path.rehash(this->size());
+ crit_path.clear();
+ crit_path.rehash(this->size());
include/fiction/networks/views/depth_view.hpp:374:
- _crit_path[n] = true;
+ crit_path[n] = true;
include/fiction/networks/views/depth_view.hpp:387:
- if (_levels[cn] + offset == lvl && !_crit_path[cn])
+ if (_levels[cn] + offset == lvl && !crit_path[cn])
phmap::flat_hash_map<node, uint32_t> _crit_path; | |
phmap::flat_hash_map<node, uint32_t> crit_path; |
{ | ||
for (auto l = 0; l < ranks.size(); ++l) | ||
{ | ||
foreach_gate_in_rank(l, std::forward<Fn>(fn)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: implicit conversion changes signedness: 'int' to 'uint32_t' (aka 'unsigned int') [clang-diagnostic-sign-conversion]
foreach_gate_in_rank(l, std::forward<Fn>(fn));
^
Additional context
include/fiction/algorithms/network_transformation/delete_virtual_pis.hpp:68: in instantiation of function template specialization 'fiction::extended_rank_view<fiction::virtual_pi_networkfiction::technology_network>::foreach_gate<(lambda at /github/workspace/include/fiction/algorithms/network_transformation/delete_virtual_pis.hpp:70:13)>' requested here
ntk_topo.foreach_gate(
^
include/fiction/algorithms/network_transformation/delete_virtual_pis.hpp:256: in instantiation of member function 'fiction::detail::delete_virtual_pis_impl<fiction::extended_rank_view<fiction::virtual_pi_networkfiction::technology_network>>::run' requested here
const auto result = p.run();
^
test/algorithms/network_transformation/delete_virtual_pis.cpp:78: in instantiation of function template specialization 'fiction::delete_virtual_pis<fiction::extended_rank_view<fiction::virtual_pi_networkfiction::technology_network>>' requested here
auto del = delete_virtual_pis(tec_d);
^
|
||
mockturtle::equivalence_checking_stats st; | ||
auto maybe_cec_m = | ||
mockturtle::equivalence_checking(*fiction::virtual_miter<technology_network>(tec, vpi_r), {}, &st); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: unchecked access to optional value [bugprone-unchecked-optional-access]
mockturtle::equivalence_checking(*fiction::virtual_miter<technology_network>(tec, vpi_r), {}, &st);
^
auto maybe_cec_m = | ||
mockturtle::equivalence_checking(*fiction::virtual_miter<technology_network>(tec, vpi_r), {}, &st); | ||
REQUIRE(maybe_cec_m.has_value()); | ||
bool cec_m = *maybe_cec_m; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: unchecked access to optional value [bugprone-unchecked-optional-access]
bool cec_m = *maybe_cec_m;
^
// this rearranges the order of the PI as stored in the underlying depth_view (corresponds to the order in _storage) | ||
vpi_r.rearrange_pis(); | ||
|
||
maybe_cec_m = mockturtle::equivalence_checking(*fiction::virtual_miter<technology_network>(tec, vpi_r), {}, &st); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: unchecked access to optional value [bugprone-unchecked-optional-access]
maybe_cec_m = mockturtle::equivalence_checking(*fiction::virtual_miter<technology_network>(tec, vpi_r), {}, &st);
^
|
||
maybe_cec_m = mockturtle::equivalence_checking(*fiction::virtual_miter<technology_network>(tec, vpi_r), {}, &st); | ||
REQUIRE(maybe_cec_m.has_value()); | ||
cec_m = *maybe_cec_m; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: unchecked access to optional value [bugprone-unchecked-optional-access]
cec_m = *maybe_cec_m;
^
Signed-off-by: GitHub Actions <[email protected]>
Description
This PR includes the
virtual_pi_network.hpp
,virtual_pi_network.cpp
(testing) andvirtual_pi_network.rst
(documentation), as well as the necessary changes intraits.hpp
The virtual PI network enhances all
mockturtle
network types to store duplicates of their PIs, called virtual PIs.Checklist: