[gem5-users] Re: Garnet - Configure buffer depth - Garnet synthetic traffic - Standalone protocol

2024-09-03 Thread Karim Soliman via gem5-users
Thank you for taking the time to provide such a detailed and informative
answer.
I appreciate your kind attention to my inquiry. Your response has been very
helpful and will undoubtedly inform my next steps.

*Karim Soliman*
Teaching Assistant
Computer Engineering Department
Pharos University in Alexandria (P.U.A)


On Fri, Aug 30, 2024 at 1:25 AM C.-Y. Wu via gem5-users 
wrote:

> Hello,
>
> My understanding is that, for a (Garnet) router, the VC buffer size is
> marked by the (initial) credit value.
>
> For example, the outport-East of Router 0 is connected to the inport-West
> of Router 1. The outport-East of Router 0 keeps all the credit values,
> corresponding to all VCs of Router 1's inport-West, in an "OutVcState"
> vector. In the constructor of OutVcState
> (src/mem/ruby/network/garnet/OutVcState.cc), the maximum credit values are
> initialized to buffers_per_ctrl_vc (for vnet 0 and 1) or
> buffers_per_data_vc (for vnet 2).
> If you change those two values, you will see that an outport can push at
> most buffers_per_ctrl_vc (or buffers_per_data_vc) flits into a VC buffer.
> Because the credits will then run out. The behavior is the same as setting
> the buffer depth. However, if you look at
> src/mem/ruby/network/garnet/flitBuffer.cc, the class member "max_size"
> seems indeed never set and the function isFull() is never called.
>
> If you want to check the number of flits in a specific VC buffer,
> you will have to check:
> - the class member virtualChannels (a vector of VirtualChannel) of
> InputUnit
> - the class member inputBuffer (type flitBuffer) of VirtualChannel
> - the member function getSize() of flitBuffer, which returns the size of
> m_buffer (type: std::deque) (Note that the size of std::deque is the number
> of elements in the queue.)
>
> Best regards,
>
> Chia
>
>
> On Mon, Aug 12, 2024 at 12:42 PM Karim Soliman via gem5-users <
> gem5-users@gem5.org> wrote:
>
>> Dear gem5 Community,
>>
>> I hope this email finds you well. I apologize in advance if my questions
>> seem basic, as I am still learning the ropes of gem5 and have encountered
>> some areas of confusion.
>>
>> For my research, I am interested in configuring the depth of the input
>> buffers per router. I understand that the default buffer size is zero,
>> which signifies an infinite buffer.
>>
>> I have reviewed the source code in
>> "src/mem/ruby/network/garnet/GarnetNetwork.py" and noticed that
>> buffers_per_data_vc is set to 4 by default, while buffers_per_ctrl_vc is
>> set to 1. If I modify the default value of buffers_per_data_vc to 8,
>> would this accurately configure the input buffer depth to 8?
>>
>> Additionally, I would like to inquire about accessing the current number
>> of flits within the buffer. I reviewed the code in
>> "src/mem/ruby/network/garnet/InputUnit.cc" and
>> "src/mem/ruby/network/garnet/RoutingUnit.cc" but was unable to locate the
>> relevant functionality.
>>
>> Thank you for your time and assistance.
>>
>> Best Regards,
>> *Eng. Karim Soliman*
>> Teaching Assistant
>> Computer Engineering Department
>> Pharos University in Alexandria (P.U.A)
>> ___
>> gem5-users mailing list -- gem5-users@gem5.org
>> To unsubscribe send an email to gem5-users-le...@gem5.org
>>
> ___
> gem5-users mailing list -- gem5-users@gem5.org
> To unsubscribe send an email to gem5-users-le...@gem5.org
>
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org


[gem5-users] Garnet - Configure buffer depth - Garnet synthetic traffic - Standalone protocol

2024-08-12 Thread Karim Soliman via gem5-users
Dear gem5 Community,

I hope this email finds you well. I apologize in advance if my questions
seem basic, as I am still learning the ropes of gem5 and have encountered
some areas of confusion.

For my research, I am interested in configuring the depth of the input
buffers per router. I understand that the default buffer size is zero,
which signifies an infinite buffer.

I have reviewed the source code in
"src/mem/ruby/network/garnet/GarnetNetwork.py" and noticed that
buffers_per_data_vc is set to 4 by default, while buffers_per_ctrl_vc is
set to 1. If I modify the default value of buffers_per_data_vc to 8, would
this accurately configure the input buffer depth to 8?

Additionally, I would like to inquire about accessing the current number of
flits within the buffer. I reviewed the code in
"src/mem/ruby/network/garnet/InputUnit.cc" and
"src/mem/ruby/network/garnet/RoutingUnit.cc" but was unable to locate the
relevant functionality.

Thank you for your time and assistance.

Best Regards,
*Eng. Karim Soliman*
Teaching Assistant
Computer Engineering Department
Pharos University in Alexandria (P.U.A)
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org


[gem5-users] Re: Where exactly are the flits generated

2024-05-03 Thread Karim Soliman via gem5-users
Hello Ojas,
If you are using the Gem5 synthetic traffic patterns, you will find the
packet generation in the following file
src/cpu/testers/garnet_synthetic_traffic/GarnetSyntheticTraffic.cc
Which is also responsible for generating packets, injecting them into the
networks, and the corresponding traffic pattern to determine the source and
destination IDs.

Best Regards,
*Eng. Karim Soliman*
Teaching Assistant
Computer Engineering Department
Pharos University in Alexandria (P.U.A)


On Fri, May 3, 2024 at 7:45 PM Ojas Sharma via gem5-users <
gem5-users@gem5.org> wrote:

> Hi,
> Can someone please tell me where exactly the flits are generated?
> I want to do some operations on the flits when they are generated,
> for example i want to add a field say sequence number to the flit and send
> them in that a certain sequence using that data, but for that i would have
> to add the sequence number when the flits are generated from a packet. So
> for this i want to know where these flits are created.
> ___
> gem5-users mailing list -- gem5-users@gem5.org
> To unsubscribe send an email to gem5-users-le...@gem5.org
>
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org


[gem5-users] Configuring Multi-Level Caches in Ruby with MESI_Three_Level Protocol

2024-04-18 Thread Karim Soliman via gem5-users
Dear gem5 community,
I am writing to inquire about configuring cache coherence protocols in Ruby
with HeteroGarnet for research purposes.
As I am relatively new to this area, I appreciate your patience and
guidance.
I am currently exploring the implementation of a three-level cache
hierarchy using the MESI_three_level protocol within a Network-on-Chip
(NoC) environment. My objective is to evaluate memory access latency as a
performance metric.
My understanding, based on initial research, is that the MESI_three_level
protocol utilizes three cache levels: L0, L1, and L2. L0 and L1 are private
caches, with L0 further divided into separate instruction (L0I) and data
(L0D) caches. The L2 cache, on the other hand, is shared among all cores in
the network.
One aspect that I find intriguing is that while the MESI_three_level
protocol employs cluster grouping, the L2 cache appears to be globally
shared. Could you please confirm if this interpretation is accurate?

To further my exploration, I have a few specific questions:

   1. Why are L0, L1, and L2 chosen over a more traditional L1, L2, and L3
   hierarchy?
   2. To incorporate additional cache levels, which specific configuration
   files should I modify? I have reviewed "configs/ruby/MESI_Three_Level.py",
   "configs/common/Caches.py", and "configs/common/CacheConfig.py", but
   require further guidance on the necessary modifications.
   3. Can you elaborate on the purpose of the "version" property within the
   L2Cache_Controller class?

[image: image.png]

4. Does gem5 support simulating cache coherence protocols with additional
levels like L4 or L5 in the hierarchy?


Thank you for your time and assistance. I look forward to learning more
about this topic.

Best Regards,
*Eng. Karim Soliman*
Teaching Assistant
Computer Engineering Department
Pharos University in Alexandria (P.U.A)
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org


[gem5-users] Re: Gem5 - Garnet - Full System

2023-09-18 Thread Karim Soliman via gem5-users
Thank you, Gabriel, for your valuable feedback.

Best Regards,
*Eng. Karim Soliman*
Teaching Assistant
Computer Engineering Department
Pharos University in Alexandria (P.U.A)


On Mon, Sep 18, 2023 at 11:48 PM gabriel.busnot--- via gem5-users <
gem5-users@gem5.org> wrote:

> Hi Karim,
>
> The short answer to “can I use a single vnet for MESI_Two_Level is
> “probably not”, just as for any provided Ruby protocol.
>
> The reason is that vnets provide traffic isolation between different
> message classes (request, response, etc.). This isolation is required to
> avoid deadlocks. Designing a protocol working with a single vnet is
> possible but would be super expensive to implement as a lot of reordering
> capabilities would be required from the units (ruby machines).
>
> The closer you can get from using a single network is to have each
> physical link support all vnets, which is the default for both
> SimpleNetwork and Garnet. However, you cannot get around the “virtual
> channels” (usually a dedicated buffer for each vnet at both end of each
> link).
>
> BTW, the error you are observing is telling you that you cannot have more
> than one input and/or output with a given vnet ID for each ruby machine.
> This is an arbitrary limitation baked deep into SLICC/Ruby to simplify
> things.
>
> Regards,
>
> Gabriel
> ___
> gem5-users mailing list -- gem5-users@gem5.org
> To unsubscribe send an email to gem5-users-le...@gem5.org
>
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org


[gem5-users] Gem5 - Garnet - Full System

2023-09-18 Thread Karim Soliman via gem5-users
Hey everyone, hope you are doing well.
For my research purposes, I'm using Gem5 in FS mode, with PARSEC benchmark
suite to do some research related to Network-on-Chip.
I have built gem5 using the default command and I'm using 2-D Mesh topology

   - python3 `which scons` build/X86/gem5.opt -j n

and I'm also using the default protocol "MESI_Two_Level" defined in the
"./gem5/build_opts/X86" file.
The default protocol uses 3 virtual networks to inject messages.

I want to use only one virtual network instead of using 3 virtual networks.
Can I change the protocol to inject all the messages into one virtual
network? If so, how?

I tried to change the value of virtual_network in these files to be the
same

   - gem5/src/mem/ruby/protocol/MESI_Two_Level-dir.sm
   - gem5/src/mem/ruby/protocol/MESI_Two_Level-dma.sm
   - gem5/src/mem/ruby/protocol/MESI_Two_Level-L1cache.sm
   - gem5/src/mem/ruby/protocol/MESI_Two_Level-L2cache.sm

MessageBuffer * requestToDir, network="From", virtual_network="0",
vnet_type="request";
   MessageBuffer * responseToDir, network="From", virtual_network="1",
vnet_type="response";
   MessageBuffer * responseFromDir, network="To", virtual_network="1",
vnet_type="response";

But I got an assert error when one of the previous files had two identical
"network", and "virtual_network" values.

