Skip to content
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

⬆️ Bump the submodules group with 2 updates #545

Merged
merged 6 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 27 additions & 8 deletions include/fiction/algorithms/physical_design/one_pass_synthesis.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,34 @@

#include "fiction/algorithms/iter/aspect_ratio_iterator.hpp"
#include "fiction/layouts/clocking_scheme.hpp"
#include "fiction/layouts/coordinates.hpp"
#include "fiction/traits.hpp"
#include "fiction/utils/name_utils.hpp"
#include "utils/mugen_info.hpp"

#include <kitty/dynamic_truth_table.hpp>
#include <kitty/print.hpp>
#include <mockturtle/algorithms/simulation.hpp>
#include <mockturtle/traits.hpp>
#include <mockturtle/utils/stopwatch.hpp>

#if (PROGRESS_BARS)
#include <mockturtle/utils/progress_bar.hpp>
#endif

#include <algorithm>
#include <cassert>
#include <chrono>
#include <cstddef>
#include <cstdint>
#include <exception>
#include <functional>
#include <iostream>
#include <iterator>
#include <limits>
#include <map>
#include <memory>
#include <optional>
#include <string>
#include <unordered_set>
#include <utility>
#include <vector>

// pybind11 has quite some warnings in its code; let's silence them a little
Expand All @@ -45,7 +49,10 @@
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#pragma GCC diagnostic ignored "-Wrange-loop-analysis"
#pragma warning(push, 0) // MSVC
#include <pybind11/cast.h>
#include <pybind11/embed.h>
#include <pybind11/eval.h>
#include <pybind11/pytypes.h>
#pragma GCC diagnostic pop // GCC
#pragma warning(pop) // MSVC

Expand Down Expand Up @@ -158,7 +165,7 @@
* Standard constructor.
*
* @param spec The Boolean functions to synthesize.
* @param lyt Reference to an empty layout that serves as a floor plan for S&P&R by Mugen.
* @param sketch Reference to an empty layout that serves as a floor plan for S&P&R by Mugen.
* @param p The configurations to respect in the SAT instance generation process.
*/
mugen_handler(const std::vector<TT>& spec, Lyt& sketch, one_pass_synthesis_params p) :
Expand Down Expand Up @@ -363,8 +370,7 @@
// set up the iterator to skip the PIs
auto pi_it_end = nodes.begin();
// use std::advance because there is no 'operator+' overload
std::advance(pi_it_end,
static_cast<typename std::iterator_traits<decltype(pi_it_end)>::difference_type>(num_pis + 1));
std::advance(pi_it_end, static_cast<std::iterator_traits<decltype(pi_it_end)>::difference_type>(num_pis));

return pi_it_end;
}
Expand Down Expand Up @@ -779,10 +785,23 @@
update_timeout(handler, pst.time_total);
}
}
// timeout reached
catch (const pybind11::error_already_set& e)
{
// timeout reached
if (e.matches(PyExc_TimeoutError))
{
return std::nullopt;
}

// unexpected error
std::cout << "[e] something unexpected happened in Python; this needs investigation" << std::endl;
throw;

Check warning on line 798 in include/fiction/algorithms/physical_design/one_pass_synthesis.hpp

View check run for this annotation

Codecov / codecov/patch

include/fiction/algorithms/physical_design/one_pass_synthesis.hpp#L797-L798

Added lines #L797 - L798 were not covered by tests
}
// unexpected exception
catch (...)
{
return std::nullopt;
std::cout << "[e] something unexpected happened; this needs investigation" << std::endl;
throw;

Check warning on line 804 in include/fiction/algorithms/physical_design/one_pass_synthesis.hpp

View check run for this annotation

Codecov / codecov/patch

include/fiction/algorithms/physical_design/one_pass_synthesis.hpp#L803-L804

Added lines #L803 - L804 were not covered by tests
}
}

Expand Down
4 changes: 2 additions & 2 deletions libs/mugen/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
python-sat==0.1.6.dev6
wrapt_timeout_decorator
graphviz
wrapt_timeout_decorator==1.5.1
graphviz==0.20.3
Loading