Hi Kypros,
The hierarchy is something like this:
src/cpu/testers/networktest.cc (~CPU, issues reads and writes) --> NetworkTest protocol (~cache coherence protocol which creates cache/dir controllers) --> garnet/fixed-pipeline/NetworkInterface_d (receives msgs from cache controller and converts them into flits).

There is no pointer to garnet from networktest.cc.

But I can think of one possible way of doing what you want to do:

I believe the parameter you are interested in is ni_flit_size (src/mem/ruby/network/garnet/BaseGarnetNetwork.py). [You need the flit size rather than buffer size in my opinion. The number of buffers per VC can be chosen to be less than the number of flits in a packet as we do wormhole flow control].
The packet sizes are here:
src/mem/ruby/network/Network.py/cc

Note that the packet size and flit sizes are all fixed. So you could even hard code it for your experiments unless you are changing it.

But let me show you how you could pass a common parameter to both NetworkTest and Garnet. Basically add this parameter (and/or any other parameters you need) to the command line.

1) Go to configs/ruby/Ruby.py
Add ni_flit_size into a command line option
parser.add_option("--ni_flit_size", "type=int", default=16, help="flit size in bytes")

Then instantiate the network as follows:

network = NetworkClass(ruby_system = ruby, topology = net_topology, ni_flit_size = options.ni_flit_size)

2) Go to configs/example/ruby_network_test.py
Instantiate the network tester as follows:

cpus = [ NetworkTest(fixed_pkts=options.fixed_pkts,
                     max_packets=options.maxpackets,
                     sim_cycles=options.sim_cycles,
                     traffic_type=options.synthetic,
                     inj_rate=options.injectionrate,
                     precision=options.precision,
                     num_memories=options.num_dirs,
                     ni_flit_size = options.ni_flit_size) \

3) Go to src/cpu/testers/networktest/NetworkTest.py, src/cpu/testers/networktest/networktest.hh and src/cpu/testers/networktest/networktest.cc
Look at how parameters are instantiated.
Example look at max_packets.
You need to declare it in NetworkTest.py and networktest.hh, and then assign it a value in the networktest.cc constructor.

Another useful file for you in all this is garnet/fixed-pipeline/NetworkInterface_d.cc where packets are actually converted to flitis and injected into the network. But I don't think you will need to change it.

cheers,
Tushar




On 07/24/2012 12:42 PM, Kypros Chrysanthou wrote:
Hi Tushar,

Thank you for the quick reply.

What I want to do, is change injRate
from PACKETS per node per cycle to FLITS per node per cycle.

To do this I need to divide the success possibility by the number of flits in the packet, but the sizes of the buffers are stored in the attributes of the GarnetNetwork_d.

I do know the type of the packet (data or control) but I need to access the GarnetNetwork_d to get the size of the buffer/packet in flits.

Is there any way to access GarnetNetwork_d from NetworkTest?
Even indirectly? e.g. by first accessing the router where the NetworkTest runs.

Thank you,
Kypros


_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to