Skip to content

Commit e9d5647

Browse files
committed
[vpr] now change to a simpler rr gsb coordinate system: grid is moved to the bottom-left corner
1 parent 589b6bc commit e9d5647

File tree

2 files changed

+8
-18
lines changed

2 files changed

+8
-18
lines changed

vpr/src/tileable_rr_graph/rr_gsb.cpp

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -610,9 +610,9 @@ vtr::Point<size_t> RRGSB::get_cb_coordinate(const t_rr_type& cb_type) const {
610610
VTR_ASSERT(validate_cb_type(cb_type));
611611
switch (cb_type) {
612612
case CHANX:
613-
return get_side_block_coordinate(LEFT);
613+
return coordinate_;
614614
case CHANY:
615-
return get_side_block_coordinate(TOP);
615+
return coordinate_;
616616
default:
617617
VTR_LOG("Invalid type of connection block!\n");
618618
exit(1);
@@ -682,10 +682,7 @@ vtr::Point<size_t> RRGSB::get_side_block_coordinate(const e_side& side) const {
682682
}
683683

684684
vtr::Point<size_t> RRGSB::get_grid_coordinate() const {
685-
vtr::Point<size_t> ret(get_sb_x(), get_sb_y());
686-
ret.set_y(ret.y() + 1);
687-
688-
return ret;
685+
return coordinate_;
689686
}
690687

691688
/************************************************************************
@@ -1184,9 +1181,3 @@ bool RRGSB::validate_ipin_node_id(const e_side& side, const size_t& node_id) con
11841181
bool RRGSB::validate_cb_type(const t_rr_type& cb_type) const {
11851182
return ((CHANX == cb_type) || (CHANY == cb_type));
11861183
}
1187-
1188-
size_t RRGSB::get_cb_opin_type_id(const t_rr_type& cb_type) const {
1189-
VTR_ASSERT(validate_cb_type(cb_type));
1190-
return cb_type == CHANX ? 0 : 1;
1191-
}
1192-

vpr/src/tileable_rr_graph/rr_gsb.h

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@
1717
* 2. A X-direction Connection block locates at the left side of the switch block
1818
* 2. A Y-direction Connection block locates at the top side of the switch block
1919
*
20-
* +-------------+ +---------------------------------+
21-
* | | | Y-direction CB |
22-
* | Grid | | [x][y + 1] |
23-
* | [x][y+1] | +---------------------------------+
24-
* +-------------+
2520
* TOP SIDE
2621
* +-------------+ +---------------------------------+
2722
* | | | OPIN_NODE CHAN_NODES OPIN_NODES |
@@ -38,6 +33,11 @@
3833
* | | | OPIN_NODE CHAN_NODES OPIN_NODES |
3934
* +-------------+ +---------------------------------+
4035
* BOTTOM SIDE
36+
* +-------------+ +---------------------------------+
37+
* | Grid | | Y-direction CB |
38+
* | [x][y] | | [x][y] |
39+
* +-------------+ +---------------------------------+
40+
*
4141
* num_sides: number of sides of this switch block
4242
* chan_rr_node: a collection of rr_nodes as routing tracks locating at each side of the Switch block <0..num_sides-1><0..chan_width-1>
4343
* chan_rr_node_direction: Indicate if this rr_node is an input or an output of the Switch block <0..num_sides-1><0..chan_width-1>
@@ -229,7 +229,6 @@ class RRGSB {
229229
bool validate_opin_node_id(const e_side& side, const size_t& node_id) const;
230230
bool validate_ipin_node_id(const e_side& side, const size_t& node_id) const;
231231
bool validate_cb_type(const t_rr_type& cb_type) const;
232-
size_t get_cb_opin_type_id(const t_rr_type& cb_type) const;
233232

234233
private: /* Internal Data */
235234
/* Coordinator */

0 commit comments

Comments
 (0)