Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support IPIN connections from all four sides incoming wires of the GSB #1946

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions openfpga/src/annotation/annotate_rr_graph.cpp
Original file line number Diff line number Diff line change
@@ -397,6 +397,16 @@ static RRGSB build_rr_gsb(const DeviceContext& vpr_device_ctx,
/* Build OPIN node lists for connection blocks */
rr_gsb.build_cb_opin_nodes(vpr_device_ctx.rr_graph);

for (size_t side = 0; side < rr_gsb.get_num_sides(); ++side) {
SideManager side_manager(side);
VTR_LOG_DEBUG(
"RRGSB at (%lu, %lu) has %lu chan nodes, %lu ipin nodes, and %lu opin "
"nodes.\n",
rr_gsb.get_x(), rr_gsb.get_y(),
rr_gsb.chan_node_size(side_manager.get_side()),
rr_gsb.ipin_node_size(side_manager.get_side()),
rr_gsb.opin_node_size(side_manager.get_side()));
}
return rr_gsb;
}

31 changes: 25 additions & 6 deletions openfpga/src/annotation/write_xml_device_rr_gsb.cpp
Original file line number Diff line number Diff line change
@@ -51,14 +51,33 @@ static void write_rr_gsb_ipin_connection_to_xml(std::fstream& fp,
}

enum e_side chan_side = rr_gsb.get_cb_chan_side(gsb_side);
int driver_node_index = -1;

SideManager chan_side_manager(chan_side);

/* For channel node, we do not know the node direction
* But we are pretty sure it is either IN_PORT or OUT_PORT
* So we just try and find what is valid
*/
int driver_node_index =
rr_gsb.get_chan_node_index(chan_side, driver_node);
driver_node_index = rr_gsb.get_chan_node_index(chan_side, driver_node);

if (-1 == driver_node_index) {
for (size_t side = 0; side < NUM_2D_SIDES; ++side) {
chan_side_manager.set_side(side);
chan_side = chan_side_manager.get_side();
for (PORTS port_direc : {IN_PORT, OUT_PORT}) {
/* For channel node, we do not know the node direction
* But we are pretty sure it is either IN_PORT or OUT_PORT
* So we just try and find what is valid
*/
driver_node_index =
rr_gsb.get_chan_node_index(chan_side, driver_node);
if (-1 != driver_node_index) {
break;
}
}
if (-1 != driver_node_index) {
break;
}
}
}

/* We must have a valide node index */
VTR_ASSERT(-1 != driver_node_index);

2 changes: 1 addition & 1 deletion vtr-verilog-to-routing