gem5-users@gem5.org

The gem5 Users mailing list

View all threads

Adding virtual networks to Garnet

AP
ASMITA PAL
Fri, Mar 22, 2024 9:34 PM

Hi,

I’m trying to add virtual networks to the existing Garnet protocol. Currently, it has 3 virtual networks for request, forward and response from what I see and I want to add three/etc. more virtual networks (lets say 3,4,5) to trigger additional traffic. For achieving this, I have added additional message buffers for each new vnet in src/mem/ruby/Garnet-standalone-cache.sm and src/mem/ruby/Garnet-standalone-dir.sm, updated the corresponding inports and outports for these message buffers and the enqueue/dequeue action for each of them. However, it doesn’t work, as in the dequeue operation fails. I have made additional changes to *.py files as well in configs to support the directory and cache controllers to the network. The other option I see doing this is adding more event types and changing the traffic to force it on the extra vnets. Is this a viable option? Or am I missing something in my first approach?

-Asmita

Hi, I’m trying to add virtual networks to the existing Garnet protocol. Currently, it has 3 virtual networks for request, forward and response from what I see and I want to add three/etc. more virtual networks (lets say 3,4,5) to trigger additional traffic. For achieving this, I have added additional message buffers for each new vnet in src/mem/ruby/Garnet-standalone-cache.sm and src/mem/ruby/Garnet-standalone-dir.sm, updated the corresponding inports and outports for these message buffers and the enqueue/dequeue action for each of them. However, it doesn’t work, as in the dequeue operation fails. I have made additional changes to *.py files as well in configs to support the directory and cache controllers to the network. The other option I see doing this is adding more event types and changing the traffic to force it on the extra vnets. Is this a viable option? Or am I missing something in my first approach? -Asmita
KT
Krishna, Tushar
Wed, Apr 3, 2024 10:31 PM

Make sure you update all the files listed here:
https://www.gem5.org/documentation/general_docs/ruby/Garnet_standalone/

And you’ll also have to update the synthetic traffic injector: https://www.gem5.org/documentation/general_docs/ruby/garnet_synthetic_traffic/

You can also take a look at other coherence protocols that have multiple vnets as reference.

Cheers,
Tushar
On Mar 22, 2024 at 5:35 PM -0400, ASMITA PAL via gem5-users gem5-users@gem5.org, wrote:
Hi,

I’m trying to add virtual networks to the existing Garnet protocol. Currently, it has 3 virtual networks for request, forward and response from what I see and I want to add three/etc. more virtual networks (lets say 3,4,5) to trigger additional traffic. For achieving this, I have added additional message buffers for each new vnet in src/mem/ruby/Garnet-standalone-cache.sm and src/mem/ruby/Garnet-standalone-dir.sm, updated the corresponding inports and outports for these message buffers and the enqueue/dequeue action for each of them. However, it doesn’t work, as in the dequeue operation fails. I have made additional changes to *.py files as well in configs to support the directory and cache controllers to the network. The other option I see doing this is adding more event types and changing the traffic to force it on the extra vnets. Is this a viable option? Or am I missing something in my first approach?

-Asmita

Make sure you update all the files listed here: https://www.gem5.org/documentation/general_docs/ruby/Garnet_standalone/ And you’ll also have to update the synthetic traffic injector: https://www.gem5.org/documentation/general_docs/ruby/garnet_synthetic_traffic/ You can also take a look at other coherence protocols that have multiple vnets as reference. Cheers, Tushar On Mar 22, 2024 at 5:35 PM -0400, ASMITA PAL via gem5-users <gem5-users@gem5.org>, wrote: Hi, I’m trying to add virtual networks to the existing Garnet protocol. Currently, it has 3 virtual networks for request, forward and response from what I see and I want to add three/etc. more virtual networks (lets say 3,4,5) to trigger additional traffic. For achieving this, I have added additional message buffers for each new vnet in src/mem/ruby/Garnet-standalone-cache.sm and src/mem/ruby/Garnet-standalone-dir.sm, updated the corresponding inports and outports for these message buffers and the enqueue/dequeue action for each of them. However, it doesn’t work, as in the dequeue operation fails. I have made additional changes to *.py files as well in configs to support the directory and cache controllers to the network. The other option I see doing this is adding more event types and changing the traffic to force it on the extra vnets. Is this a viable option? Or am I missing something in my first approach? -Asmita
AP
ASMITA PAL
Thu, Apr 4, 2024 10:54 PM

Hi,

Thank you for your response.
I looked at the code for other protocols. I might have missed something, but I mostly see more vnets used to either “to” or “fro” traffic and not replicated like I’m trying to do. I appreciate any insight you have in this matter.

I get an error message in a certain dequeue operation which looks like this:

