static void alloc_routing_structs(struct s_router_opts router_opts, struct s_det_routing_arch det_routing_arch, t_segment_inf *segment_inf, t_timing_inf timing_inf, t_subblock_data subblock_data) { int bb_factor; /*calls routines that set up routing resource graph and associated structures*/ /*must set up dummy blocks for the first pass through*/ assign_locations(CLB, 1, 1, CLB, nx, ny); clb_opins_used_locally = alloc_route_structs(subblock_data); free_rr_graph(); build_rr_graph(router_opts.route_type, det_routing_arch, segment_inf, timing_inf, router_opts.base_cost_type); alloc_and_load_rr_node_route_structs(); alloc_timing_driven_route_structs(&pin_criticality, &sink_order, &rt_node_of_sink); bb_factor = nx + ny; /*set it to a huge value*/ init_route_structs(bb_factor); }
static float assign_blocks_and_route_net(t_type_ptr source_type, int source_x_loc, int source_y_loc, t_type_ptr sink_type, int sink_x_loc, int sink_y_loc, struct s_router_opts router_opts, struct s_det_routing_arch det_routing_arch, t_segment_inf * segment_inf, t_timing_inf timing_inf) { /*places blocks at the specified locations, and routes a net between them */ /*returns the delay of this net */ boolean is_routeable; int ipin; float pres_fac, T_crit; float net_delay_value; int source_z_loc, sink_z_loc; /* Only one block per tile */ source_z_loc = 0; sink_z_loc = 0; net_delay_value = IMPOSSIBLE; /*set to known value for debug purposes */ assign_locations(source_type, source_x_loc, source_y_loc, source_z_loc, sink_type, sink_x_loc, sink_y_loc, sink_z_loc); load_net_rr_terminals(rr_node_indices); T_crit = 1; pres_fac = 0; /* ignore congestion */ for(ipin = 1; ipin <= clb_net[NET_USED].num_sinks; ipin++) net_slack[NET_USED][ipin] = 0; is_routeable = timing_driven_route_net(NET_USED, pres_fac, router_opts.max_criticality, router_opts.criticality_exp, router_opts.astar_fac, router_opts.bend_cost, net_slack[NET_USED], pin_criticality, sink_order, rt_node_of_sink, T_crit, net_delay[NET_USED]); net_delay_value = net_delay[NET_USED][NET_USED_SINK_BLOCK]; grid[source_x_loc][source_y_loc].usage = 0; grid[source_x_loc][source_y_loc].blocks[source_z_loc] = EMPTY; grid[sink_x_loc][sink_y_loc].usage = 0; grid[sink_x_loc][sink_y_loc].blocks[sink_z_loc] = EMPTY; return (net_delay_value); }
static float assign_blocks_and_route_net(enum e_block_types source_type, int source_x_loc, int source_y_loc, enum e_block_types sink_type, int sink_x_loc, int sink_y_loc, struct s_router_opts router_opts, struct s_det_routing_arch det_routing_arch, t_segment_inf *segment_inf, t_timing_inf timing_inf) { /*places blocks at the specified locations, and routes a net between them*/ /*returns the delay of this net */ boolean is_routeable; int ipin; float pres_fac, T_crit; float net_delay_value; int **rr_node_indices; int nodes_per_chan; net_delay_value = IMPOSSIBLE; /*set to known value for debug purposes*/ assign_locations(source_type, source_x_loc, source_y_loc, sink_type, sink_x_loc, sink_y_loc); rr_node_indices = get_rr_node_indices(); nodes_per_chan = get_nodes_per_chan(); load_net_rr_terminals(rr_node_indices, nodes_per_chan, num_direct, io_rat); T_crit = 1; pres_fac = 0; /* ignore congestion */ for (ipin = 1; ipin < net[NET_USED].num_pins; ipin++) net_slack[NET_USED][ipin] = 0; is_routeable = timing_driven_route_net(NET_USED, pres_fac, router_opts.max_criticality, router_opts.criticality_exp, router_opts.astar_fac, router_opts.bend_cost, net_slack[NET_USED], pin_criticality, sink_order, rt_node_of_sink, T_crit, net_delay[NET_USED]); net_delay_value = net_delay[NET_USED][NET_USED_SINK_BLOCK]; if (!is_folding) { clb[source_x_loc][source_y_loc].occ = 0; clb[sink_x_loc][sink_y_loc].occ = 0; } else { //nionio added two lines clb[source_x_loc][source_y_loc].occ = 0; clb[sink_x_loc][sink_y_loc].occ = 0; stage_clb[0][source_x_loc][source_y_loc].occ = 0; stage_clb[0][sink_x_loc][sink_y_loc].occ = 0; } return (net_delay_value); }
static void alloc_routing_structs(struct s_router_opts router_opts, struct s_det_routing_arch det_routing_arch, t_segment_inf * segment_inf, t_timing_inf timing_inf) { int bb_factor; int warnings; t_graph_type graph_type; /*calls routines that set up routing resource graph and associated structures */ /*must set up dummy blocks for the first pass through to setup locally used opins */ /* Only one block per tile */ assign_locations(FILL_TYPE, 1, 1, 0, FILL_TYPE, nx, ny, 0); clb_opins_used_locally = alloc_route_structs(); free_rr_graph(); if(router_opts.route_type == GLOBAL) { graph_type = GRAPH_GLOBAL; } else { graph_type = (det_routing_arch.directionality == BI_DIRECTIONAL ? GRAPH_BIDIR : GRAPH_UNIDIR); } build_rr_graph(graph_type, num_types, dummy_type_descriptors, nx, ny, grid, chan_width_x[0], NULL, det_routing_arch.switch_block_type, det_routing_arch.Fs, det_routing_arch.num_segment, det_routing_arch.num_switch, segment_inf, det_routing_arch.global_route_switch, det_routing_arch.delayless_switch, timing_inf, det_routing_arch.wire_to_ipin_switch, router_opts.base_cost_type, &warnings); alloc_and_load_rr_node_route_structs(); alloc_timing_driven_route_structs(&pin_criticality, &sink_order, &rt_node_of_sink); bb_factor = nx + ny; /*set it to a huge value */ init_route_structs(bb_factor); }
static float assign_blocks_and_route_net(t_type_ptr source_type, int source_x_loc, int source_y_loc, t_type_ptr sink_type, int sink_x_loc, int sink_y_loc, struct s_router_opts router_opts, struct s_det_routing_arch det_routing_arch, t_segment_inf * segment_inf, t_timing_inf timing_inf) { /*places blocks at the specified locations, and routes a net between them */ /*returns the delay of this net */ float pres_fac, net_delay_value; int source_z_loc, sink_z_loc; /* Only one block per tile */ source_z_loc = 0; sink_z_loc = 0; net_delay_value = IMPOSSIBLE; /*set to known value for debug purposes */ assign_locations(source_type, source_x_loc, source_y_loc, source_z_loc, sink_type, sink_x_loc, sink_y_loc, sink_z_loc); load_net_rr_terminals(rr_node_indices); pres_fac = 0; /* ignore congestion */ /* Route this net with a dummy criticality of 0 by calling timing_driven_route_net with slacks set to NULL. */ timing_driven_route_net(NET_USED, pres_fac, router_opts.max_criticality, router_opts.criticality_exp, router_opts.astar_fac, router_opts.bend_cost, pin_criticality, sink_order, rt_node_of_sink, net_delay[NET_USED], NULL); net_delay_value = net_delay[NET_USED][NET_USED_SINK_BLOCK]; grid[source_x_loc][source_y_loc].usage = 0; grid[source_x_loc][source_y_loc].blocks[source_z_loc] = EMPTY; grid[sink_x_loc][sink_y_loc].usage = 0; grid[sink_x_loc][sink_y_loc].blocks[sink_z_loc] = EMPTY; return (net_delay_value); }