AssertionError: :
  File "/gem5/SConstruct", line 816:
duplicate=GetOption('duplicate_sources'))
  File "/usr/lib/scons/SCons/Script/SConscript.py", line 614:
return method(*args, **kw)
  File "/usr/lib/scons/SCons/Script/SConscript.py", line 551:
return _SConscript(self.fs, *files, **subst_kw)
  File "/usr/lib/scons/SCons/Script/SConscript.py", line 256:
call_stack[-1].globals)
  File "/gem5/src/SConscript", line 557:
duplicate=GetOption('duplicate_sources'))
  File "/usr/lib/scons/SCons/Script/SConscript.py", line 614:
return method(*args, **kw)
  File "/usr/lib/scons/SCons/Script/SConscript.py", line 551:
return _SConscript(self.fs, *files, **subst_kw)
  File "/usr/lib/scons/SCons/Script/SConscript.py", line 256:
call_stack[-1].globals)
  File "/gem5/src/mem/ruby/protocol/SConscript", line 105:
nodes = env.SLICC([], sources)
  File "/usr/lib/scons/SCons/Environment.py", line 260:
return MethodWrapper.__call__(self, target, source, *args, **kw)
  File "/usr/lib/scons/SCons/Environment.py", line 224:
return self.method(*nargs, **kwargs)
  File "/usr/lib/scons/SCons/Builder.py", line 645:
return self._execute(env, target, source, OverrideWarner(kw), ekw)
  File "/usr/lib/scons/SCons/Builder.py", line 564:
tlist, slist = self._create_nodes(env, target, source)
  File "/usr/lib/scons/SCons/Builder.py", line 528:
target, source = self.emitter(target=tlist, source=slist, env=env)
  File "/gem5/src/mem/ruby/protocol/SConscript", line 71:
slicc.writeCodeFiles(output_dir.abspath, slicc_includes)
  File "/gem5/src/mem/slicc/parser.py", line 83:
self.symtab.writeCodeFiles(code_path, includes)
  File "/gem5/src/mem/slicc/symbols/SymbolTable.py", line 151:
symbol.writeCodeFiles(path, includes)
  File "/gem5/src/mem/slicc/symbols/StateMachine.py", line 248:
self.printControllerCC(path, includes)
  File "/gem5/src/mem/slicc/symbols/StateMachine.py", line 719:
assert (vnet, network) not in vnet_dir_set



Best Regards,
*Eng. Karim Soliman*
Teaching Assistant
Computer Engineering Department
Pharos University in Alexandria (P.U.A)
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org


[gem5-users] Re: Ruby - HeteroGarnet - Running PARSEC benchmark on NoC

2023-09-11 Thread Karim Soliman via gem5-users
Thank you for your reply, I will check the NetworkInterface.cc file.

Best Regards,
*Eng. Karim Soliman*
Teaching Assistant
Computer Engineering Department
Pharos University in Alexandria (P.U.A)


On Mon, Sep 11, 2023 at 7:18 PM Krishna, Tushar 
wrote:

> The decision for virtual network is made here:
> Garnet Synthetic Traffic
> <https://www.gem5.org/documentation/general_docs/ruby/garnet_synthetic_traffic/>
> gem5.org
> <https://www.gem5.org/documentation/general_docs/ruby/garnet_synthetic_traffic/>
> [image: apple-touch-icon.png]
> <https://www.gem5.org/documentation/general_docs/ruby/garnet_synthetic_traffic/>
> <https://www.gem5.org/documentation/general_docs/ruby/garnet_synthetic_traffic/>
> And depends on the coherence protocol. For eg the garnet stand-alone
> protocol has three vnets.
> Garnet standalone
> <https://www.gem5.org/documentation/general_docs/ruby/Garnet_standalone/>
> gem5.org
> <https://www.gem5.org/documentation/general_docs/ruby/Garnet_standalone/>
> [image: apple-touch-icon.png]
> <https://www.gem5.org/documentation/general_docs/ruby/Garnet_standalone/>
> <https://www.gem5.org/documentation/general_docs/ruby/Garnet_standalone/>
>
> By default req, fwd and resp Go to vnets 0, 1 and 2. For garnet synthetic
> the words req, fwd and resp are meaningless as it’s not simulating actual
> coherence .. just that req and fwd are 1 flit while resp is 5 flit.
>
> You could either make changes at this level (might be harder) OR you can
> maybe hack into NetworkInterface.cc in the garnet folder .. see the wakeup
> function and how it gets packets from protocol and injects them into the
> vnets and make changes there ..
>
> Cheers,
> Tushar
>
> On Sep 11, 2023, at 12:11 AM, Karim Soliman via gem5-users <
> gem5-users@gem5.org> wrote:
>
> 
> Hey everyone, hope you all are doing well.
> For my research purposes, which is about Network-on-Chip routing
> algorithms and the effects of using different virtual networks and virtual
> channels.
> I have successfully run the PARSEC benchmark suite with the 2D-Mesh
> topology and it's working well, I have used the following:
>
>- Gem5 - version 23 [X86.opt]
>- Linux kernel: x86-linux-kernel-4.19.83
>- PARSEC disk image: downloaded from
>
> https://resources.gem5.org/resources/x86-parsec/versions?database=gem5-resources&version=1.0.0
>- Used operating system is Ubuntu 18.04.
>
> What I'm trying to do is set specific criteria for deciding which virtual
> network a packet will belong to when it's being injected.
> I implemented such a method when I used a synthetic traffic generator and
> it worked, my modifications were in the file ==>
> src/cpu/testers/garnet_synthetic_traffic/GarnetSyntheticTraffic.cc
>
> I tried to std::cout the used virtual network and virtual channels, in ==>
> src/mem/ruby/network/garnet/InputUnit.cc, and I found that the default
> configurations being used in the simulation are 3 virtual networks [0, 1,
> 2] and each virtual network has 4 virtual channels.
>
> I'm inquiring about where I can locate the function that handles the
> injection of packets into the network.
>
>
> Best Regards,
> *Eng. Karim Soliman*
> Teaching Assistant
> Computer Engineering Department
> Pharos University in Alexandria (P.U.A)
> ___
> gem5-users mailing list -- gem5-users@gem5.org
> To unsubscribe send an email to gem5-users-le...@gem5.org
>
>
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org


[gem5-users] Ruby - HeteroGarnet - Running PARSEC benchmark on NoC

2023-09-10 Thread Karim Soliman via gem5-users
Hey everyone, hope you all are doing well.
For my research purposes, which is about Network-on-Chip routing algorithms
and the effects of using different virtual networks and virtual channels.
I have successfully run the PARSEC benchmark suite with the 2D-Mesh
topology and it's working well, I have used the following:

   - Gem5 - version 23 [X86.opt]
   - Linux kernel: x86-linux-kernel-4.19.83
   - PARSEC disk image: downloaded from
   
https://resources.gem5.org/resources/x86-parsec/versions?database=gem5-resources&version=1.0.0
   - Used operating system is Ubuntu 18.04.

What I'm trying to do is set specific criteria for deciding which virtual
network a packet will belong to when it's being injected.
I implemented such a method when I used a synthetic traffic generator and
it worked, my modifications were in the file ==>
src/cpu/testers/garnet_synthetic_traffic/GarnetSyntheticTraffic.cc

I tried to std::cout the used virtual network and virtual channels, in ==>
src/mem/ruby/network/garnet/InputUnit.cc, and I found that the default
configurations being used in the simulation are 3 virtual networks [0, 1,
2] and each virtual network has 4 virtual channels.

I'm inquiring about where I can locate the function that handles the
injection of packets into the network.


Best Regards,
*Eng. Karim Soliman*
Teaching Assistant
Computer Engineering Department
Pharos University in Alexandria (P.U.A)
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org


[gem5-users] Re: Running PARSEC benchmark on gem5 Garnet

2023-08-16 Thread Karim Soliman via gem5-users
+0x1c23af)[0x7fd57d8b03af]


--- END LIBC BACKTRACE ---

Aborted


I would really appreciate your help and time. Thank you so much.

Best Regards,
*Eng. Karim Soliman*
Teaching Assistant
Computer Engineering Department
Pharos University in Alexandria (P.U.A)


On Thu, Aug 10, 2023 at 4:34 PM Karim Soliman 
wrote:

