Skip to content

Commit 33632a5

Browse files
committed
added doxygen commenting tp draw_noc and also removed uneccesarry const
1 parent b36ff5a commit 33632a5

File tree

2 files changed

+38
-3
lines changed

2 files changed

+38
-3
lines changed

vpr/src/draw/draw_noc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ void draw_noc_connection_marker(ezgl::renderer* g, const vtr::vector<NocRouterId
209209
/*
210210
* This function draws the links within the noc. So based on a given noc topology, this function draws the links that connect the routers in the noc together.
211211
*/
212-
void draw_noc_links(ezgl::renderer* g, const t_logical_block_type_ptr noc_router_logical_block_type, vtr::vector<NocLinkId, ezgl::color>& noc_link_colors, ezgl::rectangle noc_connection_marker_bbox, const vtr::vector<NocLinkId, NocLinkShift>& list_of_noc_link_shift_directions) {
212+
void draw_noc_links(ezgl::renderer* g, t_logical_block_type_ptr noc_router_logical_block_type, vtr::vector<NocLinkId, ezgl::color>& noc_link_colors, ezgl::rectangle noc_connection_marker_bbox, const vtr::vector<NocLinkId, NocLinkShift>& list_of_noc_link_shift_directions) {
213213
t_draw_coords* draw_coords = get_draw_coords_vars();
214214
auto& noc_ctx = g_vpr_ctx.noc();
215215

vpr/src/draw/draw_noc.h

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,42 @@ enum NocLinkShift {
6767
BOTTOM_SHIFT
6868
};
6969

70-
70+
/**
71+
* @brief Displays the NoC on the FPGA device. Displaying the NoC goes through the following steps:
72+
* - First check to make sure that the user selected to button to display the NoC otherwise don't display it
73+
* - Highlight the Noc routers by drawing a marker on top of them in the canvas
74+
* - Draw the links that connect the routers together (based on topology)
75+
* - If the user selected the option to show the NoC link usage, then color the links to represent how much
76+
* of their capacity is being used
77+
* - The drawing is done on top of the FPGA device within the canvas
78+
*
79+
* Below we have an example of how the Noc is displayed for a FPGA device with 2 routers:
80+
*
81+
* Before NoC display:
82+
* ********************* *********************
83+
* * * * *
84+
* * * * *
85+
* * * * *
86+
* * * * *
87+
* * * * *
88+
* * * * *
89+
* * * * *
90+
* ********************* *********************
91+
*
92+
* After NoC display:
93+
*
94+
* ********************* *********************
95+
* * * * *
96+
* * * * *
97+
* * ****<-------*----------------------*-------**** *
98+
* * * * * * * * *
99+
* * ****--------*----------------------*------>**** *
100+
* * * * *
101+
* * * * *
102+
* ********************* *********************
103+
*
104+
* @param g canvas renderer.
105+
*/
71106
void draw_noc(ezgl::renderer* g);
72107

73108
// draw_noc helper functions
@@ -135,7 +170,7 @@ void draw_noc_connection_marker(ezgl::renderer* g, const vtr::vector<NocRouterId
135170
* will overlap. This vector describes how the two links should be moved
136171
* so that they do not overlap.
137172
*/
138-
void draw_noc_links(ezgl::renderer* g, const t_logical_block_type_ptr noc_router_logical_block_type, vtr::vector<NocLinkId, ezgl::color>& noc_link_colors, ezgl::rectangle noc_connection_marker_bbox, const vtr::vector<NocLinkId, NocLinkShift>& list_of_noc_link_shift_directions);
173+
void draw_noc_links(ezgl::renderer* g, t_logical_block_type_ptr noc_router_logical_block_type, vtr::vector<NocLinkId, ezgl::color>& noc_link_colors, ezgl::rectangle noc_connection_marker_bbox, const vtr::vector<NocLinkId, NocLinkShift>& list_of_noc_link_shift_directions);
139174

140175
/**
141176
* @brief Goes through all the links within the NoC and updates the color that

0 commit comments

Comments
 (0)