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

Placer class #2813

Merged
merged 35 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
5b257cd
typos
soheilshahrouz Nov 14, 2024
bae8502
partially added Placer class
soheilshahrouz Nov 16, 2024
2298704
add place_log_util.h/.cpp
soheilshahrouz Nov 18, 2024
afc789b
added place() method to Placer class
soheilshahrouz Nov 18, 2024
da5ebf6
add print_post_placement_stats_() to Placer
soheilshahrouz Nov 18, 2024
d1d5e7f
removed unused inclusions from place.cpp
soheilshahrouz Nov 18, 2024
a3bb762
add PlacementLogPrinter class
soheilshahrouz Nov 18, 2024
1e10c27
remove unused sTNS and sWNS in Placer
soheilshahrouz Nov 18, 2024
34deb5c
make member variables of Placer private
soheilshahrouz Nov 18, 2024
ce0fb18
add print_initial_placement_stats() to PlacementLogPrinter
soheilshahrouz Nov 18, 2024
f2fab38
add msg_ member variable to PlacementLogPrinter
soheilshahrouz Nov 18, 2024
efe43e9
add print_post_placement_stats() to PlacementLogPrinter
soheilshahrouz Nov 18, 2024
8b7780e
call get_move_abortion_logger() in print_post_placement_stats()
soheilshahrouz Nov 18, 2024
a2da0ee
use msg member varible instead of msg local variable
soheilshahrouz Nov 18, 2024
a632425
add quiet mode to PlacementLogPrinter
soheilshahrouz Nov 18, 2024
291ec6f
record timing_stats in Placer class
soheilshahrouz Nov 18, 2024
87f4e2e
Merge branch 'master' into tmep_placer_class
soheilshahrouz Nov 20, 2024
d923d75
add is_flat to Placer
soheilshahrouz Nov 20, 2024
c616254
fix failure in vtr_reg_strong/strong_graphics_commands
soheilshahrouz Nov 20, 2024
1dbb81b
add some comments to Placer
soheilshahrouz Nov 20, 2024
427f9f2
string_view and reference in timing_util
soheilshahrouz Nov 20, 2024
6193a77
Merge branch 'master' into tmep_placer_class
soheilshahrouz Nov 23, 2024
e70f43c
add PlacementContext& arg to copy_locs_to_global_state && use pragma …
soheilshahrouz Nov 24, 2024
39ad04e
delete free_placement_structs()
soheilshahrouz Nov 24, 2024
e93d898
add file comments for placer.h and place_log_util.h
soheilshahrouz Nov 24, 2024
877fd8e
remove accessor methods from Placer
soheilshahrouz Nov 24, 2024
b760d03
quiet the placement timer if the placer object is quiet
soheilshahrouz Nov 24, 2024
b1c296a
Merge remote-tracking branch 'origin/master' into tmep_placer_class
soheilshahrouz Nov 27, 2024
aa53d97
add some comments
soheilshahrouz Nov 27, 2024
726f376
store pointers to TimingInfo in PlacerSetupSlacks and PlacerCriticali…
soheilshahrouz Nov 27, 2024
d28d56d
alloc_lookups_and_delay_model returns a unique_ptr instead of shared_ptr
soheilshahrouz Nov 27, 2024
ddfec83
rename place_log_util to placement_log_printer
soheilshahrouz Nov 27, 2024
1dcd63b
start measuring the placement time from the moment the Placer object …
soheilshahrouz Nov 27, 2024
be43312
move the construction of pb_gpin_lookup and netlist_pin_lookup to try…
soheilshahrouz Nov 27, 2024
6905b3e
add more comments
soheilshahrouz Nov 28, 2024
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 libs/EXTERNAL/libtatum/libtatum/tatum/SetupAnalysis.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace tatum {

/** \file
* The 'SetupAnalysis' class defines the operations needed by a GraphWalker class
* to perform a setup (max/longest path) analysis. It satisifes and extends the GraphVisitor
* to perform a setup (max/longest path) analysis. It satisfies and extends the GraphVisitor
* concept class.
*
* Setup Analysis Principles
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ Time TimingConstraints::setup_constraint(const DomainId src_domain, const Domain
return iter->second;
}

//If no capture node specific constraint was found, fallback to the domain pair constriant
//If no capture node specific constraint was found, fallback to the domain pair constraint
iter = setup_constraints_.find(NodeDomainPair(src_domain, sink_domain, NodeId::INVALID()));
if(iter != setup_constraints_.end()) {
return iter->second;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class TimingConstraints {
///\returns The source NodeId of the specified domain
NodeId clock_domain_source_node(const DomainId id) const;

//\returns whether the specified domain id corresponds to a virtual lcock
//\returns whether the specified domain id corresponds to a virtual clock
bool is_virtual_clock(const DomainId id) const;

///\returns The domain of the specified node id if it is a clock source
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace tatum { namespace detail {
*
* The operations for CommonAnalysisVisitor to perform setup analysis.
* The setup analysis operations define that maximum edge delays are used, and that the
* maixmum arrival time (and minimum required times) are propagated through the timing graph.
* maximum arrival time (and minimum required times) are propagated through the timing graph.
*
* \see HoldAnalysisOps
* \see SetupAnalysisOps
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,10 @@ bool CommonAnalysisVisitor<AnalysisOps>::do_arrival_pre_traverse_node(const Timi
bool node_constrained = false;

if(tc.node_is_constant_generator(node_id)) {
//We progpagate the tags from constant generators to ensure any sinks driven
//We propagate the tags from constant generators to ensure any sinks driven
//only by constant generators are recorded as constrained.
//
//We use a special tag to initialize constant generators which gets overritten
//We use a special tag to initialize constant generators which gets overwritten
//by any non-constant tag at downstream nodes

TimingTag const_gen_tag = ops_.const_gen_tag();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace tatum { namespace detail {
*
* The operations for CommonAnalysisVisitor to perform setup analysis.
* The setup analysis operations define that maximum edge delays are used, and that the
* maixmum arrival time (and minimum required times) are propagated through the timing graph.
* maximum arrival time (and minimum required times) are propagated through the timing graph.
*
* \see HoldAnalysisOps
* \see CommonAnalysisVisitor
Expand Down Expand Up @@ -121,7 +121,7 @@ class SetupAnalysisOps : public CommonAnalysisOps {
Time calculate_slack(const Time required_time, const Time arrival_time) {
//Setup requires the arrival to occur *before* the required time, so
//slack is the amount of required time left after the arrival time; meaning
//we we subtract the arrival time from the required time to get the setup slack
//we subtract the arrival time from the required time to get the setup slack
return required_time - arrival_time;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
namespace tatum {

/**
* A parallel timing analyzer which traveres the timing graph in a levelized
* A parallel timing analyzer which traverses the timing graph in a levelized
* manner. However nodes within each level are processed in parallel using
* Thread Building Blocks (TBB). If TBB is not available it operates serially and is
* equivalent to the SerialWalker.
Expand Down
2 changes: 1 addition & 1 deletion libs/librrgraph/src/base/rr_spatial_lookup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ std::vector<RRNodeId> RRSpatialLookup::find_nodes(int layer,
nodes.reserve(num_nodes);
for (const auto& node : rr_node_indices_[type][layer][node_x][node_y][side]) {
if (RRNodeId(node)) {
nodes.push_back(RRNodeId(node));
nodes.emplace_back(node);
}
}

Expand Down
2 changes: 1 addition & 1 deletion libs/libvtrutil/src/vtr_time.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class Timer {
constexpr static float BYTE_TO_MIB = 1024 * 1024;
};

///@brief Scoped time class which prints the time elapsed for the specifid action
///@brief Scoped time class which prints the time elapsed for the specified action
class ScopedActionTimer : public Timer {
public:
ScopedActionTimer(std::string action);
Expand Down
1 change: 1 addition & 0 deletions vpr/src/base/clustered_netlist_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class ClusteredPinAtomPinsLookup {
typedef typename vtr::Range<atom_pin_iterator> atom_pin_range;

public:
ClusteredPinAtomPinsLookup() = default;
ClusteredPinAtomPinsLookup(const ClusteredNetlist& clustered_netlist, const AtomNetlist& atom_netlist, const IntraLbPbPinLookup& pb_gpin_lookup);

atom_pin_range connected_atom_pins(ClusterPinId clustered_pin) const;
Expand Down
4 changes: 2 additions & 2 deletions vpr/src/base/read_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1377,7 +1377,7 @@ argparse::ArgumentParser create_arg_parser(const std::string& prog_name, t_optio
" * set_nets <int>\n"
" Sets the net drawing state\n"
" * set_cpd <int>\n"
" Sets the criticla path delay drawing state\n"
" Sets the critical path delay drawing state\n"
" * set_routing_util <int>\n"
" Sets the routing utilization drawing state\n"
" * set_clip_routing_util <int>\n"
Expand Down Expand Up @@ -2256,7 +2256,7 @@ argparse::ArgumentParser create_arg_parser(const std::string& prog_name, t_optio
.show_in(argparse::ShowIn::HELP_ONLY);

place_timing_grp.add_argument<e_reducer, ParseReducer>(args.place_delay_model_reducer, "--place_delay_model_reducer")
.help("When calculating delta delays for the placment delay model how are multiple values combined?")
.help("When calculating delta delays for the placement delay model how are multiple values combined?")
.default_value("min")
.show_in(argparse::ShowIn::HELP_ONLY);

Expand Down
2 changes: 1 addition & 1 deletion vpr/src/draw/draw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ static void initial_setup_NO_PICTURE_to_ROUTING_with_crit_path(
}
#endif //NO_GRAPHICS

void update_screen(ScreenUpdatePriority priority, const char* msg, enum pic_type pic_on_screen_val, std::shared_ptr<SetupTimingInfo> setup_timing_info) {
void update_screen(ScreenUpdatePriority priority, const char* msg, enum pic_type pic_on_screen_val, std::shared_ptr<const SetupTimingInfo> setup_timing_info) {
#ifndef NO_GRAPHICS

/* Updates the screen if the user has requested graphics. The priority *
Expand Down
2 changes: 1 addition & 1 deletion vpr/src/draw/draw.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ extern ezgl::application application;

#endif /* NO_GRAPHICS */

void update_screen(ScreenUpdatePriority priority, const char* msg, enum pic_type pic_on_screen_val, std::shared_ptr<SetupTimingInfo> timing_info);
void update_screen(ScreenUpdatePriority priority, const char* msg, enum pic_type pic_on_screen_val, std::shared_ptr<const SetupTimingInfo> timing_info);

//FIXME: Currently broken if no rr-graph is loaded
/**
Expand Down
6 changes: 3 additions & 3 deletions vpr/src/place/annealer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ e_move_result PlacementAnnealer::try_swap_(MoveGenerator& move_generator,
*/

// Invalidates timing of modified connections for incremental timing updates.
pin_timing_invalidator_->invalidate_affected_connections(blocks_affected_, timing_info_);
pin_timing_invalidator_->invalidate_affected_connections(blocks_affected_);

/* Update the connection_timing_cost and connection_delay
* values from the temporary values. */
Expand Down Expand Up @@ -532,7 +532,7 @@ e_move_result PlacementAnnealer::try_swap_(MoveGenerator& move_generator,
/* Invalidates timing of modified connections for incremental
* timing updates. These invalidations are accumulated for a
* big timing update in the outer loop. */
pin_timing_invalidator_->invalidate_affected_connections(blocks_affected_, timing_info_);
pin_timing_invalidator_->invalidate_affected_connections(blocks_affected_);

/* Update the connection_timing_cost and connection_delay
* values from the temporary values. */
Expand Down Expand Up @@ -588,7 +588,7 @@ e_move_result PlacementAnnealer::try_swap_(MoveGenerator& move_generator,
/* Re-invalidate the affected sink pins since the proposed
* move is rejected, and the same blocks are reverted to
* their original positions. */
pin_timing_invalidator_->invalidate_affected_connections(blocks_affected_, timing_info_);
pin_timing_invalidator_->invalidate_affected_connections(blocks_affected_);

// Revert the timing update
update_timing_classes(crit_params, timing_info_, criticalities_,
Expand Down
9 changes: 9 additions & 0 deletions vpr/src/place/compressed_grid.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@

#include "compressed_grid.h"

#include "arch_util.h"
#include "globals.h"
#include "vtr_time.h"

/**
* @brief Creates a compressed grid from the given locations.
Expand All @@ -16,6 +19,12 @@ static t_compressed_block_grid create_compressed_block_grid(const std::vector<st


std::vector<t_compressed_block_grid> create_compressed_block_grids() {
/* Measure how long it takes to allocate and initialize compressed grid.
* The measured execution time is printed when this object goes out of scope
* at the end of this function.
*/
vtr::ScopedStartFinishTimer compressed_grid_timer("Compressed grid construction");

auto& device_ctx = g_vpr_ctx.device();
auto& grid = device_ctx.grid;
const int num_layers = grid.get_num_layers();
Expand Down
Loading