@@ -57,7 +57,7 @@ void process_blocks(pugi::xml_node parent, const pugiutil::loc_data& loc_data);
57
57
void verify_grid (pugi::xml_node parent, const pugiutil::loc_data& loc_data, const DeviceGrid& grid);
58
58
void process_nodes (pugi::xml_node parent, const pugiutil::loc_data& loc_data);
59
59
void process_edges (pugi::xml_node parent, const pugiutil::loc_data& loc_data, int * wire_to_rr_ipin_switch, const int num_rr_switches);
60
- void process_channels (t_chan_width& chan_width, pugi::xml_node parent, const pugiutil::loc_data& loc_data);
60
+ void process_channels (t_chan_width& chan_width, const DeviceGrid& grid, pugi::xml_node parent, const pugiutil::loc_data& loc_data);
61
61
void process_rr_node_indices (const DeviceGrid& grid);
62
62
void process_seg_id (pugi::xml_node parent, const pugiutil::loc_data& loc_data);
63
63
void set_cost_indices (pugi::xml_node parent, const pugiutil::loc_data& loc_data, const bool is_global_graph, const int num_seg_types);
@@ -69,7 +69,6 @@ void set_cost_indices(pugi::xml_node parent, const pugiutil::loc_data& loc_data,
69
69
* structures as well*/
70
70
void load_rr_file (const t_graph_type graph_type,
71
71
const DeviceGrid& grid,
72
- t_chan_width nodes_per_chan,
73
72
const std::vector<t_segment_inf>& segment_inf,
74
73
const enum e_base_cost_type base_cost_type,
75
74
int * wire_to_rr_ipin_switch,
@@ -131,7 +130,8 @@ void load_rr_file(const t_graph_type graph_type,
131
130
VTR_LOG (" Starting build routing resource graph...\n " );
132
131
133
132
next_component = get_first_child (rr_graph, " channels" , loc_data);
134
- process_channels (nodes_per_chan, next_component, loc_data);
133
+ t_chan_width nodes_per_chan;
134
+ process_channels (nodes_per_chan, grid, next_component, loc_data);
135
135
136
136
/* Decode the graph_type */
137
137
bool is_global_graph = (GRAPH_GLOBAL == graph_type ? true : false );
@@ -177,6 +177,7 @@ void load_rr_file(const t_graph_type graph_type,
177
177
process_seg_id (next_component, loc_data);
178
178
179
179
device_ctx.chan_width = nodes_per_chan;
180
+ device_ctx.read_rr_graph_filename = std::string (read_rr_graph_name);
180
181
181
182
check_rr_graph (graph_type, grid, device_ctx.block_types );
182
183
@@ -486,7 +487,7 @@ void process_edges(pugi::xml_node parent, const pugiutil::loc_data& loc_data, in
486
487
}
487
488
488
489
/* All channel info is read in and loaded into device_ctx.chan_width*/
489
- void process_channels (t_chan_width& chan_width, pugi::xml_node parent, const pugiutil::loc_data& loc_data) {
490
+ void process_channels (t_chan_width& chan_width, const DeviceGrid& grid, pugi::xml_node parent, const pugiutil::loc_data& loc_data) {
490
491
pugi::xml_node channel, channelLists;
491
492
492
493
channel = get_first_child (parent, " channel" , loc_data);
@@ -496,6 +497,8 @@ void process_channels(t_chan_width& chan_width, pugi::xml_node parent, const pug
496
497
chan_width.y_min = get_attribute (channel, " y_min" , loc_data).as_uint ();
497
498
chan_width.x_max = get_attribute (channel, " x_max" , loc_data).as_uint ();
498
499
chan_width.y_max = get_attribute (channel, " y_max" , loc_data).as_uint ();
500
+ chan_width.x_list .resize (grid.height ());
501
+ chan_width.y_list .resize (grid.width ());
499
502
500
503
channelLists = get_first_child (parent, " x_list" , loc_data);
501
504
while (channelLists) {
0 commit comments