Hi Srikant,
Thanks a lot for the step-wise instructions! Will do that.

Regards,
Vedika
________________________________
From: Bharadwaj, Srikant <[email protected]>
Sent: 24 June 2021 00:34
To: gem5 users mailing list <[email protected]>
Cc: VEDIKA JITENDRA KULKARNI <[email protected]>
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 <[email protected]>
Sent: Wednesday, June 23, 2021 9:02 AM
To: [email protected]
Cc: VEDIKA JITENDRA KULKARNI <[email protected]>
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 -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to