[gem5-users] Re: Add new command-line option for simulation

2021-06-23 Thread VEDIKA JITENDRA KULKARNI via gem5-users
Hi Srikant,
Thanks a lot for the step-wise instructions! Will do that.


Regards,
Vedika

From: Bharadwaj, Srikant 
Sent: 24 June 2021 00:34
To: gem5 users mailing list 
Cc: VEDIKA JITENDRA KULKARNI 
Subject: RE: Add new command-line option for simulation


[Public]


Hi Vedika,
You will have to create parameters in the SimObject of GarnetNetwork and 
GarnetRouter and then access them in Router.cc and InputUnit.cc


You can follow how this is done for vcs_per_vnet variable:
1. Have a command line in configs/network/Network.py to take in the command 
line argument.

2. Apply that to your network python object in configs/network/Network.py

3. Access the parameter in GarnetNetwork class in 
src/mem/ruby/network/garnet/GarnetNetwork.py

4. Inherit that value for routers in GarnetRouter class in 
src/mem/ruby/network/garnet/GarnetNetwork.py using the ‘Parent’ keyword

5. Access the value in Router.cc constructor and store it somewhere.

6. Access the value in InputUnit.cc from the parent router.


Srikant



From: VEDIKA JITENDRA KULKARNI via gem5-users 
Sent: Wednesday, June 23, 2021 9:02 AM
To: gem5-users@gem5.org
Cc: VEDIKA JITENDRA KULKARNI 
Subject: [gem5-users] Add new command-line option for simulation



[CAUTION: External Email]

Hello,

I want to add few new command-line options for my simulations.

I wanted to understand how to write code for that.



For example,

in garnet_synth_traffic.py, I can mimic code lines like other options using

parser.add_option, but I wanted to know where is the constructor

GarnetSyntheticTraffic() is called by this .py file. I want to be able to

use the values set in command-line as variables in garnet network files.



For example, if --ABC=10, then I want to access this value of ABC in 
InputUnit.cc of garnet.



Thank you,

Vedika.
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-users] gem5 Minor release: v21.0.1

2021-06-23 Thread Bobby Bruce via gem5-users
Dear all.

We're happy to announce our first minor release: version 21.0.1!

This release consists entirely of bug fixes for v21.0 users. More
information on exactly what has been fixed can be found here:
https://gem5.googlesource.com/public/gem5/+/refs/tags/v21.0.1.0/RELEASE-NOTES.md#version-21_0_1_0

As always, you can obtain the latest release of gem5 by pulling from the
repo's stable branch: https://gem5.googlesource.com/public/gem5/

We wish to give a special thanks to all the gem5 developers who have made
this possible, and to the gem5 community for making us aware of problems
and possible improvements to the project.

Kind regards,
Bobby
--
Dr. Bobby R. Bruce
Room 3050,
Kemper Hall, UC Davis
Davis,
CA, 95616

web: https://www.bobbybruce.net
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-users] Re: Add new command-line option for simulation

2021-06-23 Thread Bharadwaj, Srikant via gem5-users
[Public]

Hi Vedika,
You will have to create parameters in the SimObject of GarnetNetwork and 
GarnetRouter and then access them in Router.cc and InputUnit.cc

You can follow how this is done for vcs_per_vnet variable:
1. Have a command line in configs/network/Network.py to take in the command 
line argument.
2. Apply that to your network python object in configs/network/Network.py
3. Access the parameter in GarnetNetwork class in 
src/mem/ruby/network/garnet/GarnetNetwork.py
4. Inherit that value for routers in GarnetRouter class in 
src/mem/ruby/network/garnet/GarnetNetwork.py using the 'Parent' keyword
5. Access the value in Router.cc constructor and store it somewhere.
6. Access the value in InputUnit.cc from the parent router.


Srikant

From: VEDIKA JITENDRA KULKARNI via gem5-users 
Sent: Wednesday, June 23, 2021 9:02 AM
To: gem5-users@gem5.org
Cc: VEDIKA JITENDRA KULKARNI 
Subject: [gem5-users] Add new command-line option for simulation

[CAUTION: External Email]
Hello,
I want to add few new command-line options for my simulations.
I wanted to understand how to write code for that.

For example,
in garnet_synth_traffic.py, I can mimic code lines like other options using
parser.add_option, but I wanted to know where is the constructor
GarnetSyntheticTraffic() is called by this .py file. I want to be able to
use the values set in command-line as variables in garnet network files.

For example, if --ABC=10, then I want to access this value of ABC in 
InputUnit.cc of garnet.

Thank you,
Vedika.
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-users] Re: [Big, Little] clusters with CHI and SE mode

2021-06-23 Thread Javed Osmany via gem5-users
Hello Gabriel

Thank you for the pointer.
Made a start on this and just wanted to check if I have understood you 
correctly..

>> 1- Define two more options in CHI.py to specify the number of big (B) 
and the number of little (L) cpus from the command line

