diff --git a/include/fiction/algorithms/physical_design/one_pass_synthesis.hpp b/include/fiction/algorithms/physical_design/one_pass_synthesis.hpp index 7d527a736..9a8ab7109 100644 --- a/include/fiction/algorithms/physical_design/one_pass_synthesis.hpp +++ b/include/fiction/algorithms/physical_design/one_pass_synthesis.hpp @@ -9,13 +9,14 @@ #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 #include #include +#include #include #if (PROGRESS_BARS) @@ -23,16 +24,19 @@ #endif #include +#include #include +#include +#include #include -#include #include #include #include #include -#include #include +#include #include +#include #include // pybind11 has quite some warnings in its code; let's silence them a little @@ -45,7 +49,10 @@ #pragma GCC diagnostic ignored "-Wdeprecated-declarations" #pragma GCC diagnostic ignored "-Wrange-loop-analysis" #pragma warning(push, 0) // MSVC +#include #include +#include +#include #pragma GCC diagnostic pop // GCC #pragma warning(pop) // MSVC @@ -158,7 +165,7 @@ class mugen_handler * 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& spec, Lyt& sketch, one_pass_synthesis_params p) : @@ -363,8 +370,7 @@ class mugen_handler // 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::difference_type>(num_pis + 1)); + std::advance(pi_it_end, static_cast::difference_type>(num_pis)); return pi_it_end; } @@ -779,10 +785,23 @@ class one_pass_synthesis_impl 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; + } + // unexpected exception catch (...) { - return std::nullopt; + std::cout << "[e] something unexpected happened; this needs investigation" << std::endl; + throw; } } diff --git a/libs/Catch2 b/libs/Catch2 index fa43b7742..0b2af5627 160000 --- a/libs/Catch2 +++ b/libs/Catch2 @@ -1 +1 @@ -Subproject commit fa43b77429ba76c462b1898d6cd2f2d7a9416b14 +Subproject commit 0b2af562710d1bac7fd32ca3f05bf1d713bb97e4 diff --git a/libs/mugen/requirements.txt b/libs/mugen/requirements.txt index e692a27c0..7f452d0fd 100644 --- a/libs/mugen/requirements.txt +++ b/libs/mugen/requirements.txt @@ -1,3 +1,3 @@ python-sat==0.1.6.dev6 -wrapt_timeout_decorator -graphviz +wrapt_timeout_decorator==1.5.1 +graphviz==0.20.3 diff --git a/libs/pybind11 b/libs/pybind11 index af67e8739..f7e14e985 160000 --- a/libs/pybind11 +++ b/libs/pybind11 @@ -1 +1 @@ -Subproject commit af67e87393b0f867ccffc2702885eea12de063fc +Subproject commit f7e14e985be167ca158fd3ee2fe5d8a4f175fa87