Skip to content

Commit a2d9b0b

Browse files
fix format errors
1 parent 8d043fd commit a2d9b0b

File tree

5 files changed

+61
-44
lines changed

5 files changed

+61
-44
lines changed

libs/libarchfpga/src/physical_types.h

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1808,15 +1808,23 @@ struct t_wire_switchpoints {
18081808

18091809
/* Used to list information about a set of track segments that should connect through a switchblock */
18101810
struct t_wireconn_inf {
1811-
std::vector<t_wire_switchpoints>
1812-
from_switchpoint_set; //The set of segment/wirepoints representing the 'from' set (union of all t_wire_switchpoints in vector)
1813-
std::vector<t_wire_switchpoints>
1814-
to_switchpoint_set; //The set of segment/wirepoints representing the 'to' set (union of all t_wire_switchpoints in vector)
1815-
SwitchPointOrder from_switchpoint_order = SwitchPointOrder::FIXED; //The desired from_switchpoint_set ordering
1816-
SwitchPointOrder to_switchpoint_order = SwitchPointOrder::FIXED; //The desired to_switchpoint_set ordering
1817-
int switch_override_indx
1818-
= DEFAULT_SWITCH; // index in switch array of the switch used to override wire_switch of the 'to' set.
1819-
// DEFAULT_SWITCH is a sentinel value (i.e. the usual driving switch from a wire for the receiving wire will be used)
1811+
///The set of segment/wirepoints representing the 'from' set (union of all t_wire_switchpoints in vector)
1812+
std::vector<t_wire_switchpoints> from_switchpoint_set;
1813+
1814+
///The set of segment/wirepoints representing the 'to' set (union of all t_wire_switchpoints in vector)
1815+
std::vector<t_wire_switchpoints> to_switchpoint_set;
1816+
1817+
///The desired from_switchpoint_set ordering
1818+
SwitchPointOrder from_switchpoint_order = SwitchPointOrder::FIXED;
1819+
1820+
///The desired to_switchpoint_set ordering
1821+
SwitchPointOrder to_switchpoint_order = SwitchPointOrder::FIXED;
1822+
1823+
/** @brief index in switch array of the switch used to override wire_switch of the 'to' set.
1824+
* DEFAULT_SWITCH is a sentinel value (i.e. the usual driving switch from a wire for
1825+
* the receiving wire will be used)
1826+
*/
1827+
int switch_override_indx = DEFAULT_SWITCH;
18201828

18211829
std::string num_conns_formula; /* Specifies how many connections should be made for this wireconn.
18221830
*

odin_ii/src/verilog/verilog_writer.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ inline void verilog::writer::_create_file(const char* file_name, const file_type
5353

5454
void verilog::writer::_write(const netlist_t* netlist) {
5555
// to write the top module and netlist components
56-
if (netlist) { /* [TODO] */ }
56+
if (netlist) { /* [TODO] */
57+
}
5758

5859
// print out the rest od models, including DSPs in the target architecture
5960
t_model* model = Arch.models;

vpr/src/route/router_lookahead_compressed_map.h

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -64,20 +64,23 @@ class CompressedMapLookahead : public RouterLookahead {
6464
}
6565
};
6666

67-
// This is a 5D array that stores estimates of the cost to reach a location at a particular distance away from the current location.
68-
// The router look-ahead is built under the assumption of translation-invariance, meaning the current location (in terms of x-y coordinates) is not crucial.
69-
// The indices of this array are as follows:
70-
// from_layer: The layer number that the node under consideration is on.
71-
// Chan type: The type of channel (x/y) that the node under consideration belongs to.
72-
// Seg type: The type of segment (listed under "segmentlist" tag in the architecture file) that the node under consideration belongs to.
73-
// to_layer: The layer number that the target node is on.
74-
// compressed index: In this type of router look-ahead, we do not sample every x and y. Another data structure maps every x and y to
75-
// an index. That index should be used here.
76-
77-
typedef vtr::NdMatrix<util::Cost_Entry, 5>
78-
t_compressed_wire_cost_map; //[0..num_layers][0..1][[0..num_seg_types-1][0..num_layers][compressed_idx]
79-
//[0..1] entry distinguish between CHANX/CHANY start nodes respectively
80-
// The first index is the layer number that the node under consideration is on, and the forth index
81-
// is the layer number that the target node is on.
67+
/**
68+
* This is a 5D array that stores estimates of the cost to reach a location at a particular distance away from the current location.
69+
*
70+
* The router look-ahead is built under the assumption of translation-invariance, meaning the current location (in terms of x-y coordinates) is not crucial.
71+
* The indices of this array are as follows:
72+
* from_layer: The layer number that the node under consideration is on.
73+
* Chan type: The type of channel (x/y) that the node under consideration belongs to.
74+
* Seg type: The type of segment (listed under "segmentlist" tag in the architecture file) that the node under consideration belongs to.
75+
* to_layer: The layer number that the target node is on.
76+
* compressed index: In this type of router look-ahead, we do not sample every x and y. Another data structure maps every x and y to
77+
* an index. That index should be used here.
78+
*
79+
* [0..num_layers][0..1][[0..num_seg_types-1][0..num_layers][compressed_idx]
80+
* [0..1] entry distinguish between CHANX/CHANY start nodes respectively
81+
* The first index is the layer number that the node under consideration is on, and the forth index
82+
* is the layer number that the target node is on.
83+
*/
84+
typedef vtr::NdMatrix<util::Cost_Entry, 5> t_compressed_wire_cost_map;
8285

