Skip to content

Commit 2262cf2

Browse files
committed
Making edits to to main NoC datastructure documentation and also adding NoC routing algorithm associated documentation
1 parent 1dc487a commit 2262cf2

File tree

10 files changed

+60
-27
lines changed

10 files changed

+60
-27
lines changed

doc/src/api/vprinternals/noc_data_types.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
NoC Data Types
33
==============
44

5-
Types
6-
-----
5+
Data Types
6+
----------
77
.. doxygenfile:: noc_data_types.h
8-
:project: vpr
9-
:sections: typedef
8+
:project: vpr

doc/src/api/vprinternals/noc_routing.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,19 @@ NoC Routing
55
NocRouting
66
---------------
77
.. doxygenfile:: noc_routing.h
8+
:project: vpr
9+
10+
NocRoutingAlgorithmCreator
11+
--------------------------
12+
.. doxygenfile:: noc_routing_algorithm_creator.h
13+
:project: vpr
14+
15+
XYRouting
16+
---------
17+
.. doxygenfile:: xy_routing.h
18+
:project: vpr
19+
20+
BFSRouting
21+
----------
22+
.. doxygenfile:: bfs_routing.h
823
:project: vpr

vpr/src/noc/noc_data_types.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
#ifndef NOC_DATA_TYPES_H
22
#define NOC_DATA_TYPES_H
33

4+
/**
5+
* @file
6+
* @brief This file contains datatype definitions which are used by the NoC datastructures.
7+
*
8+
*/
9+
410
#include "vtr_strong_id.h"
511

612
// data types used to index the routers and links within the noc

