Skip to content

Commit 4194e81

Browse files
committed
Apply code review comment
1 parent af27706 commit 4194e81

39 files changed

+190
-274
lines changed

doc/src/vpr/VIB.rst renamed to doc/src/VIB.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@ The VIB architecture adds modeling support for double-level MUX topology and ben
66

77
Figure 1 shows the proposed VIB architecture which is tile-based. Each tile is composed of a CLB and a VIB. Each CLB can interact with the corresponding VIB which contains all the routing programmable switches in one tile. Figure 2 shows an example of the detailed interconnect architecture in VIB. The CLB input muxes and the driving muxes of wire segments can share the same fanins. A routing path of a net with two sinks is presented red in the Figure.
88

9-
.. figure:: ../Images/VIB.png
9+
.. figure:: Images/VIB.png
1010
:align: center
1111
:height: 300
1212

1313
Figure 1. VIB architecture. The connections between the inputs and outputs of the LB and the routing wires are all implemented within the VIB.
1414

15-
.. figure:: ../Images/double-level.png
15+
.. figure:: Images/double-level.png
1616
:align: center
1717

1818
Figure 2. Double-level MUX topology.
1919

2020
Figure 3 shows the modeling for bent wires. A bent L-length wire is modeled as two segments in CHANX and CHANY respectively connected by a delayless switch. The orange and red arrows represent conterclockwise and clockwise bent wires respectively. The bent wires can connect to both bent and straight wire segments.
2121

22-
.. figure:: ../Images/bent_wires.png
22+
.. figure:: Images/bent_wires.png
2323
:align: center
2424

2525
Figure 3. Presentation for bent wires.
@@ -217,7 +217,7 @@ Here is a complete example of the ``<vib>`` tag:
217217
218218
Its corresponding detailed architecture is shown in Figure 4.
219219

220-
.. figure:: ../Images/vib_example.png
220+
.. figure:: Images/vib_example.png
221221
:align: center
222222
:height: 600
223223

doc/src/arch/reference.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2701,11 +2701,11 @@ Layout
27012701

27022702
Technical details can be found in :cite:`XTang_FPT_2019`.
27032703

2704-
.. note:: Strongly recommend to enable the tileable routing architecture when you want to PnR large FPGA fabrics, which can effectively reduce the runtime.
2704+
.. note:: It is strongly recommended to to enable the tileable routing architecture when you want to PnR large FPGA fabrics, which can effectively reduce the runtime.
27052705

27062706
.. option:: through_channel="<bool>"
27072707

2708-
Allow routing channels to pass through multi-width and multi-height programable blocks. This is mainly used in heterogeneous FPGAs to increase routability, as illustrated in :numref:`fig_thru_channel`.
2708+
Allow routing channels to pass through multi-width and multi-height programmable blocks. This is mainly used in heterogeneous FPGAs to increase routability, as illustrated in :numref:`fig_thru_channel`.
27092709
By default, it is ``false``.
27102710

27112711
.. _fig_thru_channel:
@@ -3024,3 +3024,8 @@ A point to point connection can be applied in different ways than showed in the
30243024

30253025
Point to point truth table
30263026

3027+
VIB Architecture
3028+
~~~~~~~~~~~~~~~~
3029+
3030+
.. include:: VIB.rst
3031+

doc/src/vpr/index.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,3 @@ The purpose of VPR is to make the packing, placement, and routing stages of the
6060

6161
file_formats
6262
debug_aids
63-
64-
VIB

libs/libarchfpga/src/read_xml_arch_file.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5192,14 +5192,14 @@ static void process_vib(pugi::xml_node Vib_node, std::vector<t_physical_tile_typ
51925192
"No name specified for the vib seg group!\n");
51935193
}
51945194

5195-
seg_group.axis = BOTH_DIR; /*DEFAULT value if no axis is specified*/
5195+
seg_group.axis = e_parallel_axis_vib::BOTH_DIR; /*DEFAULT value if no axis is specified*/
51965196
tmp = get_attribute(Node, "axis", loc_data, ReqOpt::OPTIONAL).as_string("");
51975197

