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

Syncing libtatum with VTR #9

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.9)
cmake_minimum_required(VERSION 3.16)

project("tatum")

Expand Down
303 changes: 0 additions & 303 deletions cmake/modules/FindTBB.cmake

This file was deleted.

2 changes: 1 addition & 1 deletion libtatum/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ if (TATUM_USE_EXECUTION_ENGINE STREQUAL "tbb")

target_compile_definitions(libtatum PUBLIC TATUM_USE_TBB)
target_link_libraries(libtatum tbb)
target_link_libraries(libtatum tbbmalloc_proxy) #Use the scalable memory allocator
target_link_libraries(libtatum ${TBB_tbbmalloc_proxy_LIBRARY}) #Use the scalable memory allocator

elseif (TATUM_USE_EXECUTION_ENGINE STREQUAL "serial")
#Nothing to do
Expand Down
18 changes: 18 additions & 0 deletions libtatum/tatum/TimingReporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,15 @@ void TimingReporter::report_timing_setup(std::ostream& os,
report_timing(os, paths);
}

void TimingReporter::report_timing_setup(std::vector<tatum::TimingPath>& paths,
std::ostream& os,
const SetupTimingAnalyzer& setup_analyzer,
size_t npaths) const {
paths = path_collector_.collect_worst_setup_timing_paths(timing_graph_, setup_analyzer, npaths);

report_timing(os, paths);
}

void TimingReporter::report_timing_hold(std::string filename,
const HoldTimingAnalyzer& hold_analyzer,
size_t npaths) const {
Expand All @@ -114,6 +123,15 @@ void TimingReporter::report_timing_hold(std::ostream& os,
report_timing(os, paths);
}

void TimingReporter::report_timing_hold(std::vector<tatum::TimingPath>& paths,
std::ostream& os,
const HoldTimingAnalyzer& hold_analyzer,
size_t npaths) const {
paths = path_collector_.collect_worst_hold_timing_paths(timing_graph_, hold_analyzer, npaths);

report_timing(os, paths);
}

void TimingReporter::report_skew_setup(std::string filename,
const SetupTimingAnalyzer& setup_analyzer,
size_t nworst) const {
Expand Down
2 changes: 2 additions & 0 deletions libtatum/tatum/TimingReporter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,11 @@ class TimingReporter {
public:
void report_timing_setup(std::string filename, const tatum::SetupTimingAnalyzer& setup_analyzer, size_t npaths=REPORT_TIMING_DEFAULT_NPATHS) const;
void report_timing_setup(std::ostream& os, const tatum::SetupTimingAnalyzer& setup_analyzer, size_t npaths=REPORT_TIMING_DEFAULT_NPATHS) const;
void report_timing_setup(std::vector<tatum::TimingPath>& paths, std::ostream& os, const tatum::SetupTimingAnalyzer& setup_analyzer, size_t npaths=REPORT_TIMING_DEFAULT_NPATHS) const;

void report_timing_hold(std::string filename, const tatum::HoldTimingAnalyzer& hold_analyzer, size_t npaths=REPORT_TIMING_DEFAULT_NPATHS) const;
void report_timing_hold(std::ostream& os, const tatum::HoldTimingAnalyzer& hold_analyzer, size_t npaths=REPORT_TIMING_DEFAULT_NPATHS) const;
void report_timing_hold(std::vector<tatum::TimingPath>& paths, std::ostream& os, const tatum::HoldTimingAnalyzer& hold_analyzer, size_t npaths=REPORT_TIMING_DEFAULT_NPATHS) const;

void report_skew_setup(std::string filename, const tatum::SetupTimingAnalyzer& setup_analyzer, size_t nworst=REPORT_TIMING_DEFAULT_NPATHS) const;
void report_skew_setup(std::ostream& os, const tatum::SetupTimingAnalyzer& setup_analyzer, size_t nworst=REPORT_TIMING_DEFAULT_NPATHS) const;
Expand Down
16 changes: 14 additions & 2 deletions libtatum/tatum/graph_walkers/SerialIncrWalker.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#pragma once
#include <algorithm>

#ifdef TATUM_USE_TBB
#include <tbb/concurrent_vector.h>
#endif

#include "tatum/graph_walkers/TimingGraphWalker.hpp"
#include "tatum/TimingGraph.hpp"
#include "tatum/delay_calc/DelayCalculator.hpp"
Expand Down Expand Up @@ -431,9 +436,16 @@ class SerialIncrWalker : public TimingGraphWalker {
t_incr_traversal_update incr_arr_update_;
t_incr_traversal_update incr_req_update_;

//Set of invalidated edges, and bitset for membership
/** Set of invalidated edges, and bitset for membership.
* Use thread safe alternatives when TBB is on, since invalidate_edge_impl
* may be called concurrently */
#ifdef TATUM_USE_TBB
tbb::concurrent_vector<EdgeId> invalidated_edges_;
tatum::util::linear_map<EdgeId, size_t> edge_invalidated_;
#else
std::vector<EdgeId> invalidated_edges_;
tatum::util::linear_map<EdgeId,bool> edge_invalidated_;
tatum::util::linear_map<EdgeId, bool> edge_invalidated_;
#endif

//Nodes which have been modified during timing update, and bitset for membership
std::vector<NodeId> nodes_modified_;
Expand Down
Loading