@@ -3215,6 +3215,15 @@ static void print_placement_move_types_stats(
3215
3215
const MoveTypeStat& move_type_stat) {
3216
3216
float moves, accepted, rejected, aborted;
3217
3217
3218
+ VTR_LOG (" \n\n Placement 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
+
3218
3227
float total_moves = 0 ;
3219
3228
for (size_t iaction = 0 ; iaction < move_type_stat.blk_type_moves .size (); iaction++) {
3220
3229
total_moves += move_type_stat.blk_type_moves [iaction];
@@ -3224,32 +3233,42 @@ static void print_placement_move_types_stats(
3224
3233
auto & cluster_ctx = g_vpr_ctx.clustering ();
3225
3234
std::string move_name;
3226
3235
int agent_type = 0 ;
3236
+ int count = 0 ;
3227
3237
int num_of_avail_moves = move_type_stat.blk_type_moves .size () / get_num_agent_types ();
3228
3238
3229
- VTR_LOG (" \n\n Percentage of different move types and block types:\n " );
3230
3239
// Print placement information for each block type
3231
3240
for (auto itype : device_ctx.logical_block_types ) {
3232
3241
// Skip non-existing block types in the netlist
3233
3242
if (itype.index == 0 || cluster_ctx.clb_nlist .blocks_per_type (itype).size () == 0 ) {
3234
3243
continue ;
3235
3244
}
3245
+
3246
+ count = 0 ;
3247
+
3236
3248
for (int imove = 0 ; imove < num_of_avail_moves; imove++) {
3237
3249
move_name = move_type_to_string (e_move_type (imove));
3238
3250
moves = move_type_stat.blk_type_moves [agent_type * num_of_avail_moves + imove];
3239
3251
if (moves != 0 ) {
3240
3252
accepted = move_type_stat.accepted_moves [agent_type * num_of_avail_moves + imove];
3241
3253
rejected = move_type_stat.rejected_moves [agent_type * num_of_avail_moves + imove];
3242
3254
aborted = moves - (accepted + rejected);
3255
+ if (count == 0 ) {
3256
+ VTR_LOG (" %-18.20s" , itype.name );
3257
+ } else {
3258
+ VTR_LOG (" " );
3259
+ }
3243
3260
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,
3246
3263
100 * accepted / moves, 100 * rejected / moves,
3247
3264
100 * aborted / moves);
3248
3265
}
3266
+ count++;
3249
3267
}
3250
3268
agent_type++;
3251
3269
VTR_LOG (" \n " );
3252
3270
}
3271
+ VTR_LOG (" \n " );
3253
3272
}
3254
3273
3255
3274
static void calculate_reward_and_process_outcome (
0 commit comments