Hello Gabriel
>> addSharedL2Cache is only called on lines 465 and 470 of CHI.py and these
>> lines are touched only if options.littleclust_l2cache == 'shared'.
>> You don't set it in the command line and the default value is 'private',
>> which explains why it never gets called.
The command line I use is the following and littleclust-l2cache=shared (please
see highlighted below). The parser then translates this to
options.littleclust_l2_cache=shared.
./build/ARM/gem5.opt configs/example/se_kirin_custom.py --ruby --topology=Pt2Pt
--cpu-type=DerivO3CPU --num-cpus=4 --num-dirs=1 --num-l3caches=1
--num-cpu-bigclust=0 --num-cpu-middleclust=0 --num-cpu-littleclust=4
--num-clusters=1 --cpu-type-bigclust=derivo3 --cpu-type-middleclust=hpi
--cpu-type-littleclust=timesimple --bigclust-l2cache=shared
--middleclust-l2cache=shared --littleclust-l2cache=shared
--num-bigclust-subclust=1 --num-middleclust-subclust=1
--num-littleclust-subclust=1 --cmd=tests/test-progs/hello/bin/arm/linux/hello
I printed out the options as parsed when the command is run and it shows that
littleclust_l2cache= shared:
Command Line Options extracted being:
{'num_cpus': 4, 'sys_voltage': '1.0V', .....
'spec_input': 'ref', 'arm_iset': 'arm', 'stats_root': [], 'cmd':
'tests/test-progs/hello/bin/arm/linux/hello', 'options': '',
......
'middleclust_l2cache': 'shared', 'littleclust_l2cache': 'shared',
'big_cpu_clock': '4GHz', 'middle_cpu_clock': '2GHz', 'little_cpu_clock':
'1GHz', 'l1i_size_big': '32kB', 'l1i_assoc_big': 2, 'l1d_size_big': '32kB',
'l1d_assoc_big': 2, 'l2_size_big': '32kB', 'l2_assoc_big': 2,
'l1i_size_little': '32kB', 'l1i_assoc_little': 2, 'l1d_size_little': '32kB',
'l1d_assoc_little': 2, 'l2_size_little': '32kB', 'l2_assoc_little': 2,
'l1i_size_middle': '32kB', 'l1i_assoc_middle': 2, 'l1d_size_middle': '32kB',
'l1d_assoc_middle': 2, 'l2_size_middle': '32kB', 'l2_assoc_middle': 2,
'num_bigclust_subclust': '1', 'num_middleclust_subclust': '1',
'num_littleclust_subclust': '1', 'num_cpu_littleclust_subclust2': 1,
'num_cpu_middleclust_subclust2': 1, 'num_cpu_bigclust_subclust2': 1,
'topology': 'Pt2Pt', 'mesh_rows': 0, 'network': 'simple', 'router_latency': 1,
'link_latency': 1, 'link_width_bits': 128, 'vcs_per_vnet': 4,
'routing_algorithm': 0, 'network_fault_model': False,
'garnet_deadlock_threshold': 50000}
I am currently working on getting the littleCluster working for shared L2 cache
and once this is working, then update and get the other two clusters working.
I have also added print statements inside
CHI_config.CHI_RNF_CLUST_SHARED_L2.addSharedL2CacheL():
CHI_RNF_CLUST_SHARED_L2.addSharedL2, self._cntrls is:
[<ruby.CHI_config.CHI_L1Controller object at 0x7f6171c76da0>,
<ruby.CHI_config.CHI_L1Controller object at 0x7f6171c838d0>,
<ruby.CHI_config.CHI_L1Controller object at 0x7f6171c92d30>,
<ruby.CHI_config.CHI_L1Controller object at 0x7f6171c9b860>,
<ruby.CHI_config.CHI_L1Controller object at 0x7f6171c2bc50>,
<ruby.CHI_config.CHI_L1Controller object at 0x7f6171c35780>,
<ruby.CHI_config.CHI_L1Controller object at 0x7f6171c45b70>,
<ruby.CHI_config.CHI_L1Controller object at 0x7f6171c4e6a0>,
<ruby.CHI_config.CHI_L2Controller object at 0x7f6171c5f518>]
So this shows the 4 x L1I controller and 4 x L1D controller and the single L2
Controller. So far so good.
CHI_RNF_CLUST_SHARED_L2.addSharedL2, self.connectController is: <bound method
CHI_Node.connectController of <ruby.CHI_config.CHI_RNF_CLUST_SHARED_L2 object
at 0x7f6171c76588>>
So one L2 controller to connect to the CHI network.
CHI_RNF_CLUST_SHARED_L2.addSharedL2, self._ll_cntrls is:
[<ruby.CHI_config.CHI_L2Controller object at 0x7f6171c5f518>]
So last level controller for this cluster is the single L2 controller. So far
so good.
However, when I print out cntrl from lines 621-623 of CHI.py:
# Setup data message size for all controllers
for cntrl in all_cntrls:
print ("CHI.py -- Cntrl is %s\n" % (cntrl))
cntrl.data_channel_size = params.data_width
I get the following output:
CHI.py -- Cntrl is <orphan System>.cpu0.l1i
CHI.py -- Cntrl is <orphan System>.cpu0.l1d
CHI.py -- Cntrl is <orphan System>.cpu1.l1i
CHI.py -- Cntrl is <orphan System>.cpu1.l1d
CHI.py -- Cntrl is <orphan System>.cpu2.l1i
CHI.py -- Cntrl is <orphan System>.cpu2.l1d
CHI.py -- Cntrl is <orphan System>.cpu3.l1i
CHI.py -- Cntrl is <orphan System>.cpu3.l1d
CHI.py -- Cntrl is <orphan System>.cpu0.l1i.downstream_destinations <== This
looks wrong.
CHI.py -- Cntrl is <orphan System>.ruby.hnf.cntrl
CHI.py -- Cntrl is <orphan System>.ruby.snf.cntrl
And I don't see any control for the L2 cache and I don't see the implementation
for L2 cache in the config.ini
Any further help, much appreciated.
Best regards
JO
-----Original Message-----
From: Gabriel Busnot via gem5-users [mailto:[email protected]]
Sent: 20 July 2021 13:51
To: [email protected]
Cc: Gabriel Busnot <[email protected]>
Subject: [gem5-users] Re: CHI - Cluster CPUs having a shared L2 cache
Hi Javed,
addSharedL2Cache is only called on lines 465 and 470 of CHI.py and these lines
are touched only if options.littleclust_l2cache == 'shared'.
You don't set it in the command line and the default value is 'private', which
explains why it never gets called.
Also I suspect that on lines 475 and 481 at least, you intended to call
addSharedL2Cache instead of addPrivL2Cache.
Maybe you could start over from the original CHI_config.py file and add the
addSharedL2Cache to CHI_RNF to check that it works in a simpler case. There
should really not be much to change from addPricL2Cache implementation to get a
shared L2. Walk your way up from a single cluster and single cpu cluster to a
single cluster and dual cpu to a multi cluster and multi cpu configuration.
Once you are sure about what needs to be done for a shared L2 cache to work,
you will be able to clean up you current implementation from all these little
bugs ;) I see no reason for this not to work.
Best,
Gabriel
_______________________________________________
gem5-users mailing list -- [email protected]<mailto:[email protected]> To
unsubscribe send an email to
[email protected]<mailto:[email protected]>
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
_______________________________________________
gem5-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s