Skip to content

Stage reporting update #3188

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 8, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 20 additions & 5 deletions vpr/src/base/ShowSetup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ void ShowSetup(const t_vpr_setup& vpr_setup) {
}
VTR_LOG("\n");

VTR_LOG("Packer: %s\n", (vpr_setup.PackerOpts.doPacking ? "ENABLED" : "DISABLED"));
VTR_LOG("Placer: %s\n", (vpr_setup.PlacerOpts.doPlacement ? "ENABLED" : "DISABLED"));
VTR_LOG("Analytical Placer: %s\n", (vpr_setup.APOpts.doAP ? "ENABLED" : "DISABLED"));
VTR_LOG("Router: %s\n", (vpr_setup.RouterOpts.doRouting ? "ENABLED" : "DISABLED"));
VTR_LOG("Analysis: %s\n", (vpr_setup.AnalysisOpts.doAnalysis ? "ENABLED" : "DISABLED"));
VTR_LOG("Packer: %s\n", stage_action_to_string(vpr_setup.PackerOpts.doPacking).c_str());
VTR_LOG("Placer: %s\n", stage_action_to_string(vpr_setup.PlacerOpts.doPlacement).c_str());
VTR_LOG("Analytical Placer: %s\n", stage_action_to_string(vpr_setup.APOpts.doAP).c_str());
VTR_LOG("Router: %s\n", stage_action_to_string(vpr_setup.RouterOpts.doRouting).c_str());
VTR_LOG("Analysis: %s\n", stage_action_to_string(vpr_setup.AnalysisOpts.doAnalysis).c_str());
VTR_LOG("\n");

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

std::string stage_action_to_string(e_stage_action action) {
switch (action) {
case STAGE_SKIP:
return "DISABLED";
case STAGE_LOAD:
return "LOAD";
case STAGE_DO:
return "ENABLED";
case STAGE_AUTO:
return "AUTO";
default:
VPR_FATAL_ERROR(VPR_ERROR_UNKNOWN, "Invalid e_stage_action.\n");
}
}

void ClusteredNetlistStats::writeHuman(std::ostream& output) const {
output << "Cluster level netlist and block usage statistics\n";
output << "Netlist num_nets: " << num_nets << "\n";
Expand Down
9 changes: 9 additions & 0 deletions vpr/src/base/ShowSetup.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <ostream>
#include <string>
#include <vector>
#include "vpr_types.h"

struct t_logical_block_type;
struct t_vpr_setup;
Expand Down Expand Up @@ -33,4 +34,12 @@ struct ClusteredNetlistStats {
};

void ShowSetup(const t_vpr_setup& vpr_setup);

/**
* @brief Converts the enum e_stage_action to a string.
* @param action The stage action to convert.
* @return A string representation of the stage action.
*/
std::string stage_action_to_string(e_stage_action action);

void writeClusteredNetlistStats(const std::string& block_usage_filename);