Skip to content

Commit 692b30e

Browse files
committed
updated pack, place, route, analysis reporting
1 parent 29cc58d commit 692b30e

File tree

2 files changed

+29
-5
lines changed

2 files changed

+29
-5
lines changed

vpr/src/base/ShowSetup.cpp

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ void ShowSetup(const t_vpr_setup& vpr_setup) {
3737
}
3838
VTR_LOG("\n");
3939

40-
VTR_LOG("Packer: %s\n", (vpr_setup.PackerOpts.doPacking ? "ENABLED" : "DISABLED"));
41-
VTR_LOG("Placer: %s\n", (vpr_setup.PlacerOpts.doPlacement ? "ENABLED" : "DISABLED"));
42-
VTR_LOG("Analytical Placer: %s\n", (vpr_setup.APOpts.doAP ? "ENABLED" : "DISABLED"));
43-
VTR_LOG("Router: %s\n", (vpr_setup.RouterOpts.doRouting ? "ENABLED" : "DISABLED"));
44-
VTR_LOG("Analysis: %s\n", (vpr_setup.AnalysisOpts.doAnalysis ? "ENABLED" : "DISABLED"));
40+
VTR_LOG("Packer: %s\n", stage_action_to_string(vpr_setup.PackerOpts.doPacking).c_str());
41+
VTR_LOG("Placer: %s\n", stage_action_to_string(vpr_setup.PlacerOpts.doPlacement).c_str());
42+
VTR_LOG("Analytical Placer: %s\n", stage_action_to_string(vpr_setup.APOpts.doAP).c_str());
43+
VTR_LOG("Router: %s\n", stage_action_to_string(vpr_setup.RouterOpts.doRouting).c_str());
44+
VTR_LOG("Analysis: %s\n", stage_action_to_string(vpr_setup.AnalysisOpts.doAnalysis).c_str());
4545
VTR_LOG("\n");
4646

4747
VTR_LOG("VPR was run with the following options:\n\n");
@@ -68,6 +68,21 @@ void ShowSetup(const t_vpr_setup& vpr_setup) {
6868
}
6969
}
7070

71+
std::string stage_action_to_string(e_stage_action action) {
72+
switch (action) {
73+
case STAGE_SKIP:
74+
return "DISABLED";
75+
case STAGE_LOAD:
76+
return "LOAD";
77+
case STAGE_DO:
78+
return "ENABLED";
79+
case STAGE_AUTO:
80+
return "AUTO";
81+
default:
82+
VPR_FATAL_ERROR(VPR_ERROR_UNKNOWN, "Invalid e_stage_action.\n");
83+
}
84+
}
85+
7186
void ClusteredNetlistStats::writeHuman(std::ostream& output) const {
7287
output << "Cluster level netlist and block usage statistics\n";
7388
output << "Netlist num_nets: " << num_nets << "\n";

vpr/src/base/ShowSetup.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#include <ostream>
44
#include <string>
55
#include <vector>
6+
#include "vpr_types.h"
67

78
struct t_logical_block_type;
89
struct t_vpr_setup;
@@ -33,4 +34,12 @@ struct ClusteredNetlistStats {
3334
};
3435

3536
void ShowSetup(const t_vpr_setup& vpr_setup);
37+
38+
/**
39+
* @brief Converts the enum e_stage_action to a string.
40+
* @param action The stage action to convert.
41+
* @return A string representation of the stage action.
42+
*/
43+
std::string stage_action_to_string(e_stage_action action);
44+
3645
void writeClusteredNetlistStats(const std::string& block_usage_filename);

0 commit comments

Comments
 (0)