Skip to content

Commit 9b25514

Browse files
committed
Added comments on override delay model.
1 parent bdaf63c commit 9b25514

File tree

2 files changed

+36
-2
lines changed

2 files changed

+36
-2
lines changed

vpr/src/place/place_delay_model.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/**
2+
* @file place_delay_model.cpp
3+
* @brief This file implements all the class methods and individual
4+
* routines related to the placer delay model.
5+
*/
6+
17
#include <queue>
28
#include "place_delay_model.h"
39
#include "globals.h"

vpr/src/place/place_delay_model.h

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,21 @@ class OverrideDelayModel : public PlaceDelayModel {
130130
void compute_override_delay_model(RouterDelayProfiler& router,
131131
const t_router_opts& router_opts);
132132

133+
/**
134+
* @brief Structure that allows delays to be queried from the delay model.
135+
*
136+
* Delay is calculated given the origin physical tile, the origin
137+
* pin, the destination physical tile, and the destination pin.
138+
* This structure encapsulates all these information.
139+
*
140+
* @param from_type, to_type
141+
* Physical tile index (for easy array access)
142+
* @param from_class, to_class
143+
* The class that the pins belongs to.
144+
* @param to_x, to_y
145+
* The horizontal and vertical displacement
146+
* between two physical tiles.
147+
*/
133148
struct t_override {
134149
short from_type;
135150
short to_type;
@@ -139,9 +154,15 @@ class OverrideDelayModel : public PlaceDelayModel {
139154
short delta_y;
140155

141156
/**
157+
* @brief Comparison operator designed for performance.
158+
*
159+
* Operator< is important since t_override serves as the key into the
160+
* map structure delay_overrides_. A default comparison operator would
161+
* not be inlined by the compiler.
162+
*
142163
* A combination of ALWAYS_INLINE attribute and std::lexicographical_compare
143-
* is required for operator< to be inlined by compiler. Proper inlining of the
144-
* function reduces place time by around 5%.
164+
* is required for operator< to be inlined by compiler. Proper inlining of
165+
* the function reduces place time by around 5%.
145166
*
146167
* For more information: https://github.com/verilog-to-routing/vtr-verilog-to-routing/issues/1225
147168
*/
@@ -153,6 +174,13 @@ class OverrideDelayModel : public PlaceDelayModel {
153174
}
154175
};
155176

177+
/**
178+
* @brief Map data structure that returns delay values according to
179+
* specific delay model queries.
180+
*
181+
* Delay model queries are provided by the t_override structure, which
182+
* encapsulates the information regarding the origin and the destination.
183+
*/
156184
vtr::flat_map2<t_override, float> delay_overrides_;
157185

158186
/**

0 commit comments

Comments
 (0)