Hi Tony,

Thanks again for your help. After I assign the cache parameter to 
self.cacheMemory, it ends up with an infinite loop:
RuntimeError: system.caches.controllers0.cacheMemory: Cycle found in 
configuration hierarchy
This is how I set the cache parameter:
self.cacheMemory.replacement_policy.cache = self.cacheMemory
Do you know why the cache parameter is needed because I can’t find where this 
parameter is  used in the source code?

Thanks,
Mingyuan

On Aug 22, 2019, at 6:08 PM, MINGYUAN XIANG 
<gem5-users-boun...@gem5.org<mailto:gem5-users-boun...@gem5.org>> wrote:

Hi Tony,

Thanks for your help. When I set the cache parameter to cacheMemory, which uses 
WeightedLRUReplacementPolicy, it ends up with an infinite loop:
RuntimeError: system.caches.controllers0.cacheMemory: Cycle found in 
configuration hierarchy
And this is how I set the parameter:
self.cacheMemory.replacement_policy.cache = self.cacheMemory

Besides, I find that this parameter is not used in any C++ files, and there are 
no comments to explain this parameter. Would you mind be more specific about 
how to set this parameter correctly?

Thanks,
Mingyuan

On Aug 22, 2019, at 2:25 PM, Gutierrez, Anthony 
<anthony.gutier...@amd.com<mailto:anthony.gutier...@amd.com>> wrote:

The cache parameter is not in the ReplacementPolicy class. It is in the 
WeightedLRUReplacementPolicy class, which you are trying to use.

See: src/mem/ruby/system/WeightedLRUReplacementPolicy.py

Tony

From: gem5-users 
<gem5-users-boun...@gem5.org<mailto:gem5-users-boun...@gem5.org>> On Behalf Of 
MINGYUAN XIANG
Sent: Thursday, August 22, 2019 10:57 AM
To: gem5 users mailing list <gem5-users@gem5.org<mailto:gem5-users@gem5.org>>
Subject: Re: [gem5-users] I don't know how to set WeightedLRUReplacementPolicy 
in Ruby system

[CAUTION: External Email]
Hi Tony,

Sorry that I don’t quite understand what you are saying. When I try to use 
other replacement policies, like LRU for example, I just add the following line 
to the script:

replacement_policy = LRUReplacementPolicy()

And it works. Besides, I cannot find object cache in ReplacementPolicy class, 
nor in RubyCache class.

Thanks,
Mingyuan


On Aug 21, 2019, at 12:08 PM, Gutierrez, Anthony 
<anthony.gutier...@amd.com<mailto:anthony.gutier...@amd.com>> wrote:

Hi Mingyuan,

The error indicates that the replacement policy object’s child, “cache”, is not 
set.

You’ll need to set replacement_policy.cache in your configuration script.

Tony

From: gem5-users 
<gem5-users-boun...@gem5.org<mailto:gem5-users-boun...@gem5.org>> On Behalf Of 
MINGYUAN XIANG
Sent: Wednesday, August 21, 2019 9:38 AM
To: gem5-users@gem5.org<mailto:gem5-users@gem5.org>
Subject: [gem5-users] I don't know how to set WeightedLRUReplacementPolicy in 
Ruby system

[CAUTION: External Email]
Hello All

I’m new to gem5, and I downloaded a fresh copy of gem5. I try to use a 
different replacement policy in the Ruby system instead of the default one. I 
notice that there is a replacement policy in src/mem/ruby/system/ called 
WeightedLRUReplacementPolicy. So, I modify the simple ruby script that I 
download from gem5 tutorial in part3. I add the following line when I 
instantiate cacheMemory:

replacement_policy = WeightedLRUReplacementPolicy()

However, it simply couldn’t work. When I run the configuration script, this 
error came up:

fatal: system.caches.controllers0.cacheMemory.replacement_policy.cache without 
default or user set value



In the config.ini file, it says I’m using WeightedLRUReplacementPolicy. Do you 
know why this happened? By the way, I’m using MSI protocol. The build command 
is:

scons build/X86_MSI/gem5.opt --default=X86 PROTOCOL=MSI HTML_SLICC=True

Best
Mingyuan
_______________________________________________
gem5-users mailing list
gem5-users@gem5.org<mailto:gem5-users@gem5.org>
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

_______________________________________________
gem5-users mailing list
gem5-users@gem5.org<mailto:gem5-users@gem5.org>
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

_______________________________________________
gem5-users mailing list
gem5-users@gem5.org<mailto:gem5-users@gem5.org>
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

_______________________________________________
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to