Skip to content

Commit

Permalink
Various minor fixes (lsils#493)
Browse files Browse the repository at this point in the history
* missing include in xag_resyn

* aiger_reader: do not set po name if none was given

* create needed views for user in window_rewriting
  • Loading branch information
lee30sonia authored Sep 20, 2021
1 parent ebf32a5 commit d1925fe
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions include/mockturtle/algorithms/resyn_engines/xag_resyn.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#include <vector>
#include <algorithm>
#include <type_traits>
#include <optional>

namespace mockturtle
{
Expand Down
9 changes: 8 additions & 1 deletion include/mockturtle/algorithms/window_rewriting.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
#include "../utils/window_utils.hpp"
#include "../views/topo_view.hpp"
#include "../views/window_view.hpp"
#include "../views/fanout_view.hpp"
#include "../views/depth_view.hpp"
#include "../views/color_view.hpp"

#include <abcresub/abcresub2.hpp>
#include <fmt/format.h>
Expand Down Expand Up @@ -662,8 +665,12 @@ class window_rewriting_impl
template<class Ntk>
void window_rewriting( Ntk& ntk, window_rewriting_params const& ps = {}, window_rewriting_stats* pst = nullptr )
{
fanout_view fntk{ntk};
depth_view dntk{fntk};
color_view cntk{dntk};

window_rewriting_stats st;
detail::window_rewriting_impl<Ntk>( ntk, ps, st ).run();
detail::window_rewriting_impl( cntk, ps, st ).run();
if ( pst )
{
*pst = st;
Expand Down
5 changes: 4 additions & 1 deletion include/mockturtle/io/aiger_reader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,10 @@ class aiger_reader : public lorina::aiger_reader
}
if constexpr ( has_set_output_name_v<Ntk> )
{
_ntk.set_output_name( output_id++, std::get<1>( out ) );
if ( !std::get<1>( out ).empty() )
{
_ntk.set_output_name( output_id++, std::get<1>( out ) );
}
}
_ntk.create_po( signal );
}
Expand Down

0 comments on commit d1925fe

Please sign in to comment.