[gem5-users] Assistance Required: Gem5 Example Error on WSL Ubuntu 22.04

2023-09-12 Thread Ananth.PaiJ--- via gem5-users
Hello,

I hope this email finds you well. I am writing to seek assistance with a 
challenge I am facing while building Gem5 in the "util/tlm" directory on my WSL 
(Windows Subsystem for Linux) Ubuntu 22.04 environment.

Following the instructions provided in the Gem5 README file, I successfully 
executed the initial build commands:

scons build/ARM/gem5.opt
scons --with-cxx-config --without-python --without-tcmalloc USE_SYSTEMC=0 
build/ARM/libgem5_opt.so
Both commands worked perfectly, resulting in the successful building of Gem5 
and the creation of a library.

However, when I attempted to build the SConstruct in the "util/tlm" directory 
by running scons, I encountered an error message:
scons: Reading SConscript files ...
AttributeError: 'Values' object has no attribute 'duplicate_sources':
  File "/home/paija/gem5/util/tlm/SConstruct", line 69:
deps += SConscript('src/SConscript', variant_dir='build/tlm', 
exports='env', duplicate=GetOption('duplicate_sources'))
  File "/home/paija/.local/lib/python3.10/site-packages/SCons/Script/Main.py", 
line 490:
return getattr(OptionsParser.values, name)
  File 
"/home/paija/.local/lib/python3.10/site-packages/SCons/Script/SConsOptions.py", 
line 118:
return getattr(self.__dict__['__defaults__'], attr)

I have thoroughly reviewed the code and dependencies in the "util/tlm" 
directory, but I have not been successful in identifying the root cause of this 
issue. I have also followed the Gem5 README instructions to the best of my 
ability.

As a WSL Ubuntu 22.04 user, I understand that there might be certain nuances 
and configurations specific to this environment. Since Gem5 is a complex tool, 
I thought it would be best to seek guidance from experts like yourself who may 
have experience in addressing similar challenges.

I would greatly appreciate it if you could provide me with some insights, 
suggestions, or steps to troubleshoot and resolve this build issue. If there 
are specific logs or details you require, please let me know, and I will be 
happy to provide them.

Your assistance would be invaluable in helping me overcome this obstacle and 
continue my work with Gem5. Thank you in advance for your time and support.

I look forward to hearing from you soon.

Best regards,
Ananth Pai J (IFIN DES PTS TI EA SME)
ananth.p...@infineon.com

___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org


[gem5-users] Re: How to check content of Cache block

2023-09-12 Thread Bobby Bruce via gem5-users
Hey Sadhana,

First of i'll i'd read over the replacement policy documentation: 
https://www.gem5.org/documentation/general_docs/memory_system/replacement_policies/.

There are  lot of options to get information on a cache blog. Generally I think 
this Stackoverflow gives the most comprehensive options on this: 
https://stackoverflow.com/questions/64954075/how-to-output-the-data-in-the-cache-set-when-the-cache-is-replaced.
 The most important thing to to keep in mind in the `CacheBlk->data` will 
always get you the data in the cache block (it's a `uint8_t*`).

I don't know exactly what the options are here but they may be a debug flag 
that gets you what you want. For more information on using debug flags: 
https://www.gem5.org/documentation/learning_gem5/part2/debugging/.

Kind regards,
Bobby

--
Dr. Bobby R. Bruce
Room 3050,
Kemper Hall, UC Davis
Davis,
CA, 95616
 
web: https://www.bobbybruce.net

> On Sep 11, 2023, at 10:17 PM, Sadhana . via gem5-users  
> wrote:
> 
> Hello everyone,
>I am working in gem5 version 22.0, I wan to design a cache replacement 
> policy as a part of my research work, which evicts blocks based on the 
> contents i.e. considering a number of zeros and ones. Is there a possibility 
> to get the content of cache blok, in gem5?
> Thanks and Regards,
> Sadhana,
> Research Scholar-NITK,
> Dept. of Computer Science and Engineering
> .
> ___
> 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: Generate Multiple Trace Files for Multi-Threaded Workloads on FS

2023-09-12 Thread Jason Lowe-Power via gem5-users
Hi Abdelrahman,

Thank you for your questions on the mailing list. I will try to answer them
as best as I can.

- The trace CPU model was not designed to support multithreaded
applications or multiple cores. It was only tested with single-threaded
benchmarks in both SE and FS mode. Therefore, generating multiple trace
files for different threads/cores may not work as expected or may cause
errors.
- The O3 CPU is capable of traces, but I don't know if/how that will work
with multiple cores. You'll have to dig in and modify the code, most likely.
- Instructions should already have that information (i.e., the StaticInst
class). You can extend the trace formats as well by modifying that code.

Cheers,
Jason

On Fri, Sep 8, 2023 at 5:19 PM Abdelrahman S. Hussein via gem5-users <
gem5-users@gem5.org> wrote:

> Hi,
>
> I am seeking to generate multiple trace files for multi-threaded workloads
> that run in FS (Full-System simulation mode). My plan is to configure the
> simulation to have multiple cores, boot the image, run the workload, and
> record the traces of instructions that run on each core, such that each
> core/thread has its own trace file. My end goal is to have a number of
> trace files, each represent a core or a thread.
>
> Questions:
>
>- Is gem5 capable of generating multiple trace files?
>- I am checking the Trace CPU Model page on gem5
>
>website. It has this statement "The traces have been developed for
>single-threaded benchmarks simulating in both SE and FS mode". Does this
>mean generating multiple trace files for different threads/cores
>is unsupported by gem5?
>- Is the O3 CPU capable of recording such traces? The goal is to
>generate traces using an Out-of-Order superscalar CPU.
>- I may have to add a few more fields to the instruction class, such
>as a boolean variable to check if the instruction is a branch for example.
>which file(s) should I look at?
>
>
> Looking forward to your answer.
>
> Thanks,
> ~Abdelrahman
>
> --
>
> *Best,Abdelrahman Hussein*
>
> ___
> 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