Minor changes: printing values with precision 2
printing Units without [ ]
This commit is contained in:
@@ -216,8 +216,8 @@ struct Dram : sc_module
|
||||
double averagePower = (totalEnergy / sc_time_stamp().to_seconds()) / 1e9;
|
||||
|
||||
// Print the final total energy and the average power for the simulation
|
||||
cout << name() << string("\tTotal Energy: \t") + to_string(totalEnergy) + string("\t[pJ]") << endl;
|
||||
cout << name() << string("\tAverage Power: \t") + to_string(averagePower) + string("\t[mW]") << endl;
|
||||
cout << name() << string("\tTotal Energy: \t") << fixed <<std::setprecision( 2 )<< totalEnergy << string(" pJ") << endl;
|
||||
cout << name() << string("\tAverage Power: \t") << fixed <<std::setprecision( 2 )<< averagePower<< string(" mW") << endl;
|
||||
}
|
||||
|
||||
// Bandwidth:
|
||||
@@ -232,7 +232,7 @@ struct Dram : sc_module
|
||||
double maxBandwidth = ( (1000000/Configuration::getInstance().memSpec.clk.to_double()) * Configuration::getInstance().memSpec.DataRate * Configuration::getInstance().memSpec.BusWidth ) / ( 1024 );
|
||||
cout << name() << string("\tTotal Time: \t") <<(endTime-startTime).to_string() << endl;
|
||||
cout << name() << string("\tTotal IDLE: \t") <<idleTime.to_string() << endl;
|
||||
cout << name() << string("\tTotal Active: \t") << activeTime.to_string() << endl;
|
||||
cout << name() << string("\tTotal Active DataBus: \t") << activeTime.to_string() << endl;
|
||||
cout << name() << string("\tAVG BW: \t") <<std::fixed<<std::setprecision(2) << ((bandwidth/100)*maxBandwidth) << " GiB/s (" << bandwidth << " %)" << endl;
|
||||
cout << name() << string("\tAVG BW/IDLE: \t") <<std::fixed<<std::setprecision(2) << ((bandwidth_IDLE/100)*maxBandwidth) <<" GiB/s ("<< (bandwidth_IDLE) << " %)" << endl;
|
||||
cout << name() << string("\tMAX BW: \t") <<std::fixed<<std::setprecision(2) <<maxBandwidth << " GiB/s" << endl;
|
||||
|
||||
Reference in New Issue
Block a user