Hi Jun,
There are some subtlties when using non-statistics variables in a
formula. Please read http://www.m5sim.org/wiki/index.php/
Using_the_Statistics_Package
regStats is probably getting called (you could put a DPRINTF() there
to make sure), but either way your formula is incorrect.
Ali
On Oct 3, 2007, at 5:20 AM, Jun Pang wrote:
Hi all,
I want to print some statistics of physical memory in the
m5stats.txt file. Following the example in dram.cc and dram.hh, I
first add " virtual void regStats();" function as a public member
and " Stats::Formula bandwidth;" as a protected member of
MemoryPort class where I want to get the statistics. The body of
regStats() in physical.cc file is as follows:
void PhysicalMemory::MemoryPort::regStats(){
using namespace Stats;
bandwidth
.name(name()+".bandwidth")
.desc("bandwidth of memory")
;
bandwidth = data_bus_cycle*5000/curTick; //data_bus_cycle
is a variable defined by myself
}
However, there is no bandwidth information in the m5stats.txt. I
think maybe the function regStats is never called but I do not know
how to call it, or is there anything wrong with what I have done?
Could anybody help me?
Thank you very much!
Jun Pang
_______________________________________________
m5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/m5-users
_______________________________________________
m5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/m5-users