[Tool] Update comments in tileable rr_graph generator to be easier to be understood

This commit is contained in:
tangxifan 2021-04-26 11:48:02 -06:00
parent d7426808ba
commit 880624e699
1 changed files with 13 additions and 22 deletions

View File

@ -821,9 +821,8 @@ RRGSB build_one_tileable_rr_gsb(const DeviceGrid& grids,
opin_grid_side[1] = NUM_SIDES; opin_grid_side[1] = NUM_SIDES;
} }
/* SideManager: TOP => 0, RIGHT => 1, BOTTOM => 2, LEFT => 3 */ /* Add IPIN nodes from adjacent grids: the 4 grids sitting on the 4 corners of the Switch Block */
for (size_t side = 0; side < rr_gsb.get_num_sides(); ++side) { for (size_t side = 0; side < rr_gsb.get_num_sides(); ++side) {
/* Local variables inside this for loop */
SideManager side_manager(side); SideManager side_manager(side);
size_t ix; size_t ix;
size_t iy; size_t iy;
@ -832,42 +831,34 @@ RRGSB build_one_tileable_rr_gsb(const DeviceGrid& grids,
enum e_side ipin_rr_node_grid_side; enum e_side ipin_rr_node_grid_side;
switch (side) { switch (side) {
case TOP: /* TOP = 0 */ case TOP:
/* For the bording, we should take special care */ /* Consider the routing channel that is connected to the left side of the switch block */
/* Check if left side chan width is 0 or not */
chan_side = LEFT; chan_side = LEFT;
/* Build the connection block: ipin and ipin_grid_side */ /* The input pins of the routing channel come from the bottom side of Grid[x][y+1] */
/* BOTTOM side INPUT Pins of Grid[x][y+1] */
ix = rr_gsb.get_sb_x(); ix = rr_gsb.get_sb_x();
iy = rr_gsb.get_sb_y() + 1; iy = rr_gsb.get_sb_y() + 1;
ipin_rr_node_grid_side = BOTTOM; ipin_rr_node_grid_side = BOTTOM;
break; break;
case RIGHT: /* RIGHT = 1 */ case RIGHT:
/* For the bording, we should take special care */ /* Consider the routing channel that is connected to the top side of the switch block */
/* Check if TOP side chan width is 0 or not */
chan_side = TOP; chan_side = TOP;
/* Build the connection block: ipin and ipin_grid_side */ /* The input pins of the routing channel come from the left side of Grid[x+1][y+1] */
/* LEFT side INPUT Pins of Grid[x+1][y+1] */
ix = rr_gsb.get_sb_x() + 1; ix = rr_gsb.get_sb_x() + 1;
iy = rr_gsb.get_sb_y() + 1; iy = rr_gsb.get_sb_y() + 1;
ipin_rr_node_grid_side = LEFT; ipin_rr_node_grid_side = LEFT;
break; break;
case BOTTOM: /* BOTTOM = 2*/ case BOTTOM:
/* For the bording, we should take special care */ /* Consider the routing channel that is connected to the left side of the switch block */
/* Check if left side chan width is 0 or not */
chan_side = LEFT; chan_side = LEFT;
/* Build the connection block: ipin and ipin_grid_side */ /* The input pins of the routing channel come from the top side of Grid[x][y] */
/* TOP side INPUT Pins of Grid[x][y] */
ix = rr_gsb.get_sb_x(); ix = rr_gsb.get_sb_x();
iy = rr_gsb.get_sb_y(); iy = rr_gsb.get_sb_y();
ipin_rr_node_grid_side = TOP; ipin_rr_node_grid_side = TOP;
break; break;
case LEFT: /* LEFT = 3 */ case LEFT:
/* For the bording, we should take special care */ /* Consider the routing channel that is connected to the top side of the switch block */
/* Check if left side chan width is 0 or not */
chan_side = TOP; chan_side = TOP;
/* Build the connection block: ipin and ipin_grid_side */ /* The input pins of the routing channel come from the right side of Grid[x][y+1] */
/* RIGHT side INPUT Pins of Grid[x][y+1] */
ix = rr_gsb.get_sb_x(); ix = rr_gsb.get_sb_x();
iy = rr_gsb.get_sb_y() + 1; iy = rr_gsb.get_sb_y() + 1;
ipin_rr_node_grid_side = RIGHT; ipin_rr_node_grid_side = RIGHT;