Skip to content

Commit

Permalink
quiet the placement timer if the placer object is quiet
Browse files Browse the repository at this point in the history
  • Loading branch information
soheilshahrouz committed Nov 24, 2024
1 parent 877fd8e commit b760d03
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
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
5 changes: 1 addition & 4 deletions vpr/src/place/place.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

#include <memory>

#include "vtr_assert.h"
Expand Down Expand Up @@ -47,10 +48,6 @@ void try_place(const Netlist<>& net_list,
std::vector<t_segment_inf>& segment_inf,
const std::vector<t_direct_inf>& directs,
bool is_flat) {
/* Does almost all the work of placing a circuit. Width_fac gives the *
* width of the widest channel. Place_cost_exp says what exponent the *
* width should be taken to when calculating costs. This allows a *
* greater bias for anisotropic architectures. */

/* Currently, the functions that require is_flat as their parameter and are called during placement should
* receive is_flat as false. For example, if the RR graph of router lookahead is built here, it should be as
Expand Down
2 changes: 2 additions & 0 deletions vpr/src/place/placer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ Placer::Placer(const Netlist<>& net_list,

// Start measuring placement time
timer_ = std::make_unique<vtr::ScopedStartFinishTimer>("Placement");
timer_->quiet(quiet);

/* To make sure the importance of NoC-related cost terms compared to
* BB and timing cost is determine only through NoC placement weighting factor,
Expand Down Expand Up @@ -101,6 +102,7 @@ Placer::Placer(const Netlist<>& net_list,
}
#endif

// width_fac gives the width of the widest channel
const int width_fac = placer_opts.place_chan_width;
init_draw_coords((float)width_fac, placer_state_.blk_loc_registry());
}
Expand Down

0 comments on commit b760d03

Please sign in to comment.