diff --git a/CMakeLists.txt b/CMakeLists.txt index dceb4f41..e1e30e18 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -268,12 +268,12 @@ file(COPY ${ENCRYPTION_CONFIG_PATH}/config.txt # ${LIB_RRG_DEST_DIR}/src/io) # Logical Levels -#message(STATUS "NOTE: PATCHING TimingReporter") -#FILE(COPY ${TATUM_SRC_DIR}/TimingReporter.hpp -# ${TATUM_SRC_DIR}/TimingReporter.cpp -# DESTINATION -# ${OPENFPGA_DEST_DIR}/vtr-verilog-to-routing/libs/EXTERNAL/libtatum/libtatum/tatum -#) +message(STATUS "NOTE: PATCHING TimingReporter") +FILE(COPY ${TATUM_SRC_DIR}/TimingReporter.hpp + ${TATUM_SRC_DIR}/TimingReporter.cpp + DESTINATION + ${OPENFPGA_DEST_DIR}/vtr-verilog-to-routing/libs/EXTERNAL/libtatum/libtatum/tatum +) # Logical Levels FILE(COPY ${UTIL_SRC_DIR}/rsbe_utils.cpp @@ -284,10 +284,10 @@ FILE(COPY ${UTIL_SRC_DIR}/rsbe_utils.cpp message(STATUS "NOTE: ADDED to VPR src/util: rsbe_utils.cpp,h") # Logical Levels -#FILE(COPY ${ANALYSIS_SRC_DIR}/timing_reports.cpp -# DESTINATION -# ${VPR_DEST_DIR}/src/analysis -#) +FILE(COPY ${ANALYSIS_SRC_DIR}/timing_reports.cpp + DESTINATION + ${VPR_DEST_DIR}/src/analysis +) message(STATUS "NOTE: DONE PATCHING\n") diff --git a/include/analysis_fix/timing_reports.cpp b/include/analysis_fix/timing_reports.cpp index d3de4a06..8eb6e540 100644 --- a/include/analysis_fix/timing_reports.cpp +++ b/include/analysis_fix/timing_reports.cpp @@ -12,13 +12,18 @@ #include "VprTimingGraphResolver.h" -void generate_setup_timing_stats(const std::string& prefix, const SetupTimingInfo& timing_info, const AnalysisDelayCalculator& delay_calc, const t_analysis_opts& analysis_opts, bool is_flat) { +void generate_setup_timing_stats(const std::string& prefix, + const SetupTimingInfo& timing_info, + const AnalysisDelayCalculator& delay_calc, + const t_analysis_opts& analysis_opts, + bool is_flat, + const BlkLocRegistry& blk_loc_registry) { auto& timing_ctx = g_vpr_ctx.timing(); auto& atom_ctx = g_vpr_ctx.atom(); print_setup_timing_summary(*timing_ctx.constraints, *timing_info.setup_analyzer(), "Final ", analysis_opts.write_timing_summary); - VprTimingGraphResolver resolver(atom_ctx.nlist, atom_ctx.lookup, *timing_ctx.graph, delay_calc, is_flat); + VprTimingGraphResolver resolver(atom_ctx.nlist, atom_ctx.lookup, *timing_ctx.graph, delay_calc, is_flat, blk_loc_registry); resolver.set_detail_level(analysis_opts.timing_report_detail); tatum::TimingReporter timing_reporter(resolver, *timing_ctx.graph, *timing_ctx.constraints); @@ -32,13 +37,18 @@ void generate_setup_timing_stats(const std::string& prefix, const SetupTimingInf timing_reporter.report_unconstrained_setup(prefix + "report_unconstrained_timing.setup.rpt", *timing_info.setup_analyzer()); } -void generate_hold_timing_stats(const std::string& prefix, const HoldTimingInfo& timing_info, const AnalysisDelayCalculator& delay_calc, const t_analysis_opts& analysis_opts, bool is_flat) { +void generate_hold_timing_stats(const std::string& prefix, + const HoldTimingInfo& timing_info, + const AnalysisDelayCalculator& delay_calc, + const t_analysis_opts& analysis_opts, + bool is_flat, + const BlkLocRegistry& blk_loc_registry) { auto& timing_ctx = g_vpr_ctx.timing(); auto& atom_ctx = g_vpr_ctx.atom(); print_hold_timing_summary(*timing_ctx.constraints, *timing_info.hold_analyzer(), "Final "); - VprTimingGraphResolver resolver(atom_ctx.nlist, atom_ctx.lookup, *timing_ctx.graph, delay_calc, is_flat); + VprTimingGraphResolver resolver(atom_ctx.nlist, atom_ctx.lookup, *timing_ctx.graph, delay_calc, is_flat, blk_loc_registry); resolver.set_detail_level(analysis_opts.timing_report_detail); tatum::TimingReporter timing_reporter(resolver, *timing_ctx.graph, *timing_ctx.constraints); diff --git a/include/tatum_fix/TimingReporter.cpp b/include/tatum_fix/TimingReporter.cpp index 38184f30..7b734710 100644 --- a/include/tatum_fix/TimingReporter.cpp +++ b/include/tatum_fix/TimingReporter.cpp @@ -610,7 +610,7 @@ Time TimingReporter::report_timing_data_arrival_subpath(std::ostream& os, { //Input constraint - TATUM_ASSERT(subpath.elements().size() > 0); + TATUM_ASSERT(!subpath.elements().empty()); const TimingPathElem& path_elem = *(subpath.elements().begin()); Time input_constraint; @@ -716,7 +716,7 @@ bool TimingReporter::nearly_equal(const Time& lhs, const Time& rhs) const { size_t TimingReporter::estimate_point_print_width(const TimingPath& path) const { size_t width = 60; //default - for(auto subpath : {path.clock_launch_path(), path.data_arrival_path(), path.clock_capture_path()}) { + for(const auto& subpath : {path.clock_launch_path(), path.data_arrival_path(), path.clock_capture_path()}) { for(auto elem : subpath.elements()) { //Take the longest typical point name std::string point = name_resolver_.node_name(elem.node()) + " (" + name_resolver_.node_type_name(elem.node()) + ")";