Skip to content

Commit

Permalink
Merge pull request #2813 from verilog-to-routing/tmep_placer_class
Browse files Browse the repository at this point in the history
Placer class
  • Loading branch information
vaughnbetz authored Nov 28, 2024
2 parents 69619a0 + 6905b3e commit ec23fea
Show file tree
Hide file tree
Showing 35 changed files with 1,151 additions and 927 deletions.
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

0 comments on commit ec23fea

Please sign in to comment.