vpr/src/noc/noc_link.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@
2323
* exceeds the links supported capability).
2424
*
2525
* Example:
26-
*
26+
* ```
2727
* ---------- ----------
2828
* / / link / /
2929
* / router / --------------------->/ router /
3030
* / a / / b /
3131
* / / / /
3232
* /--------/ /--------/
33-
*
33+
* ```
3434
* In the example above the links source router would be router a and
3535
* the sink router would be router b.
3636
*
@@ -44,10 +44,10 @@
4444
class NocLink {
4545
private:
4646
// the two routers that are connected by this link
47-
NocRouterId source_router; /*!< The router which has this link as an outgoing edge*/
47+
NocRouterId source_router; /*!< The router which uses this link as an outgoing edge*/
4848
NocRouterId sink_router; /*!< The router which uses this link as an incoming edge*/
4949

50-
double bandwidth_usage; /*!< Represents the bandwidth of the data being transmitted on the link. Units in bps*/
50+
double bandwidth_usage; /*!< Represents the bandwidth of the data being transmitted on the link. Units in bits-per-second(bps)*/
5151

5252
public:
5353
NocLink(NocRouterId source_router, NocRouterId sink_router);
@@ -77,14 +77,14 @@ class NocLink {
7777
// setters
7878
/**
7979
* @brief Can be used to set the source router of the link to a different router.
80-
* @param source_router The identifier representing the router that should be the source of
80+
* @param source An identifier representing the router that should be the source of
8181
* this link
8282
*/
8383
void set_source_router(NocRouterId source);
8484

8585
/**
8686
* @brief Can be used to set the sink router of the link to a different router.
87-
* @param sink_router The identifier representing the router that should be the sink of
87+
* @param sink An identifier representing the router that should be the sink of
8888
* this link
8989
*/
9090
void set_sink_router(NocRouterId sink);

vpr/src/noc/noc_router.h

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,24 @@
3838

3939
class NocRouter {
4040
private:
41-
/** this represents a unique id provided by the user when describing the NoC topology in the arch file. The intended
41+
/** This represents a unique id provided by the user when describing the NoC topology in the arch file. The intended
4242
* use is to report errors with router ids the user understands*/
4343
int router_user_id;
4444

4545
// device position of the physical router tile
46-
int router_grid_position_x; /*<! Represents the horizontal grid position on the device the physical router tile is located*/
47-
int router_grid_position_y; /*<! Represents the vertical grid position on the device the physical router is located*/
48-
int router_layer_position; /*<! Represents the layer number of the die that the physical router is located*/
46+
/** Represents the horizontal grid position on the device
47+
* the physical router tile is located*/
48+
int router_grid_position_x;
49+
/** Represents the vertical grid position on the device
50+
* the physical router is located*/
51+
int router_grid_position_y;
52+
/** Represents the layer number of the die
53+
* that the physical router is located*/
54+
int router_layer_position;
4955

50-
ClusterBlockId router_block_ref; /*<! A unique identifier that represents a router block in the clustered netlist that is placed on the physical router*/
56+
/** A unique identifier that represents a router block in the
57+
* clustered netlist that is placed on the physical router*/
58+
ClusterBlockId router_block_ref;
5159

5260
public:
5361
NocRouter(int id, int grid_position_x, int grid_position_y, int layer_position);

vpr/src/noc/noc_routing.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#define VTR_NOCROUTING_H
33

44
/**
5-
* @file NocRouting.h
5+
* @file
66
* @brief This file defines the NocRouting class, which handles the
77
* packet routing between routers within the NoC. It describes the routing
88
* algorithm for the NoC.

vpr/src/noc/noc_routing_algorithm_creator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
* Overview
1010
* ========
11-
* There are a number of different available NoC routing algorithms. This class * is a factory object for the NocRouting abstract class. This class constructs
11+
* There are a number of different available NoC routing algorithms. This class is a factory object for the NocRouting abstract class. This class constructs
1212
* the appropriate routing algorithm based on the user specification in the
1313
* command line. The user identifies a
1414
* specific routing algorithm in the command line by providing a string

vpr/src/noc/noc_storage.h

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,15 @@
4646
#include "vtr_assert.h"
4747
#include "vpr_error.h"
4848
#include "echo_files.h"
49-
49+
// \cond
5050
// represents the id of a link that does not exist in the NoC
5151
constexpr NocLinkId INVALID_LINK_ID(-1);
52+
// \endcond
5253

5354
class NocStorage {
5455
private:
55-
vtr::vector<NocRouterId, NocRouter> router_storage; /*<! Contains all the routers in the NoC*/
56+
/** Contains all the routers in the NoC*/
57+
vtr::vector<NocRouterId, NocRouter> router_storage;
5658

5759
// list of outgoing links for each router
5860
/**
@@ -63,7 +65,8 @@ class NocStorage {
6365
*/
6466
vtr::vector<NocRouterId, std::vector<NocLinkId>> router_link_list;
6567

66-
vtr::vector<NocLinkId, NocLink> link_storage; /*<! Contains all the links in the NoC*/
68+
/** Contains all the links in the NoC*/
69+
vtr::vector<NocLinkId, NocLink> link_storage;
6770

6871
/**
6972
* @brief The user provides an ID for the router when describing the NoC
@@ -409,14 +412,14 @@ class NocStorage {
409412
* link is returned.
410413
*
411414
* Example:
412-
*
415+
* ```
413416
* ---------- ----------
414417
* / / link 1 / /
415418
* / router / --------------------->/ router /
416419
* / a / <---------------------/ b /
417420
* / / link 2 / /
418421
* /--------/ /--------/
419-
*
422+
* ```
420423
* In the example above, link 1 and link 2 are parallel.
421424
*
422425
* @param current_link A unique identifier that represents a link

vpr/src/noc/noc_traffic_flows.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
* design.
2424
*
2525
* This class will be primarily used during
26-
* placement to identify which routers inside the NoC(NocStorage) need to be
26+
* placement to identify which routers inside the NoC ( NocStorage ) need to be
2727
* routed to each other.This is important since the router modules can be moved
2828
* around to different tiles on the FPGA device.
2929
*
@@ -46,12 +46,14 @@
4646
*
4747
*/
4848
struct t_noc_traffic_flow {
49-
/** stores the partial names of the router blocks communicating within this traffic flow. Names must uniquely identify router blocks in the netlist.*/
49+
/** stores the partial name of the source router block communicating within this traffic flow. Names must uniquely identify router blocks in the netlist.*/
5050
std::string source_router_module_name;
51+
/** stores the partial name of the sink router block communicating within this traffic flow. Names must uniquely identify router blocks in the netlist.*/
5152
std::string sink_router_module_name;
5253

53-
/** stores the block id of the two router blocks communicating within this traffic flow. This can be used to retrieve the block information from the clustered netlist*/
54+
/** stores the block id of the source router block communicating within this traffic flow. This can be used to retrieve the block information from the clustered netlist*/
5455
ClusterBlockId source_router_cluster_id;
56+
/** stores the block id of the destination router block communicating within this traffic flow. This can be used to retrieve the block information from the clustered netlist*/
5557
ClusterBlockId sink_router_cluster_id;
5658

5759
/** The bandwidth of the information transferred between the two routers. Units in bytes per second. This parameters will be used to update the link usage in the noc model after routing the traffic flow.*/

vpr/src/noc/xy_routing.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
*
4242
* Below we have an example of the path determined by this algorithm for a
4343
* 3x3 mesh NoC:
44-
*
44+
* ```
4545
* --------- --------- ---------
4646
* / / / / / /
4747
* / $ / ----------------- / / ------------------ / /
@@ -65,7 +65,7 @@
6565
* / / ----------------- / / ------------------ / * /
6666
* / / / / / /
6767
* --------- --------- ---------
68-
*
68+
* ```
6969
* In the example above, the router marked with the '*' character is the start
7070
* and the router marked with the '$' character is the destination. The path
7171
* determined by the XY-Routing algorithm is shown as "<++++".

0 commit comments

Comments
 (0)