From c74ca63dba3d7b17e9b1cce75902a1646575047c Mon Sep 17 00:00:00 2001 From: soheilshahrouz Date: Sun, 30 Jun 2024 19:57:36 -0400 Subject: [PATCH] check the legality of region when parsing it --- vpr/src/base/vpr_constraints_serializer.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/vpr/src/base/vpr_constraints_serializer.h b/vpr/src/base/vpr_constraints_serializer.h index 02260a3bc87..09b88ea6b68 100644 --- a/vpr/src/base/vpr_constraints_serializer.h +++ b/vpr/src/base/vpr_constraints_serializer.h @@ -274,6 +274,24 @@ class VprConstraintsSerializer final : public uxsd::VprConstraintsBaseoperator()("Illegal layer numbers are specified in the constraint file."); + } + } + + if (loaded_region.empty()) { + if (report_error_ == nullptr) { + VPR_ERROR(VPR_ERROR_PLACE, "\nThe specified region is empty.\n"); + } else { + report_error_->operator()("The specified region is empty."); + } + } + loaded_part_region.add_to_part_region(loaded_region); Region clear_region;