Okay, Done.

   >>  2- Define the L1ICache, L1DCache and L2DCache for each the big and the 
little cluster

Do you mean for each of the Big and Little CPUs?
I originally want the L1$ and L2$ to be private for each CPU.

>> 3- Pass the first B cpus as a single list together with the correct 
caches to the first CHI_RNF. Assign the result to ruby_system.bigCluster.

So I tried to following code: Initially assuming that the L1 caches are the 
same for all the CPU is the system

big_cpu = []
for i in range(int(options.num_cpu_bigclust)):
big_cpu.append(options.cpu_type_bigclust)

print ("Big CPUs are: %s" % (big_cpu))   ## Since number of big cluster 
cpu is set to 1, it prints out: Big CPUs are: ['DerivO3CPU']

# now define the big cluster
# pass the b_cpu list to the CHI_RNF() class
ruby_system.bigCluster = [ CHI_RNF([b_cpu], ruby_system, L1ICache, 
L1DCache, system.cache_line_size.value)
  for b_cpu in big_cpu ]


I am not sure if the above code matches your expectation (high level)??.
I am passing the number of big cpus as a list and currently assuming the 
default L1ICache and L1DCache.

Furthermore, the above generates the following error: For both the Big and 
Little CPU I have used DerivO3CPU


Error: could not create sytem for ruby protocol CHI
Traceback (most recent call last):
  File "", line 1, in 
  File "build/ARM/python/m5/main.py", line 455, in main
exec(filecode, scope)
  File "configs/example/se.py", line 254, in 
Ruby.create_system(options, False, system)
  File "/home/j00533938/github/gem5-21.0/gem5/configs/ruby/Ruby.py", line 194, 
in create_system
% protocol)
  File "", line 1, in 
  File "/home/j00533938/github/gem5-21.0/gem5/configs/ruby/CHI.py", line 279, 
in create_system
for b_cpu in big_cpu ]
  File "/home/j00533938/github/gem5-21.0/gem5/configs/ruby/CHI.py", line 279, 
in 
for b_cpu in big_cpu ] <== This is complaining about the above code that I 
have added, highlighted in purple
  File "/home/j00533938/github/gem5-21.0/gem5/configs/ruby/CHI_config.py", line 
401, in __init__
ruby_system = ruby_system)
AttributeError: 'str' object has no attribute 'inst_sequencer'

The command line I have used being:

./build/ARM/gem5.opt configs/example/se.py --ruby --topology=Pt2Pt 
--cpu-type=DerivO3CPU --num-cpus=4 --num-dirs=1 --num-l3caches=1 
--num-cpu-bigclust=1 --num-cpu-littleclust=3 --cpu-type-bigclust=DerivO3CPU  
--cpu-type-littleclust=DerivO3CPU 
--cmd=tests/test-progs/hello/bin/arm/linux/hello


The issue seems to be the following code that I have added:

ruby_system.bigCluster = [ CHI_RNF([b_cpu], ruby_system, L1ICache, L1DCache, 
system.cache_line_size.value)
  for b_cpu in big_cpu ]


Any pointers to help resolve the issue, much appreciated.

Best regards
JO
-Original Message-
From: Gabriel Busnot via gem5-users [mailto:gem5-users@gem5.org]
Sent: 21 June 2021 17:02
To: gem5-users@gem5.org
Cc: Gabriel Busnot 
Subject: [gem5-users] Re: [Big, Little] clusters with CHI and SE mode

Hi Javed,

I don't think that you want to use devices.CpuCluster as it is used to manage 
classic caches while you want to use Ruby caches.

My first approach would be, using se.py as is:
1- Define two more options in CHI.py to specify the number of big (B) and 
the number of little (L) cpus from the command line
2- Define the L1ICache, L1DCache and L2DCache for each the big and the 
little cluster
3- Pass the first B cpus as a single list together with the correct caches 
to the first CHI_RNF. Assign the result to ruby_system.bigCluster.
4- Pass the last L cpus as a single list together with the correct caches 
to the second CHI_RNF. Assign the result to ruby_system.littleCluster.
5- Add the private L2 cache of the correct type to both cluster.
Keep everything else as is.

Best,
Gabriel
___
gem5-users mailing list -- gem5-users@gem5.org To 
unsubscribe send an email to 
gem5-users-le...@gem5.org 
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-users] Add new command-line option for simulation

2021-06-23 Thread VEDIKA JITENDRA KULKARNI via gem5-users
Hello,
I want to add few new command-line options for my simulations.
I wanted to understand how to write code for that.

For example,
in garnet_synth_traffic.py, I can mimic code lines like other options using
parser.add_option, but I wanted to know where is the constructor
GarnetSyntheticTraffic() is called by this .py file. I want to be able to
use the values set in command-line as variables in garnet network files.

For example, if --ABC=10, then I want to access this value of ABC in 
InputUnit.cc of garnet.

Thank you,
Vedika.
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s