You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//check if the absolute value is within the device grid width and height
3968
-
if(sb.x > grid_width || sb.y > grid_height){
3969
-
archfpga_throw(loc_data.filename_c_str(), loc_data.line(SubElem), "Location (%d,%d) is not valid within the grid! grid dimensions are: (%d,%d)\n", sb.x, sb.y, grid_width, grid_height);
/* returns true if the coordinates x/y do not correspond to the location specified by 'location' */
271
-
staticboolsb_not_here(const DeviceGrid& grid, int x, int y, e_sb_location location, int sb_x, int sb_y, conste_sb_loc_spec& sb_reg_x, const e_sb_loc_spec& sb_reg_y);
271
+
staticboolsb_not_here(const DeviceGrid& grid, int x, int y, constt_switchblock_inf& sb);
272
272
273
273
/* checks if the specified coordinates represent a corner of the FPGA */
274
274
staticboolis_corner(const DeviceGrid& grid, int x, int y);
@@ -280,7 +280,7 @@ static bool is_perimeter(const DeviceGrid& grid, int x, int y);
280
280
staticboolis_core(const DeviceGrid& grid, int x, int y);
281
281
282
282
/*checks if the specified coordinates matches the exact one specified in the SB architecture description*/
283
-
staticboolmatch_sb_xy(const DeviceGrid& grid, int x, int y, int sb_x, int sb_y, conste_sb_loc_spec& sb_reg_x, const e_sb_loc_spec& sb_reg_y);
283
+
staticboolmatch_sb_xy(const DeviceGrid& grid, int x, int y, constt_switchblock_inf& sb);
284
284
285
285
/* adjusts a negative destination wire index calculated from a permutation formula */
286
286
staticintadjust_formula_result(int dest_wire, int src_W, int dest_W, int connection_ind);
/******** slow switch block computation method; computes switchblocks at each coordinate ********/
322
322
/* iterate over all the switchblocks specified in the architecture */
323
-
for (int i_sb = 0; i_sb < (int)switchblocks.size(); i_sb++) {
324
-
t_switchblock_inf sb = switchblocks[i_sb];
325
-
323
+
for (auto sb: switchblocks) {
324
+
326
325
/* verify that switchblock type matches specified directionality -- currently we have to stay consistent */
327
326
if (directionality != sb.directionality) {
328
327
VPR_FATAL_ERROR(VPR_ERROR_ARCH, "alloc_and_load_switchblock_connections: Switchblock %s does not match directionality of architecture\n", sb.name.c_str());
/* returns true if the coordinates x/y do not correspond to the location specified by 'location' */
369
-
staticboolsb_not_here(const DeviceGrid& grid, int x, int y, e_sb_location location, int sb_x, int sb_y, conste_sb_loc_spec& sb_reg_x, const e_sb_loc_spec& sb_reg_y) {
368
+
staticboolsb_not_here(const DeviceGrid& grid, int x, int y, constt_switchblock_inf& sb) {
370
369
bool sb_not_here = true;
371
370
372
-
switch (location) {
373
-
case E_EVERYWHERE:
371
+
switch (sb.location) {
372
+
casee_sb_location::E_EVERYWHERE:
374
373
sb_not_here = false;
375
374
break;
376
-
case E_PERIMETER:
375
+
casee_sb_location::E_PERIMETER:
377
376
if (is_perimeter(grid, x, y)) {
378
377
sb_not_here = false;
379
378
}
380
379
break;
381
-
case E_CORNER:
380
+
casee_sb_location::E_CORNER:
382
381
if (is_corner(grid, x, y)) {
383
382
sb_not_here = false;
384
383
}
385
384
break;
386
-
case E_CORE:
385
+
casee_sb_location::E_CORE:
387
386
if (is_core(grid, x, y)) {
388
387
sb_not_here = false;
389
388
}
390
389
break;
391
-
case E_FRINGE:
390
+
casee_sb_location::E_FRINGE:
392
391
if (is_perimeter(grid, x, y) && !is_corner(grid, x, y)) {
393
392
sb_not_here = false;
394
393
}
395
394
break;
396
-
case E_XY_SPECIFIED:
397
-
if(match_sb_xy(grid, x, y, sb_x, sb_y, sb_reg_x, sb_reg_y)){
0 commit comments