> Thank you so much for your time and the valuable information.
>
> Best Regards,
> *Eng. Karim Soliman*
> Teaching Assistant
> Computer Engineering Department
> Pharos University in Alexandria (P.U.A)
>
>
> On Thu, Aug 10, 2023 at 1:32 PM Hansika Weerasena via gem5-users <
> gem5-users@gem5.org> wrote:
>
>> Hi Karim,
>>
>>
>>
>> The x86-parsec readme file runs experiment using gem5s new standard
>> library, and it does not support garnet at the moment. Therefore, I had
>> to go with fs.py (which is deprecated in current version of gem5). I was
>> able to replicate the same experiment using fs.py and using the same gem5
>> resources.
>>
>>
>>
>> I was able to do these steps and run parsec benchmark with garnet in full
>> system mode upto 64 cores. Following are the links and scripts I used, you
>> may need to change them according to your requirement.
>>
>>
>>
>>1. I used the prebuilt X86 parsec disk image from gem5 resources :
>>https://resources.gem5.org/resources/x86-parsec?version=1.0.0
>>2. For linux kernel I used vmlinux-4.4.186
>>3. Example Simulation.py the KVM switch on ROI start can be found
>>here (
>>
>> https://github.com/hansikaweerasena/gem5-n/blob/kvm-fs/configs/common/Simulation.py).
>>
>>4. Example rcs script can be found here :
>>https://github.com/hansikaweerasena/gem5-n/blob/kvm-fs/scripts/parsec.rcS
>>5. Finally, following is an example command to run parsec on FS mode
>>with garnet.
>>
>>
>>
>> *./build/X86/gem5.opt configs/example/fs.py --disk-image=dist/parsec.img
>> --kernel=dist/vmlinux-4.4.186 --num-cpus=4 --num-dirs=4
>> --cpu-type=X86KvmCPU --cpu-clock=2GHz --caches --l1d_size=16kB
>> --l1i_size=16kB --l2cache --num-l2cache=4 --mem-type=SimpleMemory
>> --mem-size=3GB --ruby --network=garnet --topology=Mesh_XY --mesh-rows=2
>> --script=scripts/parsec.rcS*
>>
>>
>>
>> Regards,
>>
>> Hansika Weerasena
>>
>> Research Assistant,
>>
>> University of Florida
>>
>>
>>
>>
>>
>>
>>
>> *From: *Karim Soliman via gem5-users 
>> *Date: *Wednesday, August 9, 2023 at 11:21 PM
>> *To: *The gem5 Users mailing list 
>> *Cc: *Karim Soliman 
>> *Subject: *[gem5-users] Running PARSEC benchmark on gem5 Garnet
>>
>> *[External Email]*
>>
>> Hey everyone,
>>
>>  For research purposes, I'm trying to run the *PARSEC *benchmark on
>> Garnet 2D mesh topology.
>>
>>
>>
>> I successfully simulated garnet synthetic traffic under standalone
>> protocol, after building gem5 using the following command *scons build*
>> */**NULL**/**gem5**.**opt PROTOCOL=Garnet_standalone **-**j**<**proc**>*
>>
>> I've used the configuration file for XY routing which is located at
>> */gem5/configs/topologies/Mesh_XY.py*
>>
>> The full command for simulating garnet synthetic traffic is
>>
>> ./build/NULL/gem5.opt ./configs/example/garnet_synth_traffic.py
>> --synthetic=uniform_random --network=garnet --mesh-rows=4 --num-cpus=16
>> --num-dirs=16 --topology=Mesh_XY--sim-cycles=2500 --router-latency=4
>> --link-latency=1 --injectionrate=0.05
>>
>>
>>
>> The simulation for the garnet synthetic traffic is successful and
>> everything is fine.
>>
>>
>>
>> I've tried to run the PARSEC benchmark so I followed the x86-parsec
>> readme file at gem5 resources repo -
>> https://gem5.googlesource.com/public/gem5-resources/+/refs/heads/stable/src/parsec/
>>
>> Gem5 is built using the following command: *scons build**/**X86**/**gem5*
>> *.**opt **-**j**<**proc**>*
>>
>> The benchmark is working fine and the simulation is successful.
>>
>>
>>
>> Currently, I want to run the PARSEC benchmark in garnet and run the
>> network on chip in full system simulation.
>>
>> I would really appreciate it if anyone could help me with the steps on
>> how to do it.
>>
>> *[image: Image removed by sender.]*
>>
>> Best Regards,
>>
>> *Eng. Karim Soliman*
>>
>> Teaching Assistant
>>
>> Computer Engineering Department
>>
>> Pharos University in Alexandria (P.U.A)
>> ___
>> gem5-users mailing list -- gem5-users@gem5.org
>> To unsubscribe send an email to gem5-users-le...@gem5.org
>>
>
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org


[gem5-users] Re: Running PARSEC benchmark on gem5 Garnet

2023-08-10 Thread Karim Soliman via gem5-users
Thank you so much for your time and the valuable information.

Best Regards,
*Eng. Karim Soliman*
Teaching Assistant
Computer Engineering Department
Pharos University in Alexandria (P.U.A)


On Thu, Aug 10, 2023 at 1:32 PM Hansika Weerasena via gem5-users <
gem5-users@gem5.org> wrote:

> Hi Karim,
>
>
>
> The x86-parsec readme file runs experiment using gem5s new standard
> library, and it does not support garnet at the moment. Therefore, I had
> to go with fs.py (which is deprecated in current version of gem5). I was
> able to replicate the same experiment using fs.py and using the same gem5
> resources.
>
>
>
> I was able to do these steps and run parsec benchmark with garnet in full
> system mode upto 64 cores. Following are the links and scripts I used, you
> may need to change them according to your requirement.
>
>
>
>1. I used the prebuilt X86 parsec disk image from gem5 resources :
>https://resources.gem5.org/resources/x86-parsec?version=1.0.0
>2. For linux kernel I used vmlinux-4.4.186
>3. Example Simulation.py the KVM switch on ROI start can be found here
>(
>
> https://github.com/hansikaweerasena/gem5-n/blob/kvm-fs/configs/common/Simulation.py).
>
>4. Example rcs script can be found here :
>https://github.com/hansikaweerasena/gem5-n/blob/kvm-fs/scripts/parsec.rcS
>5. Finally, following is an example command to run parsec on FS mode
>with garnet.
>
>
>
> *./build/X86/gem5.opt configs/example/fs.py --disk-image=dist/parsec.img
> --kernel=dist/vmlinux-4.4.186 --num-cpus=4 --num-dirs=4
> --cpu-type=X86KvmCPU --cpu-clock=2GHz --caches --l1d_size=16kB
> --l1i_size=16kB --l2cache --num-l2cache=4 --mem-type=SimpleMemory
> --mem-size=3GB --ruby --network=garnet --topology=Mesh_XY --mesh-rows=2
> --script=scripts/parsec.rcS*
>
>
>
> Regards,
>
> Hansika Weerasena
>
> Research Assistant,
>
> University of Florida
>
>
>
>
>
>
>
> *From: *Karim Soliman via gem5-users 
> *Date: *Wednesday, August 9, 2023 at 11:21 PM
> *To: *The gem5 Users mailing list 
> *Cc: *Karim Soliman 
> *Subject: *[gem5-users] Running PARSEC benchmark on gem5 Garnet
>
> *[External Email]*
>
> Hey everyone,
>
>  For research purposes, I'm trying to run the *PARSEC *benchmark on
> Garnet 2D mesh topology.
>
>
>
> I successfully simulated garnet synthetic traffic under standalone
> protocol, after building gem5 using the following command *scons build**/*
> *NULL**/**gem5**.**opt PROTOCOL=Garnet_standalone **-**j**<**proc**>*
>
> I've used the configuration file for XY routing which is located at
> */gem5/configs/topologies/Mesh_XY.py*
>
> The full command for simulating garnet synthetic traffic is
>
> ./build/NULL/gem5.opt ./configs/example/garnet_synth_traffic.py
> --synthetic=uniform_random --network=garnet --mesh-rows=4 --num-cpus=16
> --num-dirs=16 --topology=Mesh_XY--sim-cycles=2500 --router-latency=4
> --link-latency=1 --injectionrate=0.05
>
>
>
> The simulation for the garnet synthetic traffic is successful and
> everything is fine.
>
>
>
> I've tried to run the PARSEC benchmark so I followed the x86-parsec readme
> file at gem5 resources repo -
> https://gem5.googlesource.com/public/gem5-resources/+/refs/heads/stable/src/parsec/
>
> Gem5 is built using the following command: *scons build**/**X86**/**gem5*
> *.**opt **-**j**<**proc**>*
>
> The benchmark is working fine and the simulation is successful.
>
>
>
> Currently, I want to run the PARSEC benchmark in garnet and run the
> network on chip in full system simulation.
>
> I would really appreciate it if anyone could help me with the steps on how
> to do it.
>
> *[image: Image removed by sender.]*
>
> Best Regards,
>
> *Eng. Karim Soliman*
>
> Teaching Assistant
>
> Computer Engineering Department
>
> Pharos University in Alexandria (P.U.A)
> ___
> gem5-users mailing list -- gem5-users@gem5.org
> To unsubscribe send an email to gem5-users-le...@gem5.org
>
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org


[gem5-users] Running PARSEC benchmark on gem5 Garnet

2023-08-09 Thread Karim Soliman via gem5-users
Hey everyone,
 For research purposes, I'm trying to run the *PARSEC *benchmark on Garnet
2D mesh topology.

I successfully simulated garnet synthetic traffic under standalone
protocol, after building gem5 using the following command *scons
build/NULL/gem5.opt PROTOCOL=Garnet_standalone -j*
I've used the configuration file for XY routing which is located at
*/gem5/configs/topologies/Mesh_XY.py*
The full command for simulating garnet synthetic traffic is
./build/NULL/gem5.opt ./configs/example/garnet_synth_traffic.py
--synthetic=uniform_random
--network=garnet --mesh-rows=4 --num-cpus=16 --num-dirs=16
--topology=Mesh_XY--sim-cycles=2500 --router-latency=4 --link-latency=1
--injectionrate=0.05

The simulation for the garnet synthetic traffic is successful and
everything is fine.

I've tried to run the PARSEC benchmark so I followed the x86-parsec readme
file at gem5 resources repo -
https://gem5.googlesource.com/public/gem5-resources/+/refs/heads/stable/src/parsec/
Gem5 is built using the following command: *scons build/X86/gem5.opt
-j*
The benchmark is working fine and the simulation is successful.

Currently, I want to run the PARSEC benchmark in garnet and run the network
on chip in full system simulation.
I would really appreciate it if anyone could help me with the steps on how
to do it.

Best Regards,
*Eng. Karim Soliman*
Teaching Assistant
Computer Engineering Department
Pharos University in Alexandria (P.U.A)
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org


[gem5-users] Re: Gem5 Garnet 3.0 -- Virtual networks

2023-06-09 Thread Karim Soliman via gem5-users
I have tried changing the number of virtual networks
in configs/ruby/Garnet_standalone.py and it's working, I checked the number
of Virtual channels in src/mem/ruby/network/garnet/InputUnit.cc and it's
working.
 The problem is the Garnet Synthetic Traffic
in src/cpu/testers/garnet_synthetic_traffic/GarnetSyntheticTraffic.cc is
just injecting packets in vnet =0, 1, and 2 even if I try to change
the injReqType variable to another value like 3 or 4 (after increasing the
number of virtual networks) still injecting them into virtual network 0, 1
and 2 according to the request type variable.
How can I inject the packet into the new virtual networks?

Best Regards,
*Eng. Karim Soliman*
Teaching Assistant
Computer Engineering Department
Pharos University in Alexandria (P.U.A)


On Sat, Jun 10, 2023 at 9:42 AM Karim Soliman 
wrote:

> Thank you so much for your help.
>
> Best Regards,
> *Eng. Karim Soliman*
> Teaching Assistant
> Computer Engineering Department
> Pharos University in Alexandria (P.U.A)
>
>
> On Fri, Jun 9, 2023 at 10:34 AM Krishna, Tushar via gem5-users <
> gem5-users@gem5.org> wrote:
>
>> Karim you can control which vnet to inject traffic into using -
>> -inj-vnet
>>
>> Garnet Synthetic Traffic
>> <https://www.gem5.org/documentation/general_docs/ruby/garnet_synthetic_traffic/>
>> gem5.org
>> <https://www.gem5.org/documentation/general_docs/ruby/garnet_synthetic_traffic/>
>> [image: apple-touch-icon.png]
>> <https://www.gem5.org/documentation/general_docs/ruby/garnet_synthetic_traffic/>
>> <https://www.gem5.org/documentation/general_docs/ruby/garnet_synthetic_traffic/>
>>
>> More details of the protocol are here:
>> Garnet standalone
>> <https://www.gem5.org/documentation/general_docs/ruby/Garnet_standalone/>
>> gem5.org
>> <https://www.gem5.org/documentation/general_docs/ruby/Garnet_standalone/>
>> [image: apple-touch-icon.png]
>> <https://www.gem5.org/documentation/general_docs/ruby/Garnet_standalone/>
>> <https://www.gem5.org/documentation/general_docs/ruby/Garnet_standalone/>
>>
>>
>> Cheers,
>> Tushar
>>
>> On Jun 8, 2023, at 10:24 PM, Chenxun Wang via gem5-users <
>> gem5-users@gem5.org> wrote:
>>
>> Hi Karim,
>>
>> The number of virtual networks under Standalone protocol is set in
>> `configs/ruby/Garnet_standalone.py`, line 115 which is
>> `ruby_system.network.number_of_virtual_networks = 3`.
>> It's the same as every other protocol such as CHI in
>> `configs/ruby/CHI.py`. This parameter should not be less than the number of
>> the used virtual networks defined in SLICC implementation of protocol, 3
>> for Standalone.
>>
>> Hope it helps you.
>>
>> Chenxun
>>
>>
>>
>> - 原始邮件 -
>> 发件人: "Karim Soliman via gem5-users" 
>> 收件人: "The gem5 Users mailing list" 
>> 抄送: "Karim Soliman" 
>> 发送时间: 星期四, 2023年 6 月 08日 下午 2:15:30
>> 主题: [gem5-users] Gem5 Garnet 3.0 -- Virtual networks
>>
>> Hey everyone, hope you are all doing well.
>> For research purposes, I'm using gem5 with garnet 3.0, the protocol used
>> is the Standalone protocol which provides 3 virtual networks, vnet =0, 1,
>> 2.
>> I was wondering if it's possible to change this number and set a
>> different number of virtual networks.
>> I understand that changing the protocol will change the number of the
>> used virtual networks, but I want to perform the simulation under the
>> Standalone protocol because my interest is the routing in NoC, not the
>> cache.
>>
>> Best Regards,
>> Eng. Karim Soliman
>> Teaching Assistant
>> Computer Engineering Department
>> Pharos University in Alexandria (P.U.A)
>>
>> ___
>> gem5-users mailing list -- gem5-users@gem5.org
>> To unsubscribe send an email to gem5-users-le...@gem5.org
>> ___
>> gem5-users mailing list -- gem5-users@gem5.org
>> To unsubscribe send an email to gem5-users-le...@gem5.org
>>
>> ___
>> gem5-users mailing list -- gem5-users@gem5.org
>> To unsubscribe send an email to gem5-users-le...@gem5.org
>>
>
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org


[gem5-users] Re: Gem5 Garnet 3.0 -- Virtual networks

2023-06-09 Thread Karim Soliman via gem5-users
Thank you so much for your help.

Best Regards,
*Eng. Karim Soliman*
Teaching Assistant
Computer Engineering Department
Pharos University in Alexandria (P.U.A)


On Fri, Jun 9, 2023 at 10:34 AM Krishna, Tushar via gem5-users <
gem5-users@gem5.org> wrote:

> Karim you can control which vnet to inject traffic into using - -inj-vnet
>
> Garnet Synthetic Traffic
> <https://www.gem5.org/documentation/general_docs/ruby/garnet_synthetic_traffic/>
> gem5.org
> <https://www.gem5.org/documentation/general_docs/ruby/garnet_synthetic_traffic/>
> [image: apple-touch-icon.png]
> <https://www.gem5.org/documentation/general_docs/ruby/garnet_synthetic_traffic/>
> <https://www.gem5.org/documentation/general_docs/ruby/garnet_synthetic_traffic/>
>
> More details of the protocol are here:
> Garnet standalone
> <https://www.gem5.org/documentation/general_docs/ruby/Garnet_standalone/>
> gem5.org
> <https://www.gem5.org/documentation/general_docs/ruby/Garnet_standalone/>
> [image: apple-touch-icon.png]
> <https://www.gem5.org/documentation/general_docs/ruby/Garnet_standalone/>
> <https://www.gem5.org/documentation/general_docs/ruby/Garnet_standalone/>
>
>
> Cheers,
> Tushar
>
> On Jun 8, 2023, at 10:24 PM, Chenxun Wang via gem5-users <
> gem5-users@gem5.org> wrote:
>
> Hi Karim,
>
> The number of virtual networks under Standalone protocol is set in
> `configs/ruby/Garnet_standalone.py`, line 115 which is
> `ruby_system.network.number_of_virtual_networks = 3`.
> It's the same as every other protocol such as CHI in
> `configs/ruby/CHI.py`. This parameter should not be less than the number of
> the used virtual networks defined in SLICC implementation of protocol, 3
> for Standalone.
>
> Hope it helps you.
>
> Chenxun
>
>
>
> - 原始邮件 -
> 发件人: "Karim Soliman via gem5-users" 
> 收件人: "The gem5 Users mailing list" 
> 抄送: "Karim Soliman" 
> 发送时间: 星期四, 2023年 6 月 08日 下午 2:15:30
> 主题: [gem5-users] Gem5 Garnet 3.0 -- Virtual networks
>
> Hey everyone, hope you are all doing well.
> For research purposes, I'm using gem5 with garnet 3.0, the protocol used
> is the Standalone protocol which provides 3 virtual networks, vnet =0, 1,
> 2.
> I was wondering if it's possible to change this number and set a different
> number of virtual networks.
> I understand that changing the protocol will change the number of the used
> virtual networks, but I want to perform the simulation under the Standalone
> protocol because my interest is the routing in NoC, not the cache.
>
> Best Regards,
> Eng. Karim Soliman
> Teaching Assistant
> Computer Engineering Department
> Pharos University in Alexandria (P.U.A)
>
> ___
> gem5-users mailing list -- gem5-users@gem5.org
> To unsubscribe send an email to gem5-users-le...@gem5.org
> ___
> gem5-users mailing list -- gem5-users@gem5.org
> To unsubscribe send an email to gem5-users-le...@gem5.org
>
> ___
> gem5-users mailing list -- gem5-users@gem5.org
> To unsubscribe send an email to gem5-users-le...@gem5.org
>
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org


[gem5-users] Gem5 Garnet 3.0 -- Virtual networks

2023-06-07 Thread Karim Soliman via gem5-users
Hey everyone, hope you are all doing well.
For research purposes, I'm using gem5 with garnet 3.0, the protocol used is
the Standalone protocol which provides 3 virtual networks, vnet =0, 1, 2.
I was wondering if it's possible to change this number and set a different
number of virtual networks.
I understand that changing the protocol will change the number of the used
virtual networks, but I want to perform the simulation under the Standalone
protocol because my interest is the routing in NoC, not the cache.

Best Regards,
*Eng. Karim Soliman*
Teaching Assistant
Computer Engineering Department
Pharos University in Alexandria (P.U.A)
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org


[gem5-users] Re: gem5 garnet 3.0 standalone

2023-05-09 Thread Karim Soliman via gem5-users
Thank you so much for your help.

Best Regards,
*Eng. Karim Soliman*
Teaching Assistant
Computer Engineering Department
Pharos University in Alexandria (P.U.A)


On Tue, May 9, 2023 at 6:10 PM gabriel.busnot--- via gem5-users <
gem5-users@gem5.org> wrote:

> Hi Karim,
>
> You can run simulation for a few thousand cycles using
> m5.simulate(some_amount_of_ticks), then reset stats using m5.stats.reset()
> and then run m5.simulate again. You will collect stats on a warmed up
> system.
>
> Regards,
>
> Gabriel
> ___
> gem5-users mailing list -- gem5-users@gem5.org
> To unsubscribe send an email to gem5-users-le...@gem5.org
>
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org


[gem5-users] gem5 garnet 3.0 standalone

2023-05-07 Thread Karim Soliman via gem5-users
Hey everyone,
 I'm trying to learn the garnet 3.0 standalone protocol for NoC research
purposes, I read in some articles that they perform a warm-up before
starting their simulations, if anyone knows how can I apply the warm-up in
garnet 3.0?

Best Regards,
*Eng. Karim Soliman*
Teaching Assistant
Computer Engineering Department
Pharos University in Alexandria (P.U.A)
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org


[gem5-users] gem5 / Garnet 3.0 / Standalone

2023-04-03 Thread Karim Soliman via gem5-users
Hey everyone,
I was trying to limit the size of the flitBuffer.
The default constructor is set *max_size = INFINITE_;*
So, I used the method *setMaxSize(); *to alter the default *max_size *of
the buffer.

During the simulation, I output the current size of the flitBuffer at
 mem/ruby/network/garnet/flitBuffer.hh, at the end of the method ==>  void
insert(flit *flit) , and the current size of the buffer was exceeding the
max_size value.

Is there a way to prevent exceeding the buffer max_size during the
simulation?


Best Regards,
*Eng. Karim Soliman*
Teaching Assistant
Computer Engineering Department
Pharos University in Alexandria (P.U.A)
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org


[gem5-users] Re: Gem5 / garnet 3.0 - Standalone

2023-04-03 Thread Karim Soliman via gem5-users
Thank you for your time and for your assistance, I'll check it out.

Best Regards,
*Eng. Karim Soliman*
Teaching Assistant
Computer Engineering Department
Pharos University in Alexandria (P.U.A)


On Tue, Apr 4, 2023 at 8:13 AM Krishna, Tushar 
wrote:

> 0.02 flits/node/cycle is too low an injection rate for deadlocks. Try
> higher rates.
>
> I had created some labs in my NoC class in the past on deadlocks. It might
> be useful to take a look, esp Lab 3 on deadlocks.
> https://tusharkrishna.ece.gatech.edu/teaching/icn_s20/
>
> Some of the garnet repos from past papers from my group might be useful as
> well :
> https://github.com/noc-deadlock
>
> Cheers,
> Tushar
> On Apr 1, 2023, 12:12 AM -0400, Karim Soliman via gem5-users <
> gem5-users@gem5.org>, wrote:
>
> Hey everyone,
> My research field is about NoC and I'm working on gem5/garnet 3.0
> standalone.
> For research purposes, I'm trying to push Garnet standalone protocol into
> deadlock or traffic congestion during the simulation of Mesh_XY topology.
> So, that's what i have done so far:
>  • topologies/Mesh_XY.py ==> I changed the weight of all the internal
> links to be 1, to allow the routing to select random output.
>  • mem/ruby/network/garnet/flitBuffer.cc ==> I reduced the max_size of the
> flit buffer to 2 instead of using INFINITE_ constant, by using
> setMaxSize(int size); method to apply this.
>  • cpu/testers/garnet_synthetic_traffic/GarnetSyntheticTraffic.py ==> I
> reduced response_limit to be 1000.
>  • cpu/testers/garnet_synthetic_traffic/GarnetSyntheticTraffic.cc ==> I
> used std::cout in the function doRetry() in order to check if there was any
> traffic congestion.
>  • I'm using only two virtual channels by setting the option of
> --vcs-per-vnet=2
> I rebuild gem5 using
> *sudo scons build/NULL/gem5.debug PROTOCOL=Garnet_standalone -j13*My
> simulation command is
> *sudo build/NULL/gem5.debug configs/example/garnet_synth_traffic.py
> --synthetic=uniform_random --network=garnet --num-cpus=16 --num-dirs=16
> --mesh-rows=4 --topology=Mesh_XY --sim-cycles=5000
> --routing-algorithm=1 --vcs-per-vnet=2 --injectionrate=0.02*
> I re-simulated using higher injection rates with no output from the
> doRetry() method, and no deadlock happened, are there any parameters I
> should change?
>
>
>
> Best Regards,*Eng. Karim Soliman*Teaching AssistantComputer Engineering
> DepartmentPharos University in Alexandria (P.U.A)
>
>
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org


[gem5-users] Gem5 / garnet 3.0 - Standalone

2023-03-31 Thread Karim Soliman via gem5-users
Hey everyone,
My research field is about NoC and I'm working on gem5/garnet 3.0
standalone.
For research purposes, I'm trying to push Garnet standalone protocol into
deadlock or traffic congestion during the simulation of Mesh_XY topology.
So, that's what i have done so far:

   - topologies/Mesh_XY.py ==> I changed the weight of all the internal
   links to be 1, to allow the routing to select random output.
   - mem/ruby/network/garnet/flitBuffer.cc ==> I reduced the max_size of
   the flit buffer to 2 instead of using INFINITE_ constant, by using
   setMaxSize(int size); method to apply this.
   - cpu/testers/garnet_synthetic_traffic/GarnetSyntheticTraffic.py ==> I
   reduced response_limit to be 1000.
   - cpu/testers/garnet_synthetic_traffic/GarnetSyntheticTraffic.cc ==> I
   used std::cout in the function doRetry() in order to check if there was any
   traffic congestion.
   - I'm using only two virtual channels by setting the option of
   --vcs-per-vnet=2

I rebuild gem5 using

*sudo scons build/NULL/gem5.debug PROTOCOL=Garnet_standalone -j13*
My simulation command is
*sudo build/NULL/gem5.debug configs/example/garnet_synth_traffic.py
--synthetic=uniform_random --network=garnet --num-cpus=16 --num-dirs=16
--mesh-rows=4 --topology=Mesh_XY --sim-cycles=5000
--routing-algorithm=1 --vcs-per-vnet=2 --injectionrate=0.02*

I re-simulated using higher injection rates with no output from the
doRetry() method, and no deadlock happened, are there any parameters I
should change?




Best Regards,
*Eng. Karim Soliman*
Teaching Assistant
Computer Engineering Department
Pharos University in Alexandria (P.U.A)
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org


[gem5-users] Re: Gem5 - ruby - garnet3.0

2023-03-29 Thread Karim Soliman via gem5-users
Thank you, that helps a lot.

Best Regards,
*Eng. Karim Soliman*
Teaching Assistant
Computer Engineering Department
Pharos University in Alexandria (P.U.A)


On Thu, Mar 30, 2023 at 10:32 AM Srikant Bharadwaj 
wrote:

> Hi Karim,
> Adding to what Tushar and Gabriel mentioned, you can use Garnet standalone
> to do this.
>
> From what I understand, you want to create a custom traffic pattern
> according to your calculations. You can create your own traffic pattern by
> modifying the traffic injector.
> You can follow the following steps in that case:
> 1. Add your custom traffic pattern name
> to src/cpu/testers/garnet_synthetic_traffic/GarnetSyntheticTraffic.hh and
> in initTrafficType()
> src/cpu/testers/garnet_synthetic_traffic/GarnetSyntheticTraffic.cc under
> the rest of them.
> 2. Add your calculation for your traffic pattern
> in src/cpu/testers/garnet_synthetic_traffic/GarnetSyntheticTraffic.cc. You
> can look at the other traffic patterns to see how you can set the input and
> destination of each message.
> 3. Use your custom traffic pattern name when you launch experiments in
> your command line instead of uniform-random traffic.
>
> Thanks,
> Srikant
>
>
> On Wed, Mar 29, 2023 at 7:03 PM Karim Soliman via gem5-users <
> gem5-users@gem5.org> wrote:
>
>> Thank you for your response, I'm actually interested in routing and not
>> coherency protocols, so i rebuild gem5 with the following command to use
>> Garnet Standalone protocol
>> scons build/NULL/gem5.debug PROTOCOL=Garnet_standalone
>> Thanks for the help about using the appropriate protocol.
>> What I want to do is to inject the messages or the flits inside each one
>> of the three vnets 0, 1, and 2 based on some calculations I'm gonna to do
>> and I will use in these calculations as input parameters the source and
>> destination Ids of the message / flits to achieve my results.
>> In other words, Garnet Stand Alone classifies messages injections based
>> on the type of the message LD / IFETCH / ST to be injected in vnet 0, 1 and
>> 2 respectively.
>> What I'm trying to do is to classify the messages based on my
>> calculations which need as input the Ids of the source and the destination
>> of each message.
>>
>> Is that possible?
>>
>>
>> Best Regards,
>> *Eng. Karim Soliman*
>> Teaching Assistant
>> Computer Engineering Department
>> Pharos University in Alexandria (P.U.A)
>>
>>
>> On Wed, Mar 29, 2023 at 5:59 PM gabriel.busnot--- via gem5-users <
>> gem5-users@gem5.org> wrote:
>>
>>> Hi Karim,
>>>
>>> Can you be more specific about what you are trying to achieve for us to
>>> provide accurate answers?
>>>
>>> You seem to be really focused on the transport and not so much on the
>>> coherency protocol. In that case, I recommend using the garnet standalone
>>> protocol:
>>>
>>>-
>>>
>>>
>>>https://www.gem5.org/documentation/general_docs/ruby/Garnet_standalone/
>>>-
>>>
>>>
>>>
>>> https://www.gem5.org/documentation/general_docs/ruby/garnet_synthetic_traffic/
>>>
>>> Then check what Garnet is natively capable of
>>>
>>>-
>>>
>>>https://www.gem5.org/documentation/general_docs/ruby/heterogarnet/
>>>
>>> And if that does not work for you, then you need to hack the model to
>>> bring your features in. For instance, you can modify the garnet standalone
>>> protocol to inject traffic on different vnets but it is up to you to define
>>> how that should happen.
>>>
>>> Regards,
>>>
>>> Gabriel
>>> ___
>>> gem5-users mailing list -- gem5-users@gem5.org
>>> To unsubscribe send an email to gem5-users-le...@gem5.org
>>>
>> ___
>> gem5-users mailing list -- gem5-users@gem5.org
>> To unsubscribe send an email to gem5-users-le...@gem5.org
>>
>
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org


[gem5-users] Re: Gem5 - ruby - garnet3.0

2023-03-29 Thread Karim Soliman via gem5-users
Thank you for your response, I'm actually interested in routing and not
coherency protocols, so i rebuild gem5 with the following command to use
Garnet Standalone protocol
scons build/NULL/gem5.debug PROTOCOL=Garnet_standalone
Thanks for the help about using the appropriate protocol.
What I want to do is to inject the messages or the flits inside each one of
the three vnets 0, 1, and 2 based on some calculations I'm gonna to do and
I will use in these calculations as input parameters the source and
destination Ids of the message / flits to achieve my results.
In other words, Garnet Stand Alone classifies messages injections based on
the type of the message LD / IFETCH / ST to be injected in vnet 0, 1 and 2
respectively.
What I'm trying to do is to classify the messages based on my calculations
which need as input the Ids of the source and the destination of each
message.

Is that possible?


Best Regards,
*Eng. Karim Soliman*
Teaching Assistant
Computer Engineering Department
Pharos University in Alexandria (P.U.A)


On Wed, Mar 29, 2023 at 5:59 PM gabriel.busnot--- via gem5-users <
gem5-users@gem5.org> wrote:

> Hi Karim,
>
> Can you be more specific about what you are trying to achieve for us to
> provide accurate answers?
>
> You seem to be really focused on the transport and not so much on the
> coherency protocol. In that case, I recommend using the garnet standalone
> protocol:
>
>-
>
>https://www.gem5.org/documentation/general_docs/ruby/Garnet_standalone/
>-
>
>
>
> https://www.gem5.org/documentation/general_docs/ruby/garnet_synthetic_traffic/
>
> Then check what Garnet is natively capable of
>
>-
>
>https://www.gem5.org/documentation/general_docs/ruby/heterogarnet/
>
> And if that does not work for you, then you need to hack the model to
> bring your features in. For instance, you can modify the garnet standalone
> protocol to inject traffic on different vnets but it is up to you to define
> how that should happen.
>
> Regards,
>
> Gabriel
> ___
> gem5-users mailing list -- gem5-users@gem5.org
> To unsubscribe send an email to gem5-users-le...@gem5.org
>
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org


[gem5-users] Gem5 - ruby - garnet3.0

2023-03-29 Thread Karim Soliman via gem5-users
Hey everyone.

For research purposes, I need to inject on purpose the flits into a certain
virtual network, is that possible?

Best Regards,
*Eng. Karim Soliman*
Teaching Assistant
Computer Engineering Department
Pharos University in Alexandria (P.U.A)
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org


[gem5-users] Gem5 - ganret3.0 - Mesh_XY - Virtual Networks - Virtual Channels buffers

2023-03-27 Thread Karim Soliman via gem5-users
Hey everyone,
For learning purposes, I'm trying to understand what's the virtual networks
inside gem5/garnet3.0 - I'm working with Mesh_XY topology configurations.
I found that inside garnet3.0 there are 5 virtual networks and in the file
*mem/ruby/network/Network.cc* I managed to print the count of the virtual
networks, and their names
The following is terminal output, the line print the size of the
vector *m_vnet_type_names
*and the following line are the names of these virtual networks.
[image: image.png]
however, when i tried to reduce the number of the virtual networks to be
less than 5 inside the configuration file *gem5/configs/ruby/Ruby.py* - by
setting the following value to any number less than 5
ruby.network.number_of_virtual_networks
It generate fatal error when simulating from
*build/NULL/mem/ruby/network/Network.cc:212: fatal: fatal condition
network_num >= m_virtual_networks occurred: Network id is out of range*
I'm aware that garnet3.0 has 3 different types of packets, request,
forward, and response. So if each one of these types uses one of the
virtual networks, what's the use of the other two?
I have output during the simulation the route virtual network used in
routing by printing the following variable route.vnet in
file mem/ruby/network/garnet/RoutingUnit.cc inside function
int RoutingUnit::outportComputeXY(RouteInfo route, int inport, PortDirection
inport_dirn)
and only i can find virtual networks with IDs 2,3 and 4 - i can't find 0 or
1 in route.vnet.

*My question is, what is a virtual network? and each virtual network used
to route only one packet type?*

*And another question, what's the buffer default size inside each virtual
channel? How can I modify the size of the buffer? *


Best Regards,
*Eng. Karim Soliman*
Teaching Assistant
Computer Engineering Department
Pharos University in Alexandria (P.U.A)
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org


[gem5-users] Re: Gem5 - garnet 3.0 - Mesh_XY - Deadlock

2023-03-25 Thread Karim Soliman via gem5-users
Yes, please can you help me to modify the files into src/mem/ruby/
as I understand till now, inside garnet 3.0 we have 3 types of
messages/classes

   - requests
   - forward
   - response.

Each one of these classes has its own virtual network separated from the
other classes.

   - requests, and forward are control packets and with size 8 bytes - and
   they use virtual network 0 and 1 (1-flit) size.
   - responses are considered as data packets with size = 72 bytes and
   using virtual network 2 (5-flit) size.

So, according to this structure, deadlock may never happen, how can I force
all the three classes to use only one virtual channel ?

Best Regards,
*Eng. Karim Soliman*
Teaching Assistant
Computer Engineering Department
Pharos University in Alexandria (P.U.A)


On Sat, Mar 25, 2023 at 4:00 PM Srikant Bharadwaj 
wrote:

> Hi Karim,
>
> The virtual network is the protocol level sub network. The virtual
> channels indicate the number of parallel buffer streams in each virtual
> network. To achieve a protocol deadlock you will have to set a single
> virtual network and then force the different types of messages (request,
> response, etc.) to go through the single virtual network.
>
> For changing the number of virtual networks, you can modify the quantity
> in configs/Network.py
> Forcing the different messages to take that virtual network requires
> changes in the protocol file in src/mem/ruby/ files.
>
> Let me know if you have any questions about changing them .
>
> Srikant
>
> On Sat, Mar 25, 2023 at 12:15 AM Karim Soliman via gem5-users <
> gem5-users@gem5.org> wrote:
>
>> Hey everyone,
>> For learning purposes, I'm trying to understand the deadlock and virtual
>> channels, so in gem5/garnet 3.0 in file
>> mem/ruby/network/garnet/InputUnit.cc
>> I have tried to output the following:
>> std::cout << " - VCs " << m_router->get_num_vcs() << " Vnetworks: " <<
>> m_router->get_num_vnets() << " VCs per Vnet: " << m_router->
>> get_vc_per_vnet() <<  " - route.vnet: " << route.vnet <<  std::endl;
>> Using Mesh_XY topology to inspect the variables.
>> I'm also used the options –-vcs-per-vnet and –-inj-vnet
>>
>> The following is my simulation command:
>> sudo build/NULL/gem5.debug configs/example/garnet_synth_traffic.py
>> --network=garnet --topology=Mesh_XY --mesh-rows=4 --num-cpus=16
>> --num-dirs=16 --sim-cycles=500 --injectionrate=0.2
>> --synthetic=uniform_random --vcs-per-vnet=1 --inj-vnet=0
>>
>> the variables output are
>> m_router->get_num_vcs() = 5
>> m_router->get_num_vnets() = 5
>> m_router->get_vc_per_vnet = 1
>>
>> My questions are, Why is the output 5 virtual channels? and what's the
>> virtual network?
>> Also, I'm trying to force the simulation to get into deadlock by
>> increasing the injectinorate and always using only 1 virtual channel per
>> link.
>> but the simulation never went to a deadlock, why? I'm using only one
>> virtual channel.
>>
>>
>> Best Regards,
>> *Eng. Karim Soliman*
>> Teaching Assistant
>> Computer Engineering Department
>> Pharos University in Alexandria (P.U.A)
>> ___
>> gem5-users mailing list -- gem5-users@gem5.org
>> To unsubscribe send an email to gem5-users-le...@gem5.org
>>
>
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org


[gem5-users] Gem5 - garnet 3.0 - Mesh_XY - Deadlock

2023-03-25 Thread Karim Soliman via gem5-users
Hey everyone,
For learning purposes, I'm trying to understand the deadlock and virtual
channels, so in gem5/garnet 3.0 in file
mem/ruby/network/garnet/InputUnit.cc
I have tried to output the following:
std::cout << " - VCs " << m_router->get_num_vcs() << " Vnetworks: " <<
m_router->get_num_vnets() << " VCs per Vnet: " << m_router->get_vc_per_vnet()
<<  " - route.vnet: " << route.vnet <<  std::endl;
Using Mesh_XY topology to inspect the variables.
I'm also used the options –-vcs-per-vnet and –-inj-vnet

The following is my simulation command:
sudo build/NULL/gem5.debug configs/example/garnet_synth_traffic.py
--network=garnet --topology=Mesh_XY --mesh-rows=4 --num-cpus=16
--num-dirs=16 --sim-cycles=500 --injectionrate=0.2
--synthetic=uniform_random --vcs-per-vnet=1 --inj-vnet=0

the variables output are
m_router->get_num_vcs() = 5
m_router->get_num_vnets() = 5
m_router->get_vc_per_vnet = 1

My questions are, Why is the output 5 virtual channels? and what's the
virtual network?
Also, I'm trying to force the simulation to get into deadlock by increasing
the injectinorate and always using only 1 virtual channel per link.
but the simulation never went to a deadlock, why? I'm using only one
virtual channel.


Best Regards,
*Eng. Karim Soliman*
Teaching Assistant
Computer Engineering Department
Pharos University in Alexandria (P.U.A)
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org


[gem5-users] Re: GEM5 - Garnet - Mesh_XY

2023-03-20 Thread Karim Soliman via gem5-users
inside file *mem/ruby/network/garnet/flit.cc*
I found this function that can print out the flit data during the
simulation.
But I don't know how to call it during the simulation.

// Flit can be printed out for debugging purposes
void
flit::print(std::ostream& out) const
{
out << "[flit:: ";
out << "PacketId=" << m_packet_id << " ";
out << "Id=" << m_id << " ";
out << "Type=" << m_type << " ";
out << "Size=" << m_size << " ";
out << "Vnet=" << m_vnet << " ";
out << "VC=" << m_vc << " ";
out << "Src NI=" << m_route.src_ni << " ";
out << "Src Router=" << m_route.src_router << " ";
out << "Dest NI=" << m_route.dest_ni << " ";
out << "Dest Router=" << m_route.dest_router << " ";
out << "Set Time=" << m_time << " ";
out << "Width=" << m_width<< " ";
out << "]";
}

Best Regards,
*Eng. Karim Soliman*
Teaching Assistant
Computer Engineering Department
Pharos University in Alexandria (P.U.A)


On Tue, Mar 21, 2023 at 9:17 AM Karim Soliman 
wrote:

> Yes, I understand that. DPRINTF and std::cout work fine with me too.
> But i'm sorry, my question wasn't about using DPRINTF, I already used it
> before and it worked fine. My question is about the flit inside the Mesh_XY
> routing, i want to debug and print the flits or packets to trace it during
> the simulation.
> function int RoutingUnit::outportComputeXY(RouteInfo route, int inport,
> PortDirection inport_dirn)
> inside *mem/ruby/network/garnet/RoutingUnit.cc*, doesn't mention anything
> about the flits or packets. The route variable has the source and
> destination information and the network interface, i want to get the flit
> or the packet ID during the simulation - I tried to import #include
> "mem/ruby/network/garnet/flit.hh"
> But I still can't see the flit ID or Packet ID. I just want to trace each
> packet or flit during the simulation.
>
> Best Regards,
> *Eng. Karim Soliman*
> Teaching Assistant
> Computer Engineering Department
> Pharos University in Alexandria (P.U.A)
>
>
> On Tue, Mar 21, 2023 at 2:56 AM atul.21csz0013--- via gem5-users <
> gem5-users@gem5.org> wrote:
>
>> Did you run at .debug mode while using Dprintf?
>>
>> Also, I think std::cout will also work for printing.
>>
>> regards
>>
>> Atul
>> ___
>> gem5-users mailing list -- gem5-users@gem5.org
>> To unsubscribe send an email to gem5-users-le...@gem5.org
>>
>
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org


[gem5-users] Re: GEM5 - Garnet - Mesh_XY

2023-03-20 Thread Karim Soliman via gem5-users
Yes, I understand that. DPRINTF and std::cout work fine with me too.
But i'm sorry, my question wasn't about using DPRINTF, I already used it
before and it worked fine. My question is about the flit inside the Mesh_XY
routing, i want to debug and print the flits or packets to trace it during
the simulation.
function int RoutingUnit::outportComputeXY(RouteInfo route, int inport,
PortDirection inport_dirn)
inside *mem/ruby/network/garnet/RoutingUnit.cc*, doesn't mention anything
about the flits or packets. The route variable has the source and
destination information and the network interface, i want to get the flit
or the packet ID during the simulation - I tried to import #include
"mem/ruby/network/garnet/flit.hh"
But I still can't see the flit ID or Packet ID. I just want to trace each
packet or flit during the simulation.

Best Regards,
*Eng. Karim Soliman*
Teaching Assistant
Computer Engineering Department
Pharos University in Alexandria (P.U.A)


On Tue, Mar 21, 2023 at 2:56 AM atul.21csz0013--- via gem5-users <
gem5-users@gem5.org> wrote:

> Did you run at .debug mode while using Dprintf?
>
> Also, I think std::cout will also work for printing.
>
> regards
>
> Atul
> ___
> gem5-users mailing list -- gem5-users@gem5.org
> To unsubscribe send an email to gem5-users-le...@gem5.org
>
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org


[gem5-users] GEM5 - Garnet - Mesh_XY

2023-03-20 Thread Karim Soliman via gem5-users
Hey everyone,
for learning purposes, I'm trying to print out the packets or flits
information being routed inside the Mexh_XY routing algorithm.
inside file *"mem/ruby/network/garnet/RoutingUnit.cc" *I tried to *DPRINTF *but
it did not work.
one more thing, inside the Mesh_XY routing algorithm, what happens when the
message is received at the destination, in the Mesh_XY function  just the
direction for the routing.
Where can I check that a packet / message has been delivered to its
destination.



Best Regards,
*Eng. Karim Soliman*
Teaching Assistant
Computer Engineering Department
Pharos University in Alexandria (P.U.A)
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org


[gem5-users] Re: gem5 / garnet / simple custom routing

2023-03-15 Thread Karim Soliman via gem5-users
Thank you so much for your time and help.

Best Regards,
*Eng. Karim Soliman*
Teaching Assistant
Computer Engineering Department
Pharos University in Alexandria (P.U.A)


On Tue, Mar 14, 2023 at 4:17 PM gabriel.busnot--- via gem5-users <
gem5-users@gem5.org> wrote:

> When getting a segfault, you want to run the simulation in a debugger to
> know where it happens. Enabling the --with-asan --with-ubsan flags on scons
> can also help a lot when the segmentation fault occurs at a different place
> than the bug location in the code.
>
> Gabriel
> ___
> gem5-users mailing list -- gem5-users@gem5.org
> To unsubscribe send an email to gem5-users-le...@gem5.org
>
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org


[gem5-users] Re: gem5 / garnet / simple custom routing

2023-03-13 Thread Karim Soliman via gem5-users
Yes, when I simulate the topology with the default weight-based routing
algorithm it's working fine.
and the simulation ends when the network tester completes simCycles
successfully.

Actually I can't tell exactly when the segmentation fault happens, but it's
happening the moment when I hit the simulation command.
one more thing i noticed, that the two maps (tables) are not with the same
indices for the entries.
When I tried to print the same maps (tables) for Mech_XY the routing tables
indices matched.



Best Regards,
*Eng. Karim Soliman*
Teaching Assistant
Computer Engineering Department
Pharos University in Alexandria (P.U.A)


On Mon, Mar 13, 2023 at 3:32 PM gabriel.busnot--- via gem5-users <
gem5-users@gem5.org> wrote:

> Hi Karim,
>
> Where does the segfault happen? Have you tried your topology with the
> default weight-based routing algorithm?
>
> Regards,
>
> Gabriel
> ___
> gem5-users mailing list -- gem5-users@gem5.org
> To unsubscribe send an email to gem5-users-le...@gem5.org
>
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org


[gem5-users] gem5 / garnet / simple custom routing

2023-03-12 Thread Karim Soliman via gem5-users
Hey everyone, for learning and researching purposes I'm trying to build a
simple custom routing algorithm in gem5/garnet between only two routers.
And use the custom routing algorithm in simulation command
But always i'm getting "Segmentation fault"

The following diagram represents what I'm trying to simulate.
[image: TwoRoutersSimple.jpg]


The names of each router are"routers0", "routers1" respectively.

The following is the full simulation command I'm trying to execute
sudo build/NULL/gem5.debug configs/example/garnet_synth_traffic.py
--injectionrate=0.02 --synthetic=uniform_random --network=garnet
--num-cpus=2 --num-dirs=2 --topology=TRouters --sim-cycles=1000
--routing-algorithm=2

My routing is very simple, and i have tried to learn from the Mesh_XY
routing and imitate it, and modified the following function "int RoutingUnit
::outportComputeCustom(RouteInfo route, int inport, PortDirection
inport_dirn)" in file *src/mem/ruby/network/garnet/RoutingUnit.cc*
The following is my custom routing function

int RoutingUnit::outportComputeCustom(RouteInfo route, int inport,
PortDirection inport_dirn) {
PortDirection outport_dirn = "Unknown";
if(route.dest_router == 0)
{
std::cout << "Destination Router: 0" << std::endl;
outport_dirn = "routers0";
}
else
{
std::cout << "Destination Router: 1" << std::endl;
outport_dirn = "routers1";
}

return m_outports_dirn2idx[outport_dirn];
}

And I have configured a python script that will create the network with all
nodes, internal links, external links, and routers.

Each time I tried to run the simulation the output was "Segmentation fault".

with some investigation into the code, i found that there are two built in
maps attached to each router, m_outports_dirn2idx and m_outports_idx2dirn
I iterated over the previous maps, and the following is the output for
*routers1 *
*Map from dir to index*
Local   1
routers0  0
routers1  2
*Map from index to dir*
0 Local
1 Local
2 routers1

If someone has some knowledge about garnet, I hope you can help me out !

Best Regards,
*Eng. Karim Soliman*
Teaching Assistant
Computer Engineering Department
Pharos University in Alexandria (P.U.A)
from m5.params import *
from m5.objects import *

from common import FileSystemConfig

from topologies.BaseTopology import SimpleTopology


class TRouters(SimpleTopology):
description = "Two Routers Simple topology"

def __init__(self, controllers):
self.nodes = controllers

def makeTopology(self, options, network, IntLink, ExtLink, Router):
nodes = self.nodes

num_routers = options.num_cpus

link_latency = options.link_latency
router_latency = options.router_latency


# External Code -- Ceating two routers only working in different two time dmains

 # create the routers and configure the routers
routers = [
Router(router_id = i, _name="R_"+str(i), latency = router_latency)
for i in range(num_routers)
]
network.routers = routers

for router in routers:
print(f"Router [{router.router_id}]: {router._name}")

# get the count of the controls per router and the remainder controls

cntrls_per_router, remainder = divmod(len(nodes), num_routers)

network_nodes = []
remainder_nodes = []

for node_index in range(len(nodes)):
if node_index < (len(nodes) - remainder):
network_nodes.append(nodes[node_index])
else:
remainder_nodes.append(nodes[node_index])


# create the External Links and configure the links 
# external links must be connected to nodes aka controllers

link_count = 0

ext_links = []
for (i, n) in enumerate(network_nodes):
cntrl_level, router_id = divmod(i, num_routers)
assert cntrl_level < cntrls_per_router
ext_links.append(ExtLink(
link_id = link_count,
ext_node = n,
int_node = routers[router_id],
latency = link_latency
))
link_count += 1

network.ext_links = ext_links
# create the Internal Links and configure the links
L0 = IntLink(
link_id = link_count,
latency = link_latency,
src_node = routers[0],
dst_node = routers[1],
src_outport = "routers0",
dst_inport = "routers1",
weight = 1
)
print(f"{routers[0]} --> {routers[1]}")
# update link_count for the next link_id
link_count += 1

L1 = IntLink(
link_id = link_count,
latency = link_latency,
src_node = routers[1],
dst_node = routers[0],
   

[gem5-users] garnet - garnet synthetic traffic - Mesh_XY routing algorithm

2023-03-08 Thread Karim Soliman via gem5-users
Hi, for my research I'm trying to implement a custom routing algorithm in
gem5/garnet.
Someone from the mailing list recommended that I should go for the Mexh_XY
routing algorithm to understand how it's working.

The mesh topology i'm using contains only 4 cpus and 4 dirs and number of
mesh rows is 2, and the routing-algorithm option is set to 1

here is the full simulation command i'm using

*sudo build/NULL/gem5.debug --debug-flags=RubyNetwork
configs/example/garnet_synth_traffic.py --num-cpus=4 --num-dirs=4
--mesh-rows=2 --network=garnet --routing-algorithm=1 --topology=Mesh_XY
--synthetic=uniform_random --injectionrate=0.1*

In the file mem/ruby/garnet/RoutingUnit.cc --> the function outportComputeXY

 int RoutingUnit::outportComputeXY(RouteInfo route, int inport,
PortDirection inport_dirn)

I'm trying to get some output during the simulation to understand the
routing table at each router and how the lookup table works.

The following is my code. I'm using a file to get the data during the
simulation
So, the file will print the following:

[RouterId] [DestinationRouter] [hops_x] [hops_y] [InportDirn] -->
[outport_dirn] [router_x, router_y] [des_x, dest_y].
and output the lookup table attached to the router.

std::ofstream myfile;
// open the file in appending mode
myfile.open ("routing_output.txt", std::ios_base::app);
myfile << m_router->get_id() << "\t" <<  route.dest_router << " |
hops_x: " << x_hops << " | hops_y: " << y_hops << "\t";
myfile << inport_dirn << " --> " << outport_dirn << "\t" <<
m_outports_dirn2idx[outport_dirn] << "\t" << my_x << ", " << my_y;
myfile << " --> "<< dest_x << ", " << dest_y << std::endl;
// iterate over the outports table map and write the data to the file.
std::map, int>::iterator it;
for(it = m_outports_dirn2idx.begin(); it != m_outports_dirn2idx.end();
it++)
{
myfile << it->first << "\t" << it->second << std::endl;
}
myfile.close();

Here are some samples of my output file and also the full txt file is
attached.

[image: image.png]

I don't really know how the packets are routed and also how the lookup
table works. also i can't imagine the connections between the nodes i tried
to draw a flow chart for each router
but some of the output data doesn't match the drawing -- like a packet from
router #2 will go east !!
[image: image.png]
Can anyone explain to me? or if there is any documentation I can check to
understand this.

Best Regards,
*Eng. Karim Soliman*
Teaching Assistant
Computer Engineering Department
Pharos University in Alexandria (P.U.A)
0   1 | hops_x: 1 | hops_y: 0   Local --> East  2   0, 0 --> 1, 0
East2
Local   1
North   3
1   2 | hops_x: 1 | hops_y: 1   Local --> West  2   1, 0 --> 0, 1
Local   1
North   3
West2
0   2 | hops_x: 0 | hops_y: 1   East --> North  3   0, 0 --> 0, 1
East2
Local   1
North   3
2   1 | hops_x: 1 | hops_y: 1   Local --> East  3   0, 1 --> 1, 0
East3
Local   1
South   2
3   1 | hops_x: 0 | hops_y: 1   West --> South  2   1, 1 --> 1, 0
Local   1
South   2
West3
1   3 | hops_x: 0 | hops_y: 1   Local --> North 3   1, 0 --> 1, 1
Local   1
North   3
West2
3   1 | hops_x: 0 | hops_y: 1   Local --> South 2   1, 1 --> 1, 0
Local   1
South   2
West3
0   1 | hops_x: 1 | hops_y: 0   Local --> East  2   0, 0 --> 1, 0
East2
Local   1
North   3
2   1 | hops_x: 1 | hops_y: 1   Local --> East  3   0, 1 --> 1, 0
East3
Local   1
South   2
3   1 | hops_x: 0 | hops_y: 1   West --> South  2   1, 1 --> 1, 0
Local   1
South   2
West3
0   3 | hops_x: 1 | hops_y: 1   Local --> East  2   0, 0 --> 1, 1
East2
Local   1
North   3
1   3 | hops_x: 0 | hops_y: 1   West --> North  3   1, 0 --> 1, 1
Local   1
North   3
West2
3   0 | hops_x: 1 | hops_y: 1   Local --> West  3   1, 1 --> 0, 0
Local   1
South   2
West3
2   0 | hops_x: 0 | hops_y: 1   East --> South  2   0, 1 --> 0, 0
East3
Local   1
South   2
0   3 | hops_x: 1 | hops_y: 1   Local --> East  2   0, 0 --> 1, 1
East2
Local   1
North   3
1   3 | hops_x: 0 | hops_y: 1   West --> North  3   1, 0 --> 1, 1
Local   1
North   3
West2
3   1 | hops_x: 0 | hops_y: 1   Local --> South 2   1, 1 --> 1, 0
Local   1
South   2
West3
3   0 | hops_x: 1 | hops_y: 1   Local --> West  3   1, 1 --> 0, 0
Local   1
South   2
West3
2   0 | hops_x: 0 | hops_y: 1   East --> South  2   0, 1 --> 0, 0
East3
Local   1
South   2
2   1 | hops_x: 1 | hops_y: 1   Local --> East  3   0, 1 --> 1, 0
East3
Local   1
South   2
3   1 | hops_x: 0 | hops_y: 1   West --> South  2   1, 1 --> 1, 0
Local   1
South   2
West3
2   0 | hops_x: 0 | hops_y: 1   Local --> South 2   0, 1 --> 0, 0
East3
Local   1
South   2
1   0 | hops_x: 1 | hops_y: 0   Loca

[gem5-users] Re: Garnet - Custom routing algorithm

2023-03-05 Thread Karim Soliman via gem5-users
Thanks, I'll check it out.

Best Regards,
*Eng. Karim Soliman*
Teaching Assistant
Computer Engineering Department
Pharos University in Alexandria (P.U.A)


On Fri, Mar 3, 2023 at 9:35 PM Krishna, Tushar 
wrote:

> Take a look at outportComputeXY for some reference ..
>
> Cheers,
> Tushar
>
> On Mar 3, 2023, at 2:45 AM, Karim Soliman via gem5-users <
> gem5-users@gem5.org> wrote:
>
> 
> Hey everyone,
> I'm trying to configure custom routing algorithm in gem5 garnet - NOC.
> I'm aware that i must implement the routing algorithm in C++ in the
> following function:
> int
> RoutingUnit::outportComputeCustom(RouteInfo route,
>  int inport,
>  PortDirection inport_dirn) { }
>
> located in file --> gem5/src/mem/ruby/network/garnet/RoutingUnit.cc
> and in simulation i should use the option --routing-algorithm=2 to use my
> custom routing algorithm.
>
> but i can't understand how to do it and what is the output? is it the id
> of the next router or what?
> I'm also using custom network topology not Mesh topology so how to
> identify the port numbers?
>
>
>
> Best Regards,
> *Eng. Karim Soliman*
> Teaching Assistant
> Computer Engineering Department
> Pharos University in Alexandria (P.U.A)
> ___
> gem5-users mailing list -- gem5-users@gem5.org
> To unsubscribe send an email to gem5-users-le...@gem5.org
>
>
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org


[gem5-users] Garnet - Custom routing algorithm

2023-03-02 Thread Karim Soliman via gem5-users
Hey everyone,
I'm trying to configure custom routing algorithm in gem5 garnet - NOC.
I'm aware that i must implement the routing algorithm in C++ in the
following function:
int
RoutingUnit::outportComputeCustom(RouteInfo route,
 int inport,
 PortDirection inport_dirn) { }

located in file --> gem5/src/mem/ruby/network/garnet/RoutingUnit.cc
and in simulation i should use the option --routing-algorithm=2 to use my
custom routing algorithm.

but i can't understand how to do it and what is the output? is it the id of
the next router or what?
I'm also using custom network topology not Mesh topology so how to identify
the port numbers?



Best Regards,
*Eng. Karim Soliman*
Teaching Assistant
Computer Engineering Department
Pharos University in Alexandria (P.U.A)
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org


[gem5-users] Re: Garnet Synthetic Traffic

2023-02-22 Thread Karim Soliman via gem5-users
Thanks for your reply, but i'm still learning GEM5, where i can find
the *injectPkt()
*function?

Best Regards,
*Eng. Karim Soliman*
Teaching Assistant
Computer Engineering Department
Pharos University in Alexandria (P.U.A)


On Thu, Feb 23, 2023 at 12:04 PM Srikant Bharadwaj 
wrote:

>  Hi,
> The number of directories should be a power of 2.
> Even if you are not connecting one of the directories to the rest of the
> network, it should be present in the system.
> If you only want three directories, you will also have to modify the
> injectPkt() function according to your synthetic traffic needs.
>
> Thanks,
> Srikant
>
> On Wed, Feb 22, 2023 at 7:09 PM Karim Soliman via gem5-users <
> gem5-users@gem5.org> wrote:
>
>> Hi gem5 users,
>>
>> for research purposes, i'm trying to model a ring topology using garnet
>> with only 3 routers but after writing the configuration file in python at
>> try to run the topology an error showed up
>> *i tried to model only two nodes ==> Works fine
>> *i tried to model four nodes ==> also works fine
>> *my configurations python file is attached if you want to check it.
>> [image: RingSimple.jpg]
>>
>> My configuration file is in ==>
>> *~/gem5/configs//topologies/TestSimple.py*
>>
>> My building command is ==> *build/NULL/gem5.debug
>> configs/example/garnet_synth_traffic.py --num-cpus=3 --num-dirs=3
>> --network=garnet --topology=TestSimple --sim-cycles=500
>> --synthetic=uniform_random --injectionrate=0.2*
>>
>> The error is
>>
>> *build/NULL/base/addr_range.hh:189: fatal: fatal condition !masks.empty()
>> && _intlv_match >= 1ULL << masks.size() occurred: Match value 2 does not
>> fit in 1 interleaving bits*
>>
>>
>> Best Regards,
>> *Eng. Karim Soliman*
>> Teaching Assistant
>> Computer Engineering Department
>> Pharos University in Alexandria (P.U.A)
>> ___
>> gem5-users mailing list -- gem5-users@gem5.org
>> To unsubscribe send an email to gem5-users-le...@gem5.org
>>
>
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org


[gem5-users] Garnet Synthetic Traffic

2023-02-22 Thread Karim Soliman via gem5-users
Hi gem5 users,

for research purposes, i'm trying to model a ring topology using garnet
with only 3 routers but after writing the configuration file in python at
try to run the topology an error showed up
*i tried to model only two nodes ==> Works fine
*i tried to model four nodes ==> also works fine
*my configurations python file is attached if you want to check it.
[image: RingSimple.jpg]

My configuration file is in ==> *~/gem5/configs//topologies/TestSimple.py*

My building command is ==> *build/NULL/gem5.debug
configs/example/garnet_synth_traffic.py --num-cpus=3 --num-dirs=3
--network=garnet --topology=TestSimple --sim-cycles=500
--synthetic=uniform_random --injectionrate=0.2*

The error is

*build/NULL/base/addr_range.hh:189: fatal: fatal condition !masks.empty()
&& _intlv_match >= 1ULL << masks.size() occurred: Match value 2 does not
fit in 1 interleaving bits*


Best Regards,
*Eng. Karim Soliman*
Teaching Assistant
Computer Engineering Department
Pharos University in Alexandria (P.U.A)
from m5.params import *
from m5.objects import *

from common import FileSystemConfig

from topologies.BaseTopology import SimpleTopology


class TestSimple(SimpleTopology):
description = "Test topology"

def __init__(self, controllers):
self.nodes = controllers

def makeTopology(self, options, network, IntLink, ExtLink, Router):
nodes = self.nodes

num_routers = options.num_cpus

link_latency = options.link_latency
router_latency = options.router_latency


# External Code -- Ceating two routers only working in different two time dmains

 # create the routers and configure the routers
routers = [
Router(router_id = i, latency = router_latency)
for i in range(num_routers)
]

# get the count of the controls per router and the remainder controls

cntrls_per_router, remainder = divmod(len(nodes), num_routers)

network_nodes = []
remainder_nodes = []

for node_index in range(len(nodes)):
if node_index < (len(nodes) - remainder):
network_nodes.append(nodes[node_index])
else:
remainder_nodes.append(nodes[node_index])


# create the External Links and configure the links 
# external links must be connected to nodes aka controllers

link_count = 0

ext_links = []
for (i, n) in enumerate(network_nodes):
cntrl_level, router_id = divmod(i, num_routers)
assert cntrl_level < cntrls_per_router
ext_links.append(ExtLink(
link_id = link_count,
ext_node = n,
int_node = routers[router_id],
latency = link_latency
))
link_count += 1

# create the Internal Links and configure the links
L0 = IntLink(
link_id = link_count,
latency = link_latency,
src_node = routers[0],
dst_node = routers[1],
weight = 1
)

# update link_count for the next link_id
link_count += 1

L1 = IntLink(
link_id = link_count,
latency = link_latency,
src_node = routers[1],
dst_node = routers[0],
weight = 1
)

# update link_count for the next link_id
link_count += 1

L2 = IntLink(
link_id = link_count,
latency = link_latency,
src_node = routers[0],
dst_node = routers[2],
weight = 1
)

# update link_count for the next link_id
link_count += 1

L3 = IntLink(
link_id = link_count,
latency = link_latency,
src_node = routers[2],
dst_node = routers[0],
weight = 1
)

# update link_count for the next link_id
link_count += 1

L4 = IntLink(
link_id = link_count,
latency = link_latency,
src_node = routers[2],
dst_node = routers[1],
weight = 1
)

# update link_count for the next link_id
link_count += 1

L5 = IntLink(
link_id = link_count,
latency = link_latency,
src_node = routers[1],
dst_node = routers[2],
weight = 1
)


# connect routers & internal links & external links to the routers
network.routers = routers
network.int_links = [L0, L1, L2, L3, L4, L5]
network.ext_links = ext_links

# DEBUG SOME OUTPUTS

print("==CONFIGS==")
print(f"# of cntrls_per_router = {cntrls_pe

[gem5-users] Re: 回复:Problem using HeteroGarnet / Garnet in simulation

2023-02-20 Thread Karim Soliman via gem5-users
it's working .. Thank you so much for your help

Best Regards,
*Eng. Karim Soliman*
Teaching Assistant
Computer Engineering Department
Pharos University in Alexandria (P.U.A)


On Mon, Feb 20, 2023 at 6:00 PM 赵子丰 via gem5-users 
wrote:

> hi Soliman,
> The parameter"simcycles" in the command line actually refers to "ticks"
> In ruby the default value of a cycle is 500 ticks. So simcycles=1000 equal
> to 1000 ticks or 2 cycles
>
> Zifeng Zhao
>
> --
>
> 该邮件从移动设备发送
>
>
> --原始邮件--
> 发件人:"gem5-users ";
> 发送时间:2023年2月20日(星期一) 下午5:42
> 收件人:"gem5-users" ;
> 抄送:"Karim Soliman ";
> 主题:[gem5-users] Problem using HeteroGarnet / Garnet in simulation
> ---
> I'm trying to learn GEM5 / HeteroGarnet in order to use it with some
> research work regarding NoC.
> i'm facing a problem that all the stat file is either *zero *or *nan*
>
> i followed this commands
> scons build/NULL/gem5.debug PROTOCOL=Garnet_standalone then i tried to
> perofrm my first simulation using this command
>
> and the following message appeared on the terminal
>
> *garnet_synth_traffic.py: error: argument --network: invalid choice:
> 'garnet2.0' (choose from 'simple', 'garnet')*
>
> so, i replaced *garnet2.0 *with *garnet *as it was deprecated with 3.0
> release / HeteroGarnet
> and the following stat.txt file generated
> with all the values and are either *zeros *or *nan* / No latencies, etc.
>
> Am i doing something wrong?
> and if there are any tutorials / materials i can learn from, i'll be
> thankful if you guide me to it.
>
> Thank you so much.
>
>
>
>
>
> Best Regards,
> *Eng. Karim Soliman*
> Teaching Assistant
> Computer Engineering Department
> Pharos University in Alexandria (P.U.A)
> ___
> gem5-users mailing list -- gem5-users@gem5.org
> To unsubscribe send an email to gem5-users-le...@gem5.org
>
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org