Hi Javed,

"setDownstream" expects a list of objects, but it seems you are passing a 
list-of-lists. I think in you implementation of CHI_L3Cache you can just change 
getAllControllers and getNetworkSideControllers to return self._cntrls directly 
because it's already a list.

Best,
Tiago
________________________________
From: Javed Osmany <javed.osm...@huawei.com>
Sent: Friday, May 27, 2022 2:53 AM
To: gem5 users mailing list <gem5-users@gem5.org>
Cc: Tiago Muck <tiago.m...@arm.com>; Javed Osmany <javed.osm...@huawei.com>
Subject: CHI compilation error when trying to add L3$ between L2$ and LLC


Hello



So I have simplified the modelling in CHI to

1)      One CPU (ie one CHI_RNF)

2)      The CPU has private L1$ and L2$

3)      Trying to add one L3$ (resides between L2$ and LLC in 
HNF)(hypothetical, just to get the wiring to work)



Using gem5 version 21.2.1.0



./build/ARM/gem5.opt 
--outdir=m5out_parsec_blackscoles_001_1rnf_1snf_1hnf_0_clust_all_priv_l2_sincl_mincl_mincl
 configs/example/se_kirin_custom.py --ruby --topology=Crossbar --cpu-type=m1 
--num-cpus=1 --num-dirs=1 --num-llc-caches=1 --num-cpu-bigclust=0 
--num-cpu-middleclust=0 --num-cpu-littleclust=1 --num-clusters=0 
--cpu-type-bigclust=m1 --cpu-type-middleclust=m1 --cpu-type-littleclust=a76 
--bigclust-l2cache=private --middleclust-l2cache=private 
--littleclust-l2cache=private --l1i-size-big=64kB --l1d-size-big=64kB 
--l1i-assoc-big=4 --l1d-assoc-big=4 --l1i-size-middle=64kB 
--l1d-size-middle=64kB --l1i-assoc-middle=4 --l1d-assoc-middle=4 
--l1i-size-little=64kB --l1d-size-little=64kB --l1i-assoc-little=4 
--l1d-assoc-little=4 --l2-size-big=2048kB --l2-assoc-big=8 
--l2-size-middle=2048kB --l2-assoc-middle=8 --l2-size-little=1024kB 
--l2-assoc-little=8 --num-bigclust-subclust=1 --num-middleclust-subclust=1 
--num-littleclust-subclust=1 --num-cpu-bigclust-subclust2=1 
--num-cpu-middleclust-subclust2=1 --num-cpu-littleclust-subclust2=1 
--bp-type-littleclust=LTAGE --bp-type-middleclust=LTAGE 
--bp-type-bigclust=LTAGE --l2-big-data-latency=12 --l2-middle-data-latency=12 
--l2-little-data-latency=12 --sc-size=1024kB --sc-assoc=32 --big-cpu-clock=3GHz 
--middle-cpu-clock=2.6GHz --little-cpu-clock=2GHz --cacheline_size=64 
--verbose=true --cmd=tests/parsec/blackscoles/parsec.blackscholes.hooks -o '4 
tests/parsec/blackscoles/in_4K.txt tests/parsec/blackscoles/prices.txt'



The error being:

Error: could not create sytem for ruby protocol CHI

TypeError: __init__() takes 1 positional argument but 2 were given

Error setting param CHI_L2Controller.downstream_destinations to 
[[<ruby.CHI_config.CHI_L3Controller object at 0x7f5c109eeb70>]]





At:

  build/ARM/python/m5/params.py(209): convert

  build/ARM/python/m5/params.py(332): <listcomp>

  build/ARM/python/m5/params.py(332): convert

  build/ARM/python/m5/SimObject.py(1459): __setattr__

 /home/j00533938/github/gem5-21.2.1.0/gem5/configs/ruby/CHI_config.py(566): 
setDownstream

  /home/j00533938/github/gem5-21.2.1.0/gem5/configs/ruby/CHI.py(557): 
create_system

  <string>(1): <module>

  /home/j00533938/github/gem5-21.2.1.0/gem5/configs/ruby/Ruby.py(207): 
create_system

  configs/example/se_kirin_custom.py(460): <module>

  build/ARM/python/m5/main.py(442): main





Line 557 in CHI.py:



556: for rnf in ruby_system.rnf:

557:            rnf.setDownstream(l3_dests) <== l3_dests is set in line 524 in 
CHI.py and its value being [[<ruby.CHI_config.CHI_L3Controller object at 
0x7f5c109eeb70>]]



ruby_system.rnf == CHI_RNF in CHI_config.py

so line 557 is saying CHI_RNF.setDownstream(l3_dests) (call method 
setDownstream in class CHI_RNF in file CHI_config.py)



Line 566 in CHI_config.py:



563: def setDownstream(self, cntrls):

564:        for c in self._ll_cntrls:

565:            print ("CHI_RNF, _ll_cntrls being: %s\n" % (c)) <== This says 
that CHI_RNF._ll_cntrls == system.cpu.l2

566:            c.downstream_destinations = cntrls



So line 566 is saying: system.cpu.l2 = l3_dests



So I don’t understand where I am passing two positional arguments, when the 
code is expecting one argument.



In the attachment are the relevant files.



Any insight into resolving the compilation error greatly appreciated>



Tks

JO



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.
_______________________________________________
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org

Reply via email to