Add creating __inputs.vpp file with --debug (#4177).

This commit is contained in:
Wilson Snyder
2023-05-07 17:58:14 -04:00
parent 444020f7c7
commit d269fbb446
11 changed files with 134 additions and 38 deletions
+11 -12
View File
@@ -40,18 +40,8 @@ class StatsReport final {
std::ofstream& os; ///< Output stream
static StatColl s_allStats; ///< All statistics
void header() {
os << "Verilator Statistics Report\n\n";
os << "Information:\n";
os << " " << V3Options::version() << '\n';
os << " Arguments: " << v3Global.opt.allArgsString() << '\n';
os << " Build jobs: " << v3Global.opt.buildJobs() << '\n';
os << " Verilate jobs: " << v3Global.opt.verilateJobs() << '\n';
os << '\n';
}
void sumit() {
os << '\n';
// If sumit is set on a statistic, combine with others of same name
std::multimap<std::string, V3Statistic*> byName;
// * is always first
@@ -179,7 +169,8 @@ public:
// CONSTRUCTORS
explicit StatsReport(std::ofstream* aofp)
: os(*aofp) { // Need () or GCC 4.8 false warning
header();
os << "Verilator Statistics Report\n\n";
V3Stats::infoHeader(os, "");
sumit();
stars();
stages();
@@ -222,6 +213,14 @@ void V3Stats::statsStage(const string& name) {
V3Stats::addStatPerf("Stage, Memory (MB), " + digitName, memory);
}
void V3Stats::infoHeader(std::ofstream& os, const string& prefix) {
os << prefix << "Information:\n";
os << prefix << " " << V3Options::version() << '\n';
os << prefix << " Arguments: " << v3Global.opt.allArgsString() << '\n';
os << prefix << " Build jobs: " << v3Global.opt.buildJobs() << '\n';
os << prefix << " Verilate jobs: " << v3Global.opt.verilateJobs() << '\n';
}
void V3Stats::statsReport() {
UINFO(2, __FUNCTION__ << ": " << endl);