gem5-users@gem5.org

The gem5 Users mailing list

View all threads

Gem5 - Garnet - Full System

KS
Karim Soliman
Mon, Sep 18, 2023 12:06 PM

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)

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)
GB
gabriel.busnot@arteris.com
Mon, Sep 18, 2023 3:47 PM

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

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
KS
Karim Soliman
Tue, Sep 19, 2023 5:27 AM

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-leave@gem5.org

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-leave@gem5.org >