@@ -105,7 +105,7 @@ void build_rr_graph_edges(const RRGraphView& rr_graph,
105
105
RRGraphBuilder& rr_graph_builder,
106
106
vtr::vector<RRNodeId, RRSwitchId>& rr_node_driver_switches,
107
107
const DeviceGrid& grids,
108
- const vtr::NdMatrix< const VibInf*, 3 > & vib_grid,
108
+ const VibDeviceGrid & vib_grid,
109
109
const size_t & layer,
110
110
const vtr::Point <size_t >& device_chan_width,
111
111
const std::vector<t_segment_inf>& segment_inf,
@@ -127,18 +127,18 @@ void build_rr_graph_edges(const RRGraphView& rr_graph,
127
127
std::vector<std::vector<std::vector<std::map<std::string, size_t >>>> medium_mux_name2medium_index;
128
128
129
129
if (is_vib_arch) {
130
- medium_mux_name2medium_index.resize (vib_grid.dim_size ( 0 ));
131
- for (size_t i_layer = 0 ; i_layer < vib_grid.dim_size ( 0 ); i_layer++) {
132
- medium_mux_name2medium_index[i_layer].resize (vib_grid.dim_size ( 1 ));
130
+ medium_mux_name2medium_index.resize (vib_grid.get_num_layers ( ));
131
+ for (size_t i_layer = 0 ; i_layer < vib_grid.get_num_layers ( ); i_layer++) {
132
+ medium_mux_name2medium_index[i_layer].resize (vib_grid.width ( ));
133
133
134
- for (size_t ix = 0 ; ix < vib_grid.dim_size ( 1 ); ix++) {
135
- medium_mux_name2medium_index[i_layer][ix].resize (vib_grid.dim_size ( 2 ));
134
+ for (size_t ix = 0 ; ix < vib_grid.width ( ); ix++) {
135
+ medium_mux_name2medium_index[i_layer][ix].resize (vib_grid.height ( ));
136
136
137
- for (size_t iy = 0 ; iy < vib_grid.dim_size ( 2 ); iy++) {
137
+ for (size_t iy = 0 ; iy < vib_grid.height ( ); iy++) {
138
138
std::map<std::string, size_t > mux_name_map;
139
139
140
- for (size_t i_mux = 0 ; i_mux < vib_grid[ i_layer][ix][iy]-> get_first_stages (). size ( ); i_mux++) {
141
- mux_name_map.emplace (vib_grid[ i_layer][ix][iy]-> get_first_stages ()[ i_mux]. mux_name , i_mux);
140
+ for (size_t i_mux = 0 ; i_mux < vib_grid. num_medium_nodes ( i_layer, ix, iy ); i_mux++) {
141
+ mux_name_map.emplace (vib_grid. medium_node_name ( i_layer, ix, iy, i_mux) , i_mux);
142
142
}
143
143
medium_mux_name2medium_index[i_layer][ix][iy] = mux_name_map;
144
144
}
0 commit comments