Skip to content

Commit 6e0fa63

Browse files
authored
Merge pull request #2333 from verilog-to-routing/vpr_noc_output
Vpr noc output
2 parents 03f3dec + f46142f commit 6e0fa63

File tree

1 file changed

+22
-3
lines changed

1 file changed

+22
-3
lines changed

vpr/src/place/place.cpp

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3215,6 +3215,15 @@ static void print_placement_move_types_stats(
32153215
const MoveTypeStat& move_type_stat) {
32163216
float moves, accepted, rejected, aborted;
32173217

3218+
VTR_LOG("\n\nPlacement perturbation distribution by block and move type: \n");
3219+
3220+
VTR_LOG(
3221+
"------------------ ----------------- ---------------- ---------------- --------------- ------------ \n");
3222+
VTR_LOG(
3223+
" Block Type Move Type (%%) of Total Accepted(%%) Rejected(%%) Aborted(%%)\n");
3224+
VTR_LOG(
3225+
"------------------ ----------------- ---------------- ---------------- --------------- ------------ \n");
3226+
32183227
float total_moves = 0;
32193228
for (size_t iaction = 0; iaction < move_type_stat.blk_type_moves.size(); iaction++) {
32203229
total_moves += move_type_stat.blk_type_moves[iaction];
@@ -3224,32 +3233,42 @@ static void print_placement_move_types_stats(
32243233
auto& cluster_ctx = g_vpr_ctx.clustering();
32253234
std::string move_name;
32263235
int agent_type = 0;
3236+
int count = 0;
32273237
int num_of_avail_moves = move_type_stat.blk_type_moves.size() / get_num_agent_types();
32283238

3229-
VTR_LOG("\n\nPercentage of different move types and block types:\n");
32303239
//Print placement information for each block type
32313240
for (auto itype : device_ctx.logical_block_types) {
32323241
//Skip non-existing block types in the netlist
32333242
if (itype.index == 0 || cluster_ctx.clb_nlist.blocks_per_type(itype).size() == 0) {
32343243
continue;
32353244
}
3245+
3246+
count = 0;
3247+
32363248
for (int imove = 0; imove < num_of_avail_moves; imove++) {
32373249
move_name = move_type_to_string(e_move_type(imove));
32383250
moves = move_type_stat.blk_type_moves[agent_type * num_of_avail_moves + imove];
32393251
if (moves != 0) {
32403252
accepted = move_type_stat.accepted_moves[agent_type * num_of_avail_moves + imove];
32413253
rejected = move_type_stat.rejected_moves[agent_type * num_of_avail_moves + imove];
32423254
aborted = moves - (accepted + rejected);
3255+
if (count == 0) {
3256+
VTR_LOG("%-18.20s", itype.name);
3257+
} else {
3258+
VTR_LOG(" ");
3259+
}
32433260
VTR_LOG(
3244-
"\t%.20s move with type %.20s: %2.6f %% (acc=%2.2f %%, rej=%2.2f %%, aborted=%2.2f %%)\n",
3245-
move_name.c_str(), itype.name, 100 * moves / total_moves,
3261+
" %-22.20s %-16.2f %-15.2f %-14.2f %-13.2f\n",
3262+
move_name.c_str(), 100 * moves / total_moves,
32463263
100 * accepted / moves, 100 * rejected / moves,
32473264
100 * aborted / moves);
32483265
}
3266+
count++;
32493267
}
32503268
agent_type++;
32513269
VTR_LOG("\n");
32523270
}
3271+
VTR_LOG("\n");
32533272
}
32543273

32553274
static void calculate_reward_and_process_outcome(

0 commit comments

Comments
 (0)