51985198
if (!tmp.empty()) {
51995199
if (tmp == "x") {
5200-
seg_group.axis = X;
5200+
seg_group.axis = e_parallel_axis_vib::X;
52015201
} else if (tmp == "y") {
5202-
seg_group.axis = Y;
5202+
seg_group.axis = e_parallel_axis_vib::Y;
52035203
} else {
52045204
archfpga_throw(loc_data.filename_c_str(), loc_data.line(Node), "Unsopported parralel axis type: %s\n", tmp);
52055205
}

libs/libarchfpga/src/vib_inf.h

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#ifndef VIB_INF_H
2-
#define VIB_INF_H
1+
#pragma once
32

43
#include <functional>
54
#include <utility>
@@ -22,26 +21,32 @@
2221
#include "logic_types.h"
2322
#include "clock_types.h"
2423

25-
//#include "physical_types.h"
26-
27-
/* for vib tag */
28-
enum e_parallel_axis_vib {
24+
/**
25+
* @brief The parallel axis of the VIB segment group.
26+
*/
27+
enum class e_parallel_axis_vib {
2928
X,
3029
Y,
3130
BOTH_DIR
3231
};
3332

33+
/**
34+
* @brief Segment group information.
35+
*/
3436
struct t_seg_group {
3537
std::string name;
3638
e_parallel_axis_vib axis;
3739
int seg_index;
3840
int track_num;
3941
};
4042

41-
enum e_multistage_mux_from_or_to_type {
42-
PB = 0,
43-
SEGMENT,
44-
MUX
43+
/**
44+
* @brief The type of the from or to of the multistage mux.
45+
*/
46+
enum class e_multistage_mux_from_or_to_type {
47+
PB = 0, //Physical block
48+
SEGMENT, //Segment
49+
MUX //MUX
4550
};
4651

4752
struct t_from_or_to_inf {
@@ -270,5 +275,3 @@ class VibDeviceGrid {
270275
*/
271276
vtr::NdMatrix<const VibInf*, 3> vib_grid_; //This stores the grid of complex blocks. It is a 3D matrix: [0..num_layers-1][0..grid.width()-1][0..grid_height()-1]
272277
};
273-
274-
#endif

libs/librrgraph/src/base/rr_graph_builder.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,6 @@ void RRGraphBuilder::set_node_ptc_nums(RRNodeId node, const std::string& ptc_str
246246
std::string RRGraphBuilder::node_ptc_nums_to_string(RRNodeId node) const {
247247
if (node_ptc_nums_.empty()) {
248248
return std::to_string(size_t(node_storage_.node_ptc_num(node)));
249-
// VTR_LOG("Node ptc single: %d -> string %s\n", node_storage_.node_ptc_num(node), ret.c_str());
250249
}
251250
VTR_ASSERT(size_t(node) < node_ptc_nums_.size());
252251
if (node_ptc_nums_[node].empty()) {
@@ -300,8 +299,8 @@ void RRGraphBuilder::add_track_node_to_lookup(RRNodeId node) {
300299
VTR_ASSERT(size_t(std::max(node_storage_.node_xlow(node), node_storage_.node_xhigh(node))) == node_x.back());
301300
VTR_ASSERT(size_t(std::max(node_storage_.node_ylow(node), node_storage_.node_yhigh(node))) == node_y.back());
302301

303-
for (const size_t& x : node_x) {
304-
for (const size_t& y : node_y) {
302+
for (const size_t x : node_x) {
303+
for (const size_t y : node_y) {
305304
size_t ptc = node_storage_.node_ptc_num(node);
306305
e_rr_type node_type = node_storage_.node_type(node);
307306
/* Routing channel nodes may have different ptc num

libs/librrgraph/src/base/rr_graph_builder.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,20 @@ class RRGraphBuilder {
193193
node_storage_.set_node_coordinates(id, x1, y1, x2, y2);
194194
}
195195

196+
/**
197+
* @brief Set the bend start of a node
198+
* @param id The node id
199+
* @param bend_start The bend start
200+
*/
196201
inline void set_node_bend_start(RRNodeId id, size_t bend_start) {
197202
node_storage_.set_node_bend_start(id, bend_start);
198203
}
199204

205+
/**
206+
* @brief Set the bend end of a node
207+
* @param id The node id
208+
* @param bend_end The bend end
209+
*/
200210
inline void set_node_bend_end(RRNodeId id, size_t bend_end) {
201211
node_storage_.set_node_bend_end(id, bend_end);
202212
}

libs/librrgraph/src/base/rr_graph_view.h

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,10 +229,21 @@ class RRGraphView {
229229
inline short node_layer(RRNodeId node) const {
230230
return node_storage_.node_layer(node);
231231
}
232-
232+
233+
/**
234+
* @brief Return the bend start of a specified node.
235+
* @param node The node id
236+
* @return The bend start
237+
*/
233238
inline short node_bend_start(RRNodeId node) const {
234239
return node_storage_.node_bend_start(node);
235240
}
241+
242+
/**
243+
* @brief Return the bend end of a specified node.
244+
* @param node The node id
245+
* @return The bend end
246+
*/
236247
inline short node_bend_end(RRNodeId node) const {
237248
return node_storage_.node_bend_end(node);
238249
}
@@ -446,6 +457,12 @@ class RRGraphView {
446457
inline RRNodeId edge_sink_node(RRNodeId id, t_edge_size iedge) const {
447458
return node_storage_.edge_sink_node(id, iedge);
448459
}
460+
461+
/**
462+
* @brief Return the destination node for the specified edge.
463+
* @param edge The edge id
464+
* @return The destination node id
465+
*/
449466
inline RRNodeId edge_sink_node(RREdgeId edge) const {
450467
return node_storage_.edge_sink_node(edge);
451468
}
@@ -466,6 +483,12 @@ class RRGraphView {
466483
inline bool edge_is_configurable(RRNodeId id, t_edge_size iedge) const {
467484
return node_storage_.edge_is_configurable(id, iedge, rr_switch_inf_);
468485
}
486+
487+
/**
488+
* @brief Check if the edge is a configurable edge
489+
* @param edge The edge id
490+
* @return True if the edge is configurable, false otherwise
491+
*/
469492
inline bool edge_is_configurable(RREdgeId edge) const {
470493
return node_storage_.edge_is_configurable(edge, rr_switch_inf_);
471494
}

libs/librrgraph/src/utils/vtr_tokenizer.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#ifndef VTR_TOKENIZER_H
2-
#define VTR_TOKENIZER_H
1+
#pragma once
32

43
/********************************************************************
54
* Include header files that are required by data structure declaration
@@ -66,5 +65,3 @@ class StringToken {
6665
};
6766

6867
} // namespace openfpga
69-
70-
#endif

libs/libvtrutil/src/vtr_geometry.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ bool operator!=(const RectUnion<T>& lhs, const RectUnion<T>& rhs);
5959
template<class T>
6060
class Point {
6161
public: //Constructors
62-
Point() {}
6362
Point(T x_val, T y_val) noexcept;
6463

6564
public: //Accessors

0 commit comments

Comments
 (0)