gem5.debug: src/mem/ruby/network/MessageBuffer.cc:302: gem5::Tick gem5::ruby::MessageBuffer::dequeue(gem5::Tick, bool): Assertion `isReady(current_time)' failed.

For incorporating traffic on new vnets I have made the following changes :
In Garnet_standalone-cache.sm :

  • Added message buffers
  • Added corresponding out_port
  • Additional actions on every transition which looks like the screenshot below

[cid:image001.png@01DA86B6.9AE32C00]

Inside Garnet_standalone-dir.sm

Inside src/cpu/testers/garnet_synthetic_traffic/GarnetSyntheticTraffic.cc :

  • Added code for new injection request types for each new vnet

312    if (injReqType < 0 || injReqType > 5)
313    {
314        // randomly inject in any vnet
315        injReqType = random_mt.random(0, 5);
316    }
317    printf("Asmita - Injection request type %d \n", injReqType);
318    if (injReqType == 0 || injReqType == 1) {
319        // generate packet for virtual network 0
320        requestType = MemCmd::ReadReq;
321        req = std::make_shared<Request>(paddr, access_size, flags,
322                                        requestorId);
323    } else if (injReqType == 2 || injReqType == 3) {
324        // generate packet for virtual network 1
325        //printf("Asmita - Inside injection req 3\n");
326        requestType = MemCmd::ReadReq;
327        flags.set(Request::INST_FETCH);
328        req = std::make_shared<Request>(
329            0x0, access_size, flags, requestorId, 0x0, 0);
330        req->setPaddr(paddr);
331    } else {  // if (injReqType == 2)
332        // generate packet for virtual network 2
333        requestType = MemCmd::WriteReq;
334        req = std::make_shared<Request>(paddr, access_size, flags,
335                                        requestorId);
336    }

Apart from this I have also made small changes in the python files of configs/example/garnet_synth_traffic.py(line 115) to have choices of [-1… 5] and inside configs/ruby/Garnet_standalone.py to add new directory and cache controller and set ruby_system.network.number_of_virtual_networks to 6. However, I still keep getting a queuing error and I’m not sure what I’m missing here.
I haven’t made any changes to Garnet_standalone-msg.sm and Garnet_standalone.slicc.

-Asmita

From: Krishna, Tushar tushar@ece.gatech.edu
Date: Wednesday, April 3, 2024 at 5:31 PM
To: gem5-users@gem5.org gem5-users@gem5.org, The gem5 Users mailing list gem5-users@gem5.org
Cc: ASMITA PAL asmita.pal@wisc.edu
Subject: Re: [gem5-users] Adding virtual networks to Garnet
Make sure you update all the files listed here:
https://www.gem5.org/documentation/general_docs/ruby/Garnet_standalone/https://urldefense.com/v3/__https:/www.gem5.org/documentation/general_docs/ruby/Garnet_standalone/__;!!Mak6IKo!IQcbjhdJvU-J1le-1F7_FuGe_5Omw7bSserDXd8BnHVr2zj-rc2VZgXs1_yiXIscUcX4QmEuk1z55fIOJ4SRdV8$

And you’ll also have to update the synthetic traffic injector: https://www.gem5.org/documentation/general_docs/ruby/garnet_synthetic_traffic/https://urldefense.com/v3/__https:/www.gem5.org/documentation/general_docs/ruby/garnet_synthetic_traffic/__;!!Mak6IKo!IQcbjhdJvU-J1le-1F7_FuGe_5Omw7bSserDXd8BnHVr2zj-rc2VZgXs1_yiXIscUcX4QmEuk1z55fIOJ0tLokg$

You can also take a look at other coherence protocols that have multiple vnets as reference.

Cheers,
Tushar
On Mar 22, 2024 at 5:35 PM -0400, ASMITA PAL via gem5-users gem5-users@gem5.org, wrote:

Hi,

I’m trying to add virtual networks to the existing Garnet protocol. Currently, it has 3 virtual networks for request, forward and response from what I see and I want to add three/etc. more virtual networks (lets say 3,4,5) to trigger additional traffic. For achieving this, I have added additional message buffers for each new vnet in src/mem/ruby/Garnet-standalone-cache.sm and src/mem/ruby/Garnet-standalone-dir.sm, updated the corresponding inports and outports for these message buffers and the enqueue/dequeue action for each of them. However, it doesn’t work, as in the dequeue operation fails. I have made additional changes to *.py files as well in configs to support the directory and cache controllers to the network. The other option I see doing this is adding more event types and changing the traffic to force it on the extra vnets. Is this a viable option? Or am I missing something in my first approach?

-Asmita

Hi, Thank you for your response. I looked at the code for other protocols. I might have missed something, but I mostly see more vnets used to either “to” or “fro” traffic and not replicated like I’m trying to do. I appreciate any insight you have in this matter. I get an error message in a certain dequeue operation which looks like this: gem5.debug: src/mem/ruby/network/MessageBuffer.cc:302: gem5::Tick gem5::ruby::MessageBuffer::dequeue(gem5::Tick, bool): Assertion `isReady(current_time)' failed. For incorporating traffic on new vnets I have made the following changes : In Garnet_standalone-cache.sm : * Added message buffers * Added corresponding out_port * Additional actions on every transition which looks like the screenshot below [cid:image001.png@01DA86B6.9AE32C00] Inside Garnet_standalone-dir.sm * Added message buffers * Added exact dequeue action for each transition for additional in_ports [cid:image002.png@01DA86B7.588EC660] Inside src/cpu/testers/garnet_synthetic_traffic/GarnetSyntheticTraffic.cc : * Added code for new injection request types for each new vnet 312 if (injReqType < 0 || injReqType > 5) 313 { 314 // randomly inject in any vnet 315 injReqType = random_mt.random(0, 5); 316 } 317 printf("Asmita - Injection request type %d \n", injReqType); 318 if (injReqType == 0 || injReqType == 1) { 319 // generate packet for virtual network 0 320 requestType = MemCmd::ReadReq; 321 req = std::make_shared<Request>(paddr, access_size, flags, 322 requestorId); 323 } else if (injReqType == 2 || injReqType == 3) { 324 // generate packet for virtual network 1 325 //printf("Asmita - Inside injection req 3\n"); 326 requestType = MemCmd::ReadReq; 327 flags.set(Request::INST_FETCH); 328 req = std::make_shared<Request>( 329 0x0, access_size, flags, requestorId, 0x0, 0); 330 req->setPaddr(paddr); 331 } else { // if (injReqType == 2) 332 // generate packet for virtual network 2 333 requestType = MemCmd::WriteReq; 334 req = std::make_shared<Request>(paddr, access_size, flags, 335 requestorId); 336 } Apart from this I have also made small changes in the python files of configs/example/garnet_synth_traffic.py(line 115) to have choices of [-1… 5] and inside configs/ruby/Garnet_standalone.py to add new directory and cache controller and set ruby_system.network.number_of_virtual_networks to 6. However, I still keep getting a queuing error and I’m not sure what I’m missing here. I haven’t made any changes to Garnet_standalone-msg.sm and Garnet_standalone.slicc. -Asmita From: Krishna, Tushar <tushar@ece.gatech.edu> Date: Wednesday, April 3, 2024 at 5:31 PM To: gem5-users@gem5.org <gem5-users@gem5.org>, The gem5 Users mailing list <gem5-users@gem5.org> Cc: ASMITA PAL <asmita.pal@wisc.edu> Subject: Re: [gem5-users] Adding virtual networks to Garnet Make sure you update all the files listed here: https://www.gem5.org/documentation/general_docs/ruby/Garnet_standalone/<https://urldefense.com/v3/__https:/www.gem5.org/documentation/general_docs/ruby/Garnet_standalone/__;!!Mak6IKo!IQcbjhdJvU-J1le-1F7_FuGe_5Omw7bSserDXd8BnHVr2zj-rc2VZgXs1_yiXIscUcX4QmEuk1z55fIOJ4SRdV8$> And you’ll also have to update the synthetic traffic injector: https://www.gem5.org/documentation/general_docs/ruby/garnet_synthetic_traffic/<https://urldefense.com/v3/__https:/www.gem5.org/documentation/general_docs/ruby/garnet_synthetic_traffic/__;!!Mak6IKo!IQcbjhdJvU-J1le-1F7_FuGe_5Omw7bSserDXd8BnHVr2zj-rc2VZgXs1_yiXIscUcX4QmEuk1z55fIOJ0tLokg$> You can also take a look at other coherence protocols that have multiple vnets as reference. Cheers, Tushar On Mar 22, 2024 at 5:35 PM -0400, ASMITA PAL via gem5-users <gem5-users@gem5.org>, wrote: Hi, I’m trying to add virtual networks to the existing Garnet protocol. Currently, it has 3 virtual networks for request, forward and response from what I see and I want to add three/etc. more virtual networks (lets say 3,4,5) to trigger additional traffic. For achieving this, I have added additional message buffers for each new vnet in src/mem/ruby/Garnet-standalone-cache.sm and src/mem/ruby/Garnet-standalone-dir.sm, updated the corresponding inports and outports for these message buffers and the enqueue/dequeue action for each of them. However, it doesn’t work, as in the dequeue operation fails. I have made additional changes to *.py files as well in configs to support the directory and cache controllers to the network. The other option I see doing this is adding more event types and changing the traffic to force it on the extra vnets. Is this a viable option? Or am I missing something in my first approach? -Asmita