Skip to content

Commit 34641cb

Browse files
committed
Added details to error messages and unit test comments
1 parent 09f7411 commit 34641cb

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

vpr/src/place/place_constraints.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,13 @@ PartitionRegion update_macro_member_pr(PartitionRegion& head_pr, const t_pl_offs
140140
}
141141

142142
void print_macro_constraint_error(const t_pl_macro& pl_macro) {
143+
auto& cluster_ctx = g_vpr_ctx.clustering();
143144
VTR_LOG(
144145
"Feasible floorplanning constraints could not be calculated for the placement macro. \n"
145146
"The placement macro contains the following blocks: \n");
146147
for (unsigned int i = 0; i < pl_macro.members.size(); i++) {
147-
VTR_LOG("Block #%zu ", size_t(pl_macro.members[i].blk_index));
148+
std::string blk_name = cluster_ctx.clb_nlist.block_name((pl_macro.members[i].blk_index));
149+
VTR_LOG("Block %s (#%zu) ", blk_name, size_t(pl_macro.members[i].blk_index));
148150
}
149151
VTR_LOG("\n");
150152
VPR_ERROR(VPR_ERROR_PLACE, " \n Check that the above-mentioned placement macro blocks have compatible floorplan constraints.\n");

vpr/test/test_vpr_constraints.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,9 @@ TEST_CASE("RegionLocked", "[vpr]") {
427427
}
428428

429429
//Test calculation of macro constraints
430+
/* Checks that the PartitionRegion of a macro member is updated properly according
431+
* to the head member's PartitionRegion that is passed in.
432+
*/
430433
TEST_CASE("MacroConstraints", "[vpr]") {
431434
t_pl_macro pl_macro;
432435
PartitionRegion head_pr;

0 commit comments

Comments
 (0)