Hi Andrea,
Thank you for your reply!
I added the Object to SimObject but the system run with fatal:
gem5-dev/configs/common/CacheConfig.py:48: SyntaxWarning: import * only allowed
at module level
def config_cache(options, system):
Global frequency set at 1000000000000 ticks per second
info: kernel located at: /opt/M5_system_ALPHA_small/binaries/vmlinux
Listening for system connection on port 3456
fatal: system.ruby.l2_cntrl5.myclass without default or user set value
I wanna add an machine to L2 level. The src modification with protocol change
has been
done without compiling error.
For python script I added such file
src/mem/ruby/system/myclass.py:
from m5.params import *
from m5.SimObject import SimObject
class myclass(SimObject):
type = 'myclass'
cxx_class = 'myclass'
cxx_header = "mem/ruby/system/myclass.hh"
param1 = Param.Int(20, "param1 default value 20");
Also with modified of configs/ruby/MESI_Two_Level.py since this is the protocol
I am using now:
I add:
class myclass(myclass):
param1 = 20
in the L2 part:
for i in xrange(options.num_l2caches):
...
#
# First create the Ruby objects associated with this cpu
#
l2_cache = L2Cache(size = options.l2_size,
assoc = options.l2_assoc,
start_index_bit = l2_index_start)
l2_cntrl = L2Cache_Controller(version = i,
L2cache = l2_cache,
transitions_per_cycle=options.ports,
ruby_system = ruby_system)
myclass_cntrl = myclass() #try to initiate param1
exec("ruby_system.l2_cntrl%d = l2_cntrl" % i)
...(rest of the code)
I get confused and I don't know how to pass value to param1 from python script
to Ruby now.
Wei
----- Original Message -----
From: "Andreas Hansson" <[email protected]>
To: "Wei Shu" <[email protected]>, "gem5 users mailing list"
<[email protected]>
Sent: Thursday, December 18, 2014 1:01:03 PM
Subject: Re: [gem5-users] Printing All stats even if they are 0
Hi Wei,
Is your object a subclass of SimObject? If not, regStats will never be
called (or you have to get the parent/owning object to call it explicitly).
Andreas
On 18/12/2014 18:58, "Wei Shu via gem5-users" <[email protected]> wrote:
>Hi,
>
>First, hope this link will help you:
>
>http://gem5.org/Statistics
>
>Second, I also have some problem related to statistic printing.
>
>Here's my implementation:
>I wanna add a parameter in stats.txt file. This parameter is in a class
>that called by Ruby protocol, the system can successfully run some
>benchmarks but
>the stats.txt does not show the parameter.
>
>I register the scalar like this:
>
>in MyClass.hh
>
> Stats::Scalar counter_A;
> void regStats();
>
>in MyClass.cc
>
>MyClass::regStats() {
>
>counter_A
> .name("counter_A")
> .desc("A counter for testing")
> ;
>}
>
>The code will cause this counter value changing which in the same class
>is:
>
>if (counter_A_new > counter_A.value()){
> counter_A = counter_A_new;
>}
>
>Please let me know if I missed something.
>
>Thanks,
>
>Wei
>----- Original Message -----
>From: "Christian List via gem5-users" <[email protected]>
>To: [email protected]
>Sent: Thursday, December 18, 2014 6:56:26 AM
>Subject: [gem5-users] Printing All stats even if they are 0
>
>
>
>Hello again :)
>I am using Gem5 with the parsec Benchmarks. When I am using a small
>intervall for dumping, some stats are getting zero and will not be
>printet in the stat file.
>
>
>After some googling I found out, that there is a function named "prereq"
>which prevent stats from being printed out if some prerequired ones are
>0.
>But I dont find the correct line for the l2 stats. So I am not able to
>enable "full printing" of the system.l2.ReadReq_misses::total key for
>example.
>
>
>Is there a way to print generally all values, even if they are 0 ?
>
>
>Thanks in anticipation,
>Chris
>_______________________________________________
>gem5-users mailing list
>[email protected]
>http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>_______________________________________________
>gem5-users mailing list
>[email protected]
>http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>
-- IMPORTANT NOTICE: The contents of this email and any attachments are
confidential and may also be privileged. If you are not the intended recipient,
please notify the sender immediately and do not disclose the contents to any
other person, use it for any purpose, or store or copy the information in any
medium. Thank you.
ARM Limited, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered
in England & Wales, Company No: 2557590
ARM Holdings plc, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ,
Registered in England & Wales, Company No: 2548782
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users