spot a bug in assigning rr_switch in tileable routing

This commit is contained in:
tangxifan 2020-03-20 16:53:43 -06:00
parent 708fda9606
commit 2c0c5a061b
1 changed files with 7 additions and 0 deletions

View File

@ -53,6 +53,13 @@ void build_routing_arch_mux_library(const DeviceContext& vpr_device_ctx,
VTR_ASSERT(1 == driver_switches.size()); VTR_ASSERT(1 == driver_switches.size());
const CircuitModelId& rr_switch_circuit_model = vpr_device_annotation.rr_switch_circuit_model(driver_switches[0]); const CircuitModelId& rr_switch_circuit_model = vpr_device_annotation.rr_switch_circuit_model(driver_switches[0]);
/* we should select a circuit model for the routing resource switch */ /* we should select a circuit model for the routing resource switch */
if (CircuitModelId::INVALID() == rr_switch_circuit_model) {
VTR_LOG_ERROR("Unable to find the circuit mode for rr_switch '%s'!\n",
vpr_device_ctx.rr_graph.get_switch(driver_switches[0]).name);
vpr_device_ctx.rr_graph.print_node(node);
exit(1);
}
VTR_ASSERT(CircuitModelId::INVALID() != rr_switch_circuit_model); VTR_ASSERT(CircuitModelId::INVALID() != rr_switch_circuit_model);
/* Add the mux to mux_library */ /* Add the mux to mux_library */
mux_lib.add_mux(circuit_lib, rr_switch_circuit_model, vpr_device_ctx.rr_graph.node_in_edges(node).size()); mux_lib.add_mux(circuit_lib, rr_switch_circuit_model, vpr_device_ctx.rr_graph.node_in_edges(node).size());