Hi, The exact function is called generatePkt() and you can find it in src/cpu/testers/garnet_synthetic_traffic/GarnetSyntheticTraffic.cc https://github.com/gem5/gem5/blob/stable/src/cpu/testers/garnet_synthetic_traffic/GarnetSyntheticTraffic.cc
In line 199 above, for uniform random traffic, the code selects a random directory out of all the directories available. If you don't want to send any traffic to the fourth directory, you will need to reduce the range to only num_destination-2. Other traffic patterns such as tornado, bit complement, etc., are only defined when the number of cores/destinations is a power of 2. You should customize the code for other traffic patterns if you plan to use them for your evaluations. Thanks, Srikant On Wed, Feb 22, 2023 at 10:10 PM Karim Soliman <karim.soli...@pua.edu.eg> wrote: > 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 <srikan...@gmail.com> > 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=5000000 >>> --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