8386
#endif //VTR_ROUTER_LOOKAHEAD_COMPRESSED_MAP_H

vpr/src/route/router_lookahead_cost_map.h

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -89,16 +89,21 @@ class CostMap {
8989
std::vector<std::pair<int, int>> list_empty() const;
9090

9191
private:
92-
vtr::Matrix<vtr::Matrix<util::Cost_Entry>>
93-
cost_map_; ///<Cost map containing all the costs computed during the lookahead generation.
94-
///<It is indexed as follows: cost_map_[0][segment_index][delta_x][delta_y]
95-
///<The first index is always 0 and it is kept to allow future specializations of
96-
///<the cost map based on other possible indices.
97-
98-
vtr::Matrix<std::pair<int, int>> offset_; ///<Offset to specify the bounds of a specific segment map.
99-
///<It is used to adjust delta values to the segment bounding box.
100-
///<The offset map is addressed as follows: offset_[0][segment_index]
101-
///<The values of the matrix are pairs of corresponding to X and Y offsets.
92+
/**
93+
* Cost map containing all the costs computed during the lookahead generation.
94+
* It is indexed as follows: cost_map_[0][segment_index][delta_x][delta_y]
95+
* The first index is always 0 and it is kept to allow future specializations of
96+
* the cost map based on other possible indices.
97+
*/
98+
vtr::Matrix<vtr::Matrix<util::Cost_Entry>> cost_map_;
99+
100+
/**
101+
* Offset to specify the bounds of a specific segment map.
102+
* It is used to adjust delta values to the segment bounding box.
103+
* The offset map is addressed as follows: offset_[0][segment_index]
104+
* The values of the matrix are pairs of corresponding to X and Y offsets.
105+
*/
106+
vtr::Matrix<std::pair<int, int>> offset_;
102107

103108
vtr::Matrix<float> penalty_; ///<Penalty value corresponding to each segment type and used to penalize
104109
///<delta locations that fall outside of a segment's bounding box.

vpr/src/route/router_lookahead_map.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ class MapLookahead : public RouterLookahead {
2626
// Lookup table to store the minimum cost to reach to a primitive pin from the root-level IPINs
2727
std::unordered_map<int, std::unordered_map<int, util::Cost_Entry>>
2828
tile_min_cost; // [physical_tile_type][sink_physical_num] -> cost
29-
// Lookup table to store the minimum cost for each dx and dy
30-
vtr::NdMatrix<util::Cost_Entry, 4> chann_distance_based_min_cost; // [from_layer_num][to_layer_num][dx][dy] -> cost
31-
vtr::NdMatrix<util::Cost_Entry, 5>
32-
opin_distance_based_min_cost; // [physical_tile_idx][from_layer_num][to_layer_num][dx][dy] -> cost
29+
/// Lookup table to store the minimum cost for each dx and dy. [from_layer_num][to_layer_num][dx][dy] -> cost
30+
vtr::NdMatrix<util::Cost_Entry, 4> chann_distance_based_min_cost;
31+
/// [physical_tile_idx][from_layer_num][to_layer_num][dx][dy] -> cost
32+
vtr::NdMatrix<util::Cost_Entry, 5> opin_distance_based_min_cost;
3333

3434
const t_det_routing_arch& det_routing_arch_;
3535
bool is_flat_;
@@ -63,11 +63,11 @@ class MapLookahead : public RouterLookahead {
6363
// To store this information, the first index is the layer number that the node under consideration is on, the second index is the layer number of the target node, the third index represents the type of channel (X/Y)
6464
// that the node under consideration belongs to, the forth is the segment type (specified in the architecture file under the "segmentlist" tag), the fourth is the
6565
// target "layer_num" mentioned above, the fifth is dx, and the last one is dy.
66-
typedef vtr::NdMatrix<util::Cost_Entry, 6>
67-
t_wire_cost_map; //[0..num_layers][0..num_layers][0..1][[0..num_seg_types-1][0..device_ctx.grid.width()-1][0..device_ctx.grid.height()-1]
68-
//[0..1] entry distinguish between CHANX/CHANY start nodes respectively
69-
// The first index is the layer number that the node under consideration is on, and the second index
70-
// is the layer number that the target node is on.
66+
// [0..num_layers][0..num_layers][0..1][[0..num_seg_types-1][0..device_ctx.grid.width()-1][0..device_ctx.grid.height()-1]
67+
typedef vtr::NdMatrix<util::Cost_Entry, 6> t_wire_cost_map;
68+
//[0..1] entry distinguish between CHANX/CHANY start nodes respectively
69+
// The first index is the layer number that the node under consideration is on, and the second index
70+
// is the layer number that the target node is on.
7171

7272
void read_router_lookahead(const std::string& file);
7373
void write_router_lookahead(const std::string& file);

0 commit comments

Comments
 (0)