@@ -59,7 +59,7 @@ DeviceGrid create_device_grid(std::string layout_name, const std::vector<t_grid_
59
59
}
60
60
valid_names += " '" + grid_layouts[i].name + " '" ;
61
61
}
62
- VPR_THROW (VPR_ERROR_ARCH, " Failed to find grid layout named '%s' (valid grid layouts: %s)\n " , layout_name.c_str (), valid_names.c_str ());
62
+ VPR_FATAL_ERROR (VPR_ERROR_ARCH, " Failed to find grid layout named '%s' (valid grid layouts: %s)\n " , layout_name.c_str (), valid_names.c_str ());
63
63
}
64
64
65
65
return build_device_grid (*iter, iter->width , iter->height );
@@ -120,7 +120,7 @@ DeviceGrid create_device_grid(std::string layout_name, const std::vector<t_grid_
120
120
}
121
121
valid_names += " '" + grid_layouts[i].name + " '" ;
122
122
}
123
- VPR_THROW (VPR_ERROR_ARCH, " Failed to find grid layout named '%s' (valid grid layouts: %s)\n " , layout_name.c_str (), valid_names.c_str ());
123
+ VPR_FATAL_ERROR (VPR_ERROR_ARCH, " Failed to find grid layout named '%s' (valid grid layouts: %s)\n " , layout_name.c_str (), valid_names.c_str ());
124
124
}
125
125
126
126
return build_device_grid (*iter, iter->width , iter->height );
@@ -262,9 +262,9 @@ static bool grid_satisfies_instance_counts(const DeviceGrid& grid, std::map<t_ty
262
262
static DeviceGrid build_device_grid (const t_grid_def& grid_def, size_t grid_width, size_t grid_height, bool warn_out_of_range, const std::vector<t_type_ptr> limiting_resources) {
263
263
if (grid_def.grid_type == GridDefType::FIXED) {
264
264
if (grid_def.width != int (grid_width) || grid_def.height != int (grid_height)) {
265
- VPR_THROW (VPR_ERROR_OTHER,
266
- " Requested grid size (%zu%zu) does not match fixed device size (%dx%d)" ,
267
- grid_width, grid_height, grid_def.width , grid_def.height );
265
+ VPR_FATAL_ERROR (VPR_ERROR_OTHER,
266
+ " Requested grid size (%zu%zu) does not match fixed device size (%dx%d)" ,
267
+ grid_width, grid_height, grid_def.width , grid_def.height );
268
268
}
269
269
}
270
270
@@ -294,9 +294,9 @@ static DeviceGrid build_device_grid(const t_grid_def& grid_def, size_t grid_widt
294
294
t_type_descriptor* type = find_block_type_by_name (grid_loc_def.block_type , device_ctx.block_types , device_ctx.num_block_types );
295
295
296
296
if (!type) {
297
- VPR_THROW (VPR_ERROR_ARCH,
298
- " Failed to find block type '%s' for grid location specification" ,
299
- grid_loc_def.block_type .c_str ());
297
+ VPR_FATAL_ERROR (VPR_ERROR_ARCH,
298
+ " Failed to find block type '%s' for grid location specification" ,
299
+ grid_loc_def.block_type .c_str ());
300
300
}
301
301
302
302
seen_types.insert (type);
@@ -368,49 +368,49 @@ static DeviceGrid build_device_grid(const t_grid_def& grid_def, size_t grid_widt
368
368
369
369
// The end must fall after (or equal) to the start
370
370
if (endx < startx) {
371
- VPR_THROW (VPR_ERROR_ARCH,
372
- " Grid location specification endx (%s = %d) can not come before startx (%s = %d) for block type '%s'" ,
373
- xspec.end_expr .c_str (), endx, xspec.start_expr .c_str (), startx, type->name );
371
+ VPR_FATAL_ERROR (VPR_ERROR_ARCH,
372
+ " Grid location specification endx (%s = %d) can not come before startx (%s = %d) for block type '%s'" ,
373
+ xspec.end_expr .c_str (), endx, xspec.start_expr .c_str (), startx, type->name );
374
374
}
375
375
376
376
if (endy < starty) {
377
- VPR_THROW (VPR_ERROR_ARCH,
378
- " Grid location specification endy (%s = %d) can not come before starty (%s = %d) for block type '%s'" ,
379
- yspec.end_expr .c_str (), endy, yspec.start_expr .c_str (), starty, type->name );
377
+ VPR_FATAL_ERROR (VPR_ERROR_ARCH,
378
+ " Grid location specification endy (%s = %d) can not come before starty (%s = %d) for block type '%s'" ,
379
+ yspec.end_expr .c_str (), endy, yspec.start_expr .c_str (), starty, type->name );
380
380
}
381
381
382
382
// The minimum increment is the block dimension
383
383
VTR_ASSERT (type->width > 0 );
384
384
if (incrx < size_t (type->width )) {
385
- VPR_THROW (VPR_ERROR_ARCH,
386
- " Grid location specification incrx for block type '%s' must be at least"
387
- " block width (%d) to avoid overlapping instances (was %s = %d)" ,
388
- type->name , type->width , xspec.incr_expr .c_str (), incrx);
385
+ VPR_FATAL_ERROR (VPR_ERROR_ARCH,
386
+ " Grid location specification incrx for block type '%s' must be at least"
387
+ " block width (%d) to avoid overlapping instances (was %s = %d)" ,
388
+ type->name , type->width , xspec.incr_expr .c_str (), incrx);
389
389
}
390
390
391
391
VTR_ASSERT (type->height > 0 );
392
392
if (incry < size_t (type->height )) {
393
- VPR_THROW (VPR_ERROR_ARCH,
394
- " Grid location specification incry for block type '%s' must be at least"
395
- " block height (%d) to avoid overlapping instances (was %s = %d)" ,
396
- type->name , type->height , yspec.incr_expr .c_str (), incry);
393
+ VPR_FATAL_ERROR (VPR_ERROR_ARCH,
394
+ " Grid location specification incry for block type '%s' must be at least"
395
+ " block height (%d) to avoid overlapping instances (was %s = %d)" ,
396
+ type->name , type->height , yspec.incr_expr .c_str (), incry);
397
397
}
398
398
399
399
// The minimum repeat is the region dimension
400
400
size_t region_width = endx - startx + 1 ; // +1 since start/end are both inclusive
401
401
if (repeatx < region_width) {
402
- VPR_THROW (VPR_ERROR_ARCH,
403
- " Grid location specification repeatx for block type '%s' must be at least"
404
- " the region width (%d) to avoid overlapping instances (was %s = %d)" ,
405
- type->name , region_width, xspec.repeat_expr .c_str (), repeatx);
402
+ VPR_FATAL_ERROR (VPR_ERROR_ARCH,
403
+ " Grid location specification repeatx for block type '%s' must be at least"
404
+ " the region width (%d) to avoid overlapping instances (was %s = %d)" ,
405
+ type->name , region_width, xspec.repeat_expr .c_str (), repeatx);
406
406
}
407
407
408
408
size_t region_height = endy - starty + 1 ; // +1 since start/end are both inclusive
409
409
if (repeaty < region_height) {
410
- VPR_THROW (VPR_ERROR_ARCH,
411
- " Grid location specification repeaty for block type '%s' must be at least"
412
- " the region height (%d) to avoid overlapping instances (was %s = %d)" ,
413
- type->name , region_height, xspec.repeat_expr .c_str (), repeaty);
410
+ VPR_FATAL_ERROR (VPR_ERROR_ARCH,
411
+ " Grid location specification repeaty for block type '%s' must be at least"
412
+ " the region height (%d) to avoid overlapping instances (was %s = %d)" ,
413
+ type->name , region_height, xspec.repeat_expr .c_str (), repeaty);
414
414
}
415
415
416
416
// VTR_LOG("Applying grid_loc_def for '%s' priority %d startx=%s=%zu, endx=%s=%zu, starty=%s=%zu, endx=%s=%zu,\n",
0 commit comments