Re: [gem5-users] Memory models possibilities
Hi Rich, Some answers inline below. Cheers, Jason On Tue, May 29, 2018 at 4:59 PM Richard Brown wrote: > Hello everyone, > > I have been reading several posts in this forum and the gem5 > documentation, I am new with gem5, I have to work with memory subsystem > and I have already changed characteristics on main memory and cache memory > as train. However I have some questions that I have not answered reading > the forum: > > 1. gem5 has two memory models, i.e. classic and ruby. I need to change the > read and write latencies, to be asymmetric for modeling an NVM memory. I > know it is super easy in the classic model, but I also need to change the > coherence protocol to avoid writes in some cache level, i.e the LLC is > supposed to be an NVM so I do not want to always write on it. > > Is it possible to have asymmetric latencies with Ruby model? I tried it, > but I got an error when I simulate in full-system mode, I added asymmetric > latencies and stall the execution if the bank is busy, but many stalls > caused an error. In classic model I do not have problems but the cache > manage is fixed, I think it is a mess to change the cache manage to avoid > writes in one level. > > This should be straightforward. For caches, you can simply change the latencies used when enqueuing messages (e.g., https://gem5.googlesource.com/public/gem5/+/master/src/mem/protocol/MESI_Two_Level-L1cache.sm#526 ). If you're talking about the DRAMCtrl that might be a little harder. If you're trying to use a new memory technology as your main-memory you might want to write a new model (or use something like NVMain). > 2. I need to access cache line, I need to count the modified bits. Is it > possible to access cache line in both memory models? > Yes, it should be. It might not be super easy, but you should be able to do this in either the classic caches or in Ruby. > > 3. I have read papers where people use NVMain with gem5, is possible to > use it as cache memory only for LLC? L1 and L2 will be SRAM. > There isn't an easy way to use NVMain as a cache. You'll likely need to re-write the cache model to get something like this to work. Which, if you're going to be deeply changing the cache models, you'll likely have more luck using Ruby than the classic caches. > > 4. I have read some posts where people talk about an unified memory model > for gem5, are there people working on it? > Unified how? Between Ruby and classic? That won't happen anytime soon. There's a unified memory between the CPU and GPU, though... > > Thanks in advance for any help. > > -- > All the best >Rich > ___ > gem5-users mailing list > gem5-users@gem5.org > http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users ___ gem5-users mailing list gem5-users@gem5.org http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
[gem5-users] the instructions that are responsible for the number of access to the cache and energy consumption.
hi all, I need to do an analysis on the change of time of simulation of a parsec 3.0 application (ex: blackscholes) in gem5 ,armv8 big.LITTLE mode , and I do not know the statistics (the instructions of file stats.txt) which are responsbales on the change of execution time (for example the instructions that are responsible for the number of access to the cache, energy consumption ... etc) please if you have an idea help me. Thanks advance; com_. ___ gem5-users mailing list gem5-users@gem5.org http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
Re: [gem5-users] Failed to find stat 'system.bigCluster.clk_domain.clock' and others
Hi Yara, I'm not very familiar with the power modeling in gem5, but this seems like you found and then fixed a bug! We would really appreciate it if you contributed this change to the mainline. You can find a description of how to do this in the CONTRIBUTING document ( https://gem5.googlesource.com/public/gem5/+/master/CONTRIBUTING.md). If you have any questions, don't hesitate to ask! Jason On Fri, Jun 1, 2018 at 4:42 AM Yara Gowayed wrote: > I think I found a solution to this problem. It required changing something > in the src file gem5/src/sim/power/mathexpr_powermodel.cc. > > In the startup function the stats are being recorded from the statsList to > the stats_map which will be used by the power model to find the > corresponding value to each element in the power expressions. > The problem with the current implementation that it was taking a substring > from the name removing the basename which is the name of the object. So > when I try to access it from outside all objects it gives me an error. > > for (auto & i: Stats::statsList()) { >if (i->name.find(basename) == 0) { > // Add stats for this sim object and its child objects > stats_map[i->name.substr(basename.size())] = i; >} else if (i->name.find(".") == std::string::npos) { > // Add global stats (sim_seconds, for example) > stats_map[i->name] = i; >} > } > What I did and was compatible with what I need to achieve was replacing > the whole part with simply this > for (auto & i: Stats::statsList()) { > > stats_map[i->name] = i; > >} > > > On 23 May 2018 at 17:47, Yara Gowayed wrote: > >> Hi all >> >> I am currently working on power modeling using gem5 for arm bigLITTLE >> architecture. I am using the fs_power.py script already found in the gem5 >> repo but I wanted to change the dummy equations for static and dynamic >> power to more meaningful equations. >> The stats I need to do so are all found in stats.txt but when I try to >> formulate the equations it gives me "failed to find stat" error. >> >> I already can use some stats like dcache.overall_misses , >> dcache.overall_accesses, >> numCycles,voltage, dtb_walker_cache.overall_misses, icache.overall_misses >> , icache.overall_accesses. >> But when it comes to : >> system.clk_domain.clock,system.bigCluster.cpus0.iew.iewExecutedInsts,system.bigCluster.cpus2.iq.FU_type_0::IntAlu >> or any other instructions(MULT,DIV) it fails. >> >> I kind of have an intuition where the problem is, I went through the >> documentation of doxygen and all the stats that failed needs to be accessed >> from a certain object that I dont know. >> >> For example the stats::overall_misses should be accessed from BaseCache >> class and I did so in dcache.overall_misses but for the others I tried to >> do the same and it failed. >> >> Any clue how to be able to access the given stats? It doesn't have to be >> per core a sum of them will do the same job. >> >> Also I tried to do the calculations after the simulation ends using >> scripts that process data from the stats.txt and that worked, I just want >> it now to be online during the simulation. >> >> Thanks alot! >> Yara >> >> > ___ > gem5-users mailing list > gem5-users@gem5.org > http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users ___ gem5-users mailing list gem5-users@gem5.org http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
Re: [gem5-users] execution problem hello.c in architecture armv8 big.LITTLE
Hi Oscar, I tried this script and I think the same problem: #! / Bin / bash ls cd / home / ls cd root ls cd parsec ./Hello Here is the result obtained: bin dev home lost + found mnt proc run srv tmp var boot etc lib media root opt sbin sys usr / tmp / script: line 5: cd: root: No such file or directory / tmp / script: line 7: cd: parsec: No such file or directory / tmp / script: line 8: ./hello: No such file or directory here is my system.terminal file thanks advance. com_. 2018-06-01 10:31 GMT+02:00 Oscar Rosell : > Hi, > > The important line is this one: > > / tmp / script: line 3: cd: / home / root / parsec: No such file or > directory > > No way you can get the binary running if you cannot cd to the directory > where the binary is located. That has no relation with how the binary was > compiled. > > My intuition is that the directory is in fact "/root/parsec". It's just a > guess based on the absence of home directory for root user in my Ubuntu > (although I don't know which image you're using). To be sure just add an ls > to show the directory at each point like this: > > PARSEC_DIR = "/ home / root / parsec" > ls > cd /home/ > ls > cd root > ls > cd parse > ls > > > On 01/06/18 08:45, Ciro Santilli wrote: > >> This is not required, the best thing to do is to find what is the >> proper compatible cross compiler for the image: >> https://stackoverflow.com/questions/31929092/trying-to-run- >> a-cross-compiled-executable-on-target-device-fails-with- >> no-such-f/49993116#49993116 >> >> On Fri, Jun 1, 2018 at 6:34 AM, Tung Hoang >> wrote: >> >>> You may need “-static” for arm cross-compiling. >>> >>> /T >>> >>> On Thu, May 31, 2018 at 3:19 PM commerce _com >>> wrote: >>> Hi ciro, I'm sure the binary of the compilation is in the image on the path: / home / root / parsec but I did not understand how to solve this problem; Please. com_. 2018-05-31 23:02 GMT+02:00 Ciro Santilli : > Likely incompatible compiler using wrong dynamic loader, do "file > hello", see "interpreter /some/path", and check if "/some/path" is > present on guest. > > On Thu, May 31, 2018 at 9:33 PM, commerce _com < > commercecom...@gmail.com> > wrote: > >> Hi all, >> >> i need to run hello.c in an architecture armv8 big.LITTLE >> I compile hello_word.c by a crosscompiler here is the command: >> arm-linux-gnueabihf-gcc hello.c -o hello >> >> I added the binarie of the compilation to the linaro aarch64 image, >> with I >> generated this .rcs script as follows: >> #! / Bin / bash >> PARSEC_DIR = "/ home / root / parsec" >> cd $ PARSEC_DIR >> pwd >> ./Hello >> >> I typed the following command: >> >> sudo build / ARM / gem5.opt configs / example / arm / fs_bigLITTLE.py >> --kernel = / media / ali / ali / gem5-master / aarch-system-20180409 / >> binaries / vmlinux.vexpress_gem5_v1_64 --dtb = / media / ali / ali / >> gem5-master / aarch-system-20180409 / binaries / >> armv8_gem5_v1_big_little_2_2.dtb --bootscript = / home / ali / >> desktop >> / >> rcs_file / parsec_rcs / hello.rcS - caches >> >> the execution of the kernel it works normal but when it passes the >> stage of >> execution of the hello I found this result: >> >> / tmp / script: line 3: cd: / home / root / parsec: No such file or >> directory >> / >> / tmp / script: line 5: ./hello: No such file or directory >> >> despite I added the binary hello to the linaro image. >> >> please if you have an idea to solve the problem. >> >> here is my file system.terminal: >> >> thanks advance. >> >> com_. >> >> >> ___ >> gem5-users mailing list >> gem5-users@gem5.org >> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users >> > ___ > gem5-users mailing list > gem5-users@gem5.org > http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users > ___ gem5-users mailing list gem5-users@gem5.org http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users >>> ___ >> gem5-users mailing list >> gem5-users@gem5.org >> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users >> > > > > system.terminal Description: Binary data ___ gem5-users mailing list gem5-users@gem5.org http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
Re: [gem5-users] Failed to find stat 'system.bigCluster.clk_domain.clock' and others
I think I found a solution to this problem. It required changing something in the src file gem5/src/sim/power/mathexpr_powermodel.cc. In the startup function the stats are being recorded from the statsList to the stats_map which will be used by the power model to find the corresponding value to each element in the power expressions. The problem with the current implementation that it was taking a substring from the name removing the basename which is the name of the object. So when I try to access it from outside all objects it gives me an error. for (auto & i: Stats::statsList()) { if (i->name.find(basename) == 0) { // Add stats for this sim object and its child objects stats_map[i->name.substr(basename.size())] = i; } else if (i->name.find(".") == std::string::npos) { // Add global stats (sim_seconds, for example) stats_map[i->name] = i; } } What I did and was compatible with what I need to achieve was replacing the whole part with simply this for (auto & i: Stats::statsList()) { stats_map[i->name] = i; } On 23 May 2018 at 17:47, Yara Gowayed wrote: > Hi all > > I am currently working on power modeling using gem5 for arm bigLITTLE > architecture. I am using the fs_power.py script already found in the gem5 > repo but I wanted to change the dummy equations for static and dynamic > power to more meaningful equations. > The stats I need to do so are all found in stats.txt but when I try to > formulate the equations it gives me "failed to find stat" error. > > I already can use some stats like dcache.overall_misses , > dcache.overall_accesses, > numCycles,voltage, dtb_walker_cache.overall_misses, icache.overall_misses > , icache.overall_accesses. > But when it comes to : > system.clk_domain.clock,system.bigCluster.cpus0.iew.iewExecu > tedInsts,system.bigCluster.cpus2.iq.FU_type_0::IntAlu or any other > instructions(MULT,DIV) it fails. > > I kind of have an intuition where the problem is, I went through the > documentation of doxygen and all the stats that failed needs to be accessed > from a certain object that I dont know. > > For example the stats::overall_misses should be accessed from BaseCache > class and I did so in dcache.overall_misses but for the others I tried to > do the same and it failed. > > Any clue how to be able to access the given stats? It doesn't have to be > per core a sum of them will do the same job. > > Also I tried to do the calculations after the simulation ends using > scripts that process data from the stats.txt and that worked, I just want > it now to be online during the simulation. > > Thanks alot! > Yara > > ___ gem5-users mailing list gem5-users@gem5.org http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
Re: [gem5-users] execution problem hello.c in architecture armv8 big.LITTLE
Hi, The important line is this one: / tmp / script: line 3: cd: / home / root / parsec: No such file or directory No way you can get the binary running if you cannot cd to the directory where the binary is located. That has no relation with how the binary was compiled. My intuition is that the directory is in fact "/root/parsec". It's just a guess based on the absence of home directory for root user in my Ubuntu (although I don't know which image you're using). To be sure just add an ls to show the directory at each point like this: PARSEC_DIR = "/ home / root / parsec" ls cd /home/ ls cd root ls cd parse ls On 01/06/18 08:45, Ciro Santilli wrote: This is not required, the best thing to do is to find what is the proper compatible cross compiler for the image: https://stackoverflow.com/questions/31929092/trying-to-run-a-cross-compiled-executable-on-target-device-fails-with-no-such-f/49993116#49993116 On Fri, Jun 1, 2018 at 6:34 AM, Tung Hoang wrote: You may need “-static” for arm cross-compiling. /T On Thu, May 31, 2018 at 3:19 PM commerce _com wrote: Hi ciro, I'm sure the binary of the compilation is in the image on the path: / home / root / parsec but I did not understand how to solve this problem; Please. com_. 2018-05-31 23:02 GMT+02:00 Ciro Santilli : Likely incompatible compiler using wrong dynamic loader, do "file hello", see "interpreter /some/path", and check if "/some/path" is present on guest. On Thu, May 31, 2018 at 9:33 PM, commerce _com wrote: Hi all, i need to run hello.c in an architecture armv8 big.LITTLE I compile hello_word.c by a crosscompiler here is the command: arm-linux-gnueabihf-gcc hello.c -o hello I added the binarie of the compilation to the linaro aarch64 image, with I generated this .rcs script as follows: #! / Bin / bash PARSEC_DIR = "/ home / root / parsec" cd $ PARSEC_DIR pwd ./Hello I typed the following command: sudo build / ARM / gem5.opt configs / example / arm / fs_bigLITTLE.py --kernel = / media / ali / ali / gem5-master / aarch-system-20180409 / binaries / vmlinux.vexpress_gem5_v1_64 --dtb = / media / ali / ali / gem5-master / aarch-system-20180409 / binaries / armv8_gem5_v1_big_little_2_2.dtb --bootscript = / home / ali / desktop / rcs_file / parsec_rcs / hello.rcS - caches the execution of the kernel it works normal but when it passes the stage of execution of the hello I found this result: / tmp / script: line 3: cd: / home / root / parsec: No such file or directory / / tmp / script: line 5: ./hello: No such file or directory despite I added the binary hello to the linaro image. please if you have an idea to solve the problem. here is my file system.terminal: thanks advance. com_. ___ gem5-users mailing list gem5-users@gem5.org http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users ___ gem5-users mailing list gem5-users@gem5.org http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users ___ gem5-users mailing list gem5-users@gem5.org http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users ___ gem5-users mailing list gem5-users@gem5.org http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users ___ gem5-users mailing list gem5-users@gem5.org http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
[gem5-users] Assertion Failed in getVaddr()
Hi, I am running blackscholes benchmark in X86 system. My command is : build/X86/gem5.opt configs/example/fs.py –script=runscript.rcS --mem-type=DDR4_2400_8x8 --cpu-type=DerivO3CPU -I 1 --caches --l2cache --l1d_size=64kB --l1i_size=32kB --l2_size=2MB --l1d_assoc=2 --l1i_assoc=2 --l2_assoc=8 --cacheline_size=64 This is giving me following error: gem5.opt: build/X86/mem/request.hh:618: Addr Request::getVaddr() const: Assertion `privateFlags.isSet(VALID_VADDR)' failed. The patch of code in request.hh : Addr getVaddr() const { assert(privateFlags.isSet(VALID_VADDR)); return _vaddr; } Any suggestions will be helpful. Thanks, Riddhi ___ gem5-users mailing list gem5-users@gem5.org http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
Re: [gem5-users] execution problem hello.c in architecture armv8 big.LITTLE
This is not required, the best thing to do is to find what is the proper compatible cross compiler for the image: https://stackoverflow.com/questions/31929092/trying-to-run-a-cross-compiled-executable-on-target-device-fails-with-no-such-f/49993116#49993116 On Fri, Jun 1, 2018 at 6:34 AM, Tung Hoang wrote: > You may need “-static” for arm cross-compiling. > > /T > > On Thu, May 31, 2018 at 3:19 PM commerce _com > wrote: >> >> Hi ciro, >> >> I'm sure the binary of the compilation is in the image on the path: / >> home / root / parsec >> >> but I did not understand how to solve this problem; Please. >> >> >> com_. >> >> 2018-05-31 23:02 GMT+02:00 Ciro Santilli : >>> >>> Likely incompatible compiler using wrong dynamic loader, do "file >>> hello", see "interpreter /some/path", and check if "/some/path" is >>> present on guest. >>> >>> On Thu, May 31, 2018 at 9:33 PM, commerce _com >>> wrote: >>> > Hi all, >>> > >>> > i need to run hello.c in an architecture armv8 big.LITTLE >>> > I compile hello_word.c by a crosscompiler here is the command: >>> > arm-linux-gnueabihf-gcc hello.c -o hello >>> > >>> > I added the binarie of the compilation to the linaro aarch64 image, >>> > with I >>> > generated this .rcs script as follows: >>> > #! / Bin / bash >>> > PARSEC_DIR = "/ home / root / parsec" >>> > cd $ PARSEC_DIR >>> > pwd >>> > ./Hello >>> > >>> > I typed the following command: >>> > >>> > sudo build / ARM / gem5.opt configs / example / arm / fs_bigLITTLE.py >>> > --kernel = / media / ali / ali / gem5-master / aarch-system-20180409 / >>> > binaries / vmlinux.vexpress_gem5_v1_64 --dtb = / media / ali / ali / >>> > gem5-master / aarch-system-20180409 / binaries / >>> > armv8_gem5_v1_big_little_2_2.dtb --bootscript = / home / ali / desktop >>> > / >>> > rcs_file / parsec_rcs / hello.rcS - caches >>> > >>> > the execution of the kernel it works normal but when it passes the >>> > stage of >>> > execution of the hello I found this result: >>> > >>> > / tmp / script: line 3: cd: / home / root / parsec: No such file or >>> > directory >>> > / >>> > / tmp / script: line 5: ./hello: No such file or directory >>> > >>> > despite I added the binary hello to the linaro image. >>> > >>> > please if you have an idea to solve the problem. >>> > >>> > here is my file system.terminal: >>> > >>> > thanks advance. >>> > >>> > com_. >>> > >>> > >>> > ___ >>> > gem5-users mailing list >>> > gem5-users@gem5.org >>> > http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users >>> ___ >>> gem5-users mailing list >>> gem5-users@gem5.org >>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users >> >> >> ___ >> gem5-users mailing list >> gem5-users@gem5.org >> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users ___ gem5-users mailing list gem5-users@gem5.org http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
[gem5-users] Can we run memtestx86 on gem5 with dramsim2 memory?
Is it possible to run memtestx86 on gem5. I have already attached dramsim2 as memory type. That's not the issue. Main priority is to run memtestx86 on gem5. Thanks in advance. ___ gem5-users mailing list gem5-users@gem5.org http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
[gem5-users] How is addresses mapped between gem5 and dramsim2?
Sir/Ma'am, I have successfully integrated dramsim2 and gem5. Now I want to learn how memory/addresses are mapped between gem5 os( disk image in fs mode) and dramsim2 (memory used).Because addresses printed by dramsim2 in file memory controller. Cpp is not in league of that in OS by gem5 fs mode. ___ gem5-users mailing list gem5-users@gem5.org http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users