Skip to content

Commit 114012a

Browse files
committed
add an assertion to check the maximum number of layers
1 parent c5178e4 commit 114012a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

vpr/src/base/vpr_api.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,8 @@ void vpr_create_device_grid(const t_vpr_setup& vpr_setup, const t_arch& Arch) {
452452
float target_device_utilization = vpr_setup.PackerOpts.target_device_utilization;
453453
device_ctx.grid = create_device_grid(vpr_setup.device_layout, Arch.grid_layouts, num_type_instances, target_device_utilization);
454454

455+
VTR_ASSERT_MSG(device_ctx.grid.get_num_layers() < MAX_NUM_LAYERS, "Number of layers should be less than MAX_NUM_LAYERS. If you need more layers, please increase the value of MAX_NUM_LAYERS in vpr_types.h");
456+
455457
/*
456458
*Report on the device
457459
*/

0 commit comments

Comments
 (0)