[gem5-users] About using Fast Models in GEM5

2023-05-22 Thread Qilin Zheng via gem5-users
I see there is a folder in src/arch/arm/fastmodel which contains Cortex-A76.
I am trying to simulate a multi-core ARM system with DRAMSim3 in SE mode.
I have finished to use the Arm core provided in the standard library, and now I 
would like to change the core to cortex-A76, but I do not know where to start.
May I ask if there is any tutorial to use setup and use the source file in this 
folder?
Regards
Qilin
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org


[gem5-users] Re: Persistent memory with gem5

2023-05-22 Thread Vincent Abraham via gem5-users
Thank you! This resolved the issue.

On Mon, May 22, 2023 at 4:55 PM Poremba, Matthew 
wrote:

> [AMD Official Use Only - General]
>
> Hi,
>
>
>
>
>
> By compiled as a module, the Linux `.config` file should have
> CONFIG_PMEM_xxx=y (i.e., not …=m).
>
>
>
> I did a quick test with the ubuntu20 disk image and kernel downloaded from
> the gem5 website.  I just added the `memmap=4G!12G` kernel parameter to
> FSConfig.py on the most recent develop branch of gem5 and was seeing a
> /dev/pmem0 device.  I didn’t touch the e820 table though. Maybe you could
> try with the latest gem5 resources and see if it works.
>
>
>
>
>
> -Matt
>
>
>
> *From:* Vincent Abraham 
> *Sent:* Monday, May 22, 2023 1:14 PM
> *To:* Poremba, Matthew 
> *Cc:* The gem5 Users mailing list 
> *Subject:* Re: [gem5-users] Persistent memory with gem5
>
>
>
> *Caution:* This message originated from an External Source. Use proper
> caution when opening attachments, clicking links, or responding.
>
>
>
> It would be great if I could get some help with this issue. It seems as if
> the simulated system is not able to find the PMEM driver for some reason.
> I'm using the linux 4.19.283 kernel version and the ubuntu 16.04 distro.
>
>
>
> On Sat, May 20, 2023 at 8:30 PM Vincent Abraham 
> wrote:
>
> Greetings,
>
> I tried passing the memmap command as a part of the cmdline variable as
> well. I just wrote memmap=4G!12G at the end of the string. Even by doing
> this, I'm still not able to find the pmem partition in /dev. As mentioned
> earlier, the e820 table is displayed correctly and I can see the persistent
> (type 12) region reserved but the pmem space is nowhere to be found. Is
> there anything else I'm missing?
>
>
>
> On Sat, May 20, 2023 at 4:19 PM Vincent Abraham 
> wrote:
>
> Greetings,
>
> Thanks for responding. Could you tell me what exactly do you mean by
> 'building it into the kernel directly'? I've changed the kernel
> configuration to reflect PMEM as a module and all of the other changes that
> are done in the website. I didn't pass the memmap argument yet, I just
> reserved memory with the X86E820() function in the gem5 configuration file
> and that did the job of the table displaying correctly. I'll try passing
> the command to the argument directly
>
>
>
> On Sat, 20 May 2023, 13:29 Poremba, Matthew, 
> wrote:
>
> [AMD Official Use Only - General]
>
>
>
> Hi,
>
>
>
>
>
> Are you building pmem as a module as described in the blog? (“ PMEM:
> Persistent memory block device support”)  If so, I would try building it
> into the kernel directly.  It is possibly looking for the module for your
> compiled kernel and does not find it on the disk image.
>
>
>
> You’ll also have to add “memmap=4G!12G” to cmdline variable in the
> makeLinuxX86System function in configs/common/FSConfig.py if you are using
> fs.py.
>
>
>
>
>
> -Matt
>
>
>
> *From:* Vincent Abraham via gem5-users 
> *Sent:* Saturday, May 20, 2023 9:14 AM
> *To:* gem5-users@gem5.org
> *Cc:* Vincent Abraham 
> *Subject:* [gem5-users] Persistent memory with gem5
>
>
>
> *Caution:* This message originated from an External Source. Use proper
> caution when opening attachments, clicking links, or responding.
>
>
>
> I  want to configure persistent memory in the RAM  (similar to
> https://pmem.io/blog/2016/02/how-to-emulate-persistent-memory/) and just
> run a basic FS setup (I'm running fs.py for now). I'm able to reserve the
> persistent memory space (with the X86E820Entry() function in the config
> file) and the e820 table is displayed correctly. But on booting up, I can't
> find any disk named pmem in /dev. Is there anything that I'm missing out
> here? Any help with this would be much appreciated.
>
>
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org


[gem5-users] Re: Persistent memory with gem5

2023-05-22 Thread Poremba, Matthew via gem5-users
[AMD Official Use Only - General]

Hi,


By compiled as a module, the Linux `.config` file should have CONFIG_PMEM_xxx=y 
(i.e., not …=m).

I did a quick test with the ubuntu20 disk image and kernel downloaded from the 
gem5 website.  I just added the `memmap=4G!12G` kernel parameter to FSConfig.py 
on the most recent develop branch of gem5 and was seeing a /dev/pmem0 device.  
I didn’t touch the e820 table though. Maybe you could try with the latest gem5 
resources and see if it works.


-Matt

From: Vincent Abraham 
Sent: Monday, May 22, 2023 1:14 PM
To: Poremba, Matthew 
Cc: The gem5 Users mailing list 
Subject: Re: [gem5-users] Persistent memory with gem5

Caution: This message originated from an External Source. Use proper caution 
when opening attachments, clicking links, or responding.

It would be great if I could get some help with this issue. It seems as if the 
simulated system is not able to find the PMEM driver for some reason. I'm using 
the linux 4.19.283 kernel version and the ubuntu 16.04 distro.

On Sat, May 20, 2023 at 8:30 PM Vincent Abraham 
mailto:vincent@gmail.com>> wrote:
Greetings,
I tried passing the memmap command as a part of the cmdline variable as well. I 
just wrote memmap=4G!12G at the end of the string. Even by doing this, I'm 
still not able to find the pmem partition in /dev. As mentioned earlier, the 
e820 table is displayed correctly and I can see the persistent (type 12) region 
reserved but the pmem space is nowhere to be found. Is there anything else I'm 
missing?

On Sat, May 20, 2023 at 4:19 PM Vincent Abraham 
mailto:vincent@gmail.com>> wrote:
Greetings,
Thanks for responding. Could you tell me what exactly do you mean by 'building 
it into the kernel directly'? I've changed the kernel configuration to reflect 
PMEM as a module and all of the other changes that are done in the website. I 
didn't pass the memmap argument yet, I just reserved memory with the X86E820() 
function in the gem5 configuration file and that did the job of the table 
displaying correctly. I'll try passing the command to the argument directly

On Sat, 20 May 2023, 13:29 Poremba, Matthew, 
mailto:matthew.pore...@amd.com>> wrote:

[AMD Official Use Only - General]

Hi,


Are you building pmem as a module as described in the blog? (“ PMEM: 
Persistent memory block device support”)  If so, I would try building it into 
the kernel directly.  It is possibly looking for the module for your compiled 
kernel and does not find it on the disk image.

You’ll also have to add “memmap=4G!12G” to cmdline variable in the 
makeLinuxX86System function in configs/common/FSConfig.py if you are using 
fs.py.


-Matt

From: Vincent Abraham via gem5-users 
mailto:gem5-users@gem5.org>>
Sent: Saturday, May 20, 2023 9:14 AM
To: gem5-users@gem5.org
Cc: Vincent Abraham mailto:vincent@gmail.com>>
Subject: [gem5-users] Persistent memory with gem5

Caution: This message originated from an External Source. Use proper caution 
when opening attachments, clicking links, or responding.

I  want to configure persistent memory in the RAM  (similar to 
https://pmem.io/blog/2016/02/how-to-emulate-persistent-memory/) and just run a 
basic FS setup (I'm running fs.py for now). I'm able to reserve the persistent 
memory space (with the X86E820Entry() function in the config file) and the e820 
table is displayed correctly. But on booting up, I can't find any disk named 
pmem in /dev. Is there anything that I'm missing out here? Any help with this 
would be much appreciated.
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org


[gem5-users] Re: Persistent memory with gem5

2023-05-22 Thread Vincent Abraham via gem5-users
It would be great if I could get some help with this issue. It seems as if
the simulated system is not able to find the PMEM driver for some reason.
I'm using the linux 4.19.283 kernel version and the ubuntu 16.04 distro.

On Sat, May 20, 2023 at 8:30 PM Vincent Abraham 
wrote:

> Greetings,
> I tried passing the memmap command as a part of the cmdline variable as
> well. I just wrote memmap=4G!12G at the end of the string. Even by doing
> this, I'm still not able to find the pmem partition in /dev. As mentioned
> earlier, the e820 table is displayed correctly and I can see the persistent
> (type 12) region reserved but the pmem space is nowhere to be found. Is
> there anything else I'm missing?
>
> On Sat, May 20, 2023 at 4:19 PM Vincent Abraham 
> wrote:
>
>> Greetings,
>> Thanks for responding. Could you tell me what exactly do you mean by
>> 'building it into the kernel directly'? I've changed the kernel
>> configuration to reflect PMEM as a module and all of the other changes that
>> are done in the website. I didn't pass the memmap argument yet, I just
>> reserved memory with the X86E820() function in the gem5 configuration file
>> and that did the job of the table displaying correctly. I'll try passing
>> the command to the argument directly
>>
>> On Sat, 20 May 2023, 13:29 Poremba, Matthew, 
>> wrote:
>>
>>> [AMD Official Use Only - General]
>>>
>>> Hi,
>>>
>>>
>>>
>>>
>>>
>>> Are you building pmem as a module as described in the blog? (“ PMEM:
>>> Persistent memory block device support”)  If so, I would try building it
>>> into the kernel directly.  It is possibly looking for the module for your
>>> compiled kernel and does not find it on the disk image.
>>>
>>>
>>>
>>> You’ll also have to add “memmap=4G!12G” to cmdline variable in the
>>> makeLinuxX86System function in configs/common/FSConfig.py if you are using
>>> fs.py.
>>>
>>>
>>>
>>>
>>>
>>> -Matt
>>>
>>>
>>>
>>> *From:* Vincent Abraham via gem5-users 
>>> *Sent:* Saturday, May 20, 2023 9:14 AM
>>> *To:* gem5-users@gem5.org
>>> *Cc:* Vincent Abraham 
>>> *Subject:* [gem5-users] Persistent memory with gem5
>>>
>>>
>>>
>>> *Caution:* This message originated from an External Source. Use proper
>>> caution when opening attachments, clicking links, or responding.
>>>
>>>
>>>
>>> I  want to configure persistent memory in the RAM  (similar to
>>> https://pmem.io/blog/2016/02/how-to-emulate-persistent-memory/) and
>>> just run a basic FS setup (I'm running fs.py for now). I'm able to
>>> reserve the persistent memory space (with the X86E820Entry() function in
>>> the config file) and the e820 table is displayed correctly. But on booting
>>> up, I can't find any disk named pmem in /dev. Is there anything that I'm
>>> missing out here? Any help with this would be much appreciated.
>>>
>>
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org


[gem5-users] How to create riscv mesi 3 level or ruby

2023-05-22 Thread Srikanta Chaitanya via gem5-users
Hi I am new to gem5, help in how to create riscv ruby mem model please help
me ..

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


[gem5-users] Re: AttributeError when using my own binary

2023-05-22 Thread Giacomo Travaglini via gem5-users
Thanks Ziyao,

Gem5 does not support macOS syscall emulation (nor it supports Mac-O loading).. 
You can still run a gem5 simulation on macOS but you should compile the binary 
for a linux target (I don’t know If it possible to cross-compile on the M1 to 
aarch64-linux, but you can definitely (cross)compile it on a different Linux 
machine)

Hope it helps

Giacomo

From: Ziyao Yan via gem5-users 
Date: Sunday, 21 May 2023 at 15:52
To: The gem5 Users mailing list 
Cc: Ziyao Yan 
Subject: [gem5-users] Re: AttributeError when using my own binary
Hi Giacomo,

Oh I'm sorry for that confusion. The FS_ruby.py is my modified script which I 
forgot to change the name, it's actually a SE workload and works fine with the 
Gem5 provided hello binary (gem5/tests/test-progs/hello/bin/arm/linux/hello). 
Here is the code snippet of that script

binary = os.path.join('gem5/assembly/test')

# Create a process for a simple "multi-threaded" application
process = Process()
# Set the command
# cmd is a list which begins with the executable (like argv)
process.cmd = [binary]
# Set the cpu to use the process as its workload and create thread contexts
for cpu in system.cpu:
cpu.workload = process
cpu.createThreads()

system.workload = SEWorkload.init_compatible(binary)


The gem5/assembly/test executes successfully on my local environment, and I'm 
using M1 arm64 cpu

Thanks,
Ziyao

On Sun, May 21, 2023 at 10:39 PM Giacomo Travaglini via gem5-users 
mailto:gem5-users@gem5.org>> wrote:
Hi,

If the command line is just

$ build/ARM_MESI/gem5.opt configs/FS_ruby.py,

Are you sure you are passing the object file to the Workload object? 
(_is_compatible_with is called with a None object)
Also the script is called FS ruby but you seem to have instantiated a SE 
workload (ArmSeWorkload).

There’s something wrong in the custom script…

Kind Regards

Giacomo

From: Ziyao Yan via gem5-users mailto:gem5-users@gem5.org>>
Date: Sunday, 21 May 2023 at 09:30
To: gem5-users@gem5.org 
mailto:gem5-users@gem5.org>>
Cc: Ziyao Yan mailto:ziyao...@umich.edu>>
Subject: [gem5-users] AttributeError when using my own binary
Hi all,

I'm currently working on ISA-level tasks and have generated my own binary using 
an assembler and linker. The binary executes successfully on my local 
environment (M1 ARM). However, when I attempt to run it on gem5, it fails to be 
recognized.

I used the following commands to assemble and link a simple "Hello World" 
assembly code (test.s):

$ as -arch arm64 -o test.o test.s
$ ld test.o -o test -l System -syslibroot `xcrun -sdk macosx --show-sdk-path` 
-e _start -arch arm64
$ ./test
Hello World!

While this works well on my local environment, I encounter an error when 
executing it in gem5 using the command:

$ build/ARM_MESI/gem5.opt configs/FS_ruby.py
The error message I receive is as follows:

AttributeError: 'NoneType' object has no attribute 'get_arch'
At:
  build/ARM_MESI/arch/arm/ArmSeWorkload.py(43): _is_compatible_with
  build/ARM_MESI/sim/Workload.py(91): 
  build/ARM_MESI/sim/Workload.py(91): find_compatible
  build/ARM_MESI/sim/Workload.py(100): init_compatible
  configs/FS_ruby.py(109): 
  build/ARM_MESI/python/m5/main.py(434): main

I would greatly appreciate it if anyone who has encountered a similar issue 
could provide some insights or guidance.

Thank you,
Ziyao

IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium. Thank you.
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to 
gem5-users-le...@gem5.org
IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium. Thank you.
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org