Skip to content

Commit

Permalink
[vpr][place] apply Vaughn's comments
Browse files Browse the repository at this point in the history
  • Loading branch information
amin1377 committed Dec 16, 2024
1 parent 66c5c72 commit 6b597f4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vpr/src/place/place_delay_model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ void SimpleDelayModel::read(const std::string& file) {
// ToNdMatrix is a generic function for converting a Matrix capnproto
// to a vtr::NdMatrix.
//
// The use must supply the matrix dimension (2 in this case), the source
// The user must supply the matrix dimension (5 in this case), the source
// capnproto type (VprFloatEntry),
// target C++ type (flat), and a function to convert from the source capnproto
// type to the target C++ type (ToFloat).
Expand All @@ -246,7 +246,7 @@ void SimpleDelayModel::read(const std::string& file) {
}

void SimpleDelayModel::write(const std::string& file) const {
// MallocMessageBuilder object is the generate capnproto message builder,
// MallocMessageBuilder object generates capnproto message builder,
// using malloc for buffer allocation.
::capnp::MallocMessageBuilder builder;

Expand Down
12 changes: 12 additions & 0 deletions vpr/src/place/place_delay_model.h
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,15 @@ class SimpleDelayModel : public PlaceDelayModel {
public:
SimpleDelayModel() {}

/**
* @brief Initializes the `delays_` data structure. This involves retrieving the corresponding delays for each entry from
* the router lookahead and storing the minimum among them.
*
* @param router The router used to retrieve information from the router lookahead.
* @param placer_opts Placment parameters.
* @param router_opts Routing parameters.
* @param longest_length The length of the longest routing track.
*/
void compute(
RouterDelayProfiler& router,
const t_placer_opts& placer_opts,
Expand All @@ -245,6 +254,9 @@ class SimpleDelayModel : public PlaceDelayModel {

void read(const std::string& /*file*/) override;
void write(const std::string& /*file*/) const override;
/**
@brief Returns a reference to the array containing the placement delay matrix.
*/
const vtr::NdMatrix<float, 5>& delays() const {
return delays_;
}
Expand Down

0 comments on commit 6b597f4

Please sign in to comment.