Re: [gem5-users] Instrumenting ROI in Syscall emulation mode

2019-06-13 Thread Victor Kariofillis
I found the solution. Besides dropping the flag when compiling the
microbenchmark as you said, I removed the same flag from the Makefile.x86
and recompiled. Also in the microbenchmark, I removed the incude of
m5_mmap.h and calling map_m5_mem() in main. Thanks Jason for the
suggestion.

On Thu, 13 Jun 2019 at 13:52, Victor Kariofillis 
wrote:

> Hi Jason,
>
> Sadly removing that flag didn't make a difference. I'm still getting an
> mmap warning (when running it with sudo). I also tried removing the flag
> (-DM5OP_ADDR=0x) from util/m5/Makefile.x86, but it made no
> difference. I'm gonna post my changes in case someone is interested.
>
> This is the microbenchmark.
> https://filebin.net/cb5jsu1fakpdo163/gem5_array.pdf?t=d6gmvy5e
>
> This are the instructions I'm following (heavily based on the blogpost)
> https://filebin.net/cb5jsu1fakpdo163/instructions.pdf?t=d6gmvy5e
>
> And finally these are the changes (diff) that I made in gem5 for
> implementing the pseudo instructions. (I know the pseudo instructions don't
> do anything currently. I'm just trying to get them to work before
> implementing any functionality.)
> https://filebin.net/cb5jsu1fakpdo163/diff.pdf?t=d6gmvy5e
>
> Thanks.
>
> On Thu, 13 Jun 2019 at 11:40, Jason Lowe-Power 
> wrote:
>
>> Hi Victor,
>>
>> Drop the -DM5OP_ADDR define when you're compiling. That will force the
>> m5ops to use the pseudo instruction implementation instead of the MMIO
>> implementation. MMIO is required when using KVM, but no other time.
>>
>> Cheers,
>> Jason
>>
>> On Wed, Jun 12, 2019 at 2:38 PM Victor Kariofillis <
>> vickariofil...@gmail.com> wrote:
>>
>>> Hi Andrea,
>>>
>>> I can't get my microbenchmark to run with gem5. If I execute it without
>>> sudo, I get a "Can't open /dev/mem: Permission denied". If I execute it
>>> with sudo on its own, it seems to finish fine. But when I want to execute
>>> it with gem5, I get a segfault.
>>>
>>> "warn: mmap: writing to shared mmap region is currently unsupported. The
>>> write succeeds on the target, but it will not be propagated to the host or
>>> shared mappings
>>> warn: mmap: failed to map file into host address space
>>> panic: Tried to read unmapped address 0x55ff.
>>> PC: 0x400879, Instr:   MOV_R_M : ld   rax, DS:[rax + r11]
>>> Memory Usage: 678516 KBytes
>>> Program aborted at tick 86427000"
>>>
>>> I built my microbenchmark like this:
>>>
>>> 1) gcc -O2 -DM5OP_ADDR=0x -Ipath/to/gem5/include -c
>>> gem5_array.cpp -o gem5_array.o
>>> 2) gcc gem5_array.o -o gem5_array path/to/gem5/util/m5/m5op_x86.o
>>> path/to/gem5/util/m5/m5_mmap.o
>>>
>>> I don't only want to get the stats for the ROI in the stats file. I'm
>>> using some debug flags, so in the output of gem5, I want to see only the
>>> printouts from inside the ROI. I'm not sure I would achieve that.
>>>
>>> Thanks,
>>> Victor
>>> ___
>>> 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] RISC-V DerivO3CPU: Assertion `atomicOpFunctor != NULL' failed

2019-06-13 Thread Hossein Golestani
Hi,

I'm using gem5 for simulation of cross-compiled RISC-V programs.

I receive the following error when using the DerivO3CPU model:
gem5.opt: build/RISCV/mem/request.hh:678: AtomicOpFunctor*
Request::getAtomicOpFunctor(): Assertion `atomicOpFunctor != NULL' failed.

I have used this command:
$GEM5/build/RISCV/gem5.opt --outdir=$OUTDIR \
$GEM5/configs/example/se.py \
--cpu-type=DerivO3CPU \
--l1d_size=64kB \
--l1i_size=16kB \
--l2_size=1MB \
--caches \
--l2cache \
--cmd=$BINARY --options="$OPTIONS"

If I fast-forward the beginning instructions of the program, I will receive
the exact same error at some point later.

Note that I have no issues with simulating this program with the
TimingSimpleCPU model.

I found this email (link
) in the
gem5 user emails archive, which says the O3 CPU model may have not been
tested with RISC-V. However I'd really appreciate any help to get around
this issue. I have started to work with gem5 for a few weeks, but I'm
willing to modify its code if necessary.

Thanks,
Hossein
___
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

[gem5-users] Why is there different results on the stats.txt output file when compared between gem5.perf of different computers?

2019-06-13 Thread Iago .
I am trying to verify computational load of an LQR code on my UAV project, to 
do so I am using gem5 to simulate different platforms where the code can run.
Trying to verify the reproducibility of the test I compiled gem5.perf which I'm 
using on two different ubuntu computers and when I run the LQR code on them the 
results are different, one ends the LQR binary within 251 simulated 
microseconds and the other within 230.
___
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Re: [gem5-users] Instrumenting ROI in Syscall emulation mode

2019-06-13 Thread Victor Kariofillis
Hi Jason,

Sadly removing that flag didn't make a difference. I'm still getting an
mmap warning (when running it with sudo). I also tried removing the flag
(-DM5OP_ADDR=0x) from util/m5/Makefile.x86, but it made no
difference. I'm gonna post my changes in case someone is interested.

This is the microbenchmark.
https://filebin.net/cb5jsu1fakpdo163/gem5_array.pdf?t=d6gmvy5e

This are the instructions I'm following (heavily based on the blogpost)
https://filebin.net/cb5jsu1fakpdo163/instructions.pdf?t=d6gmvy5e

And finally these are the changes (diff) that I made in gem5 for
implementing the pseudo instructions. (I know the pseudo instructions don't
do anything currently. I'm just trying to get them to work before
implementing any functionality.)
https://filebin.net/cb5jsu1fakpdo163/diff.pdf?t=d6gmvy5e

Thanks.

On Thu, 13 Jun 2019 at 11:40, Jason Lowe-Power  wrote:

> Hi Victor,
>
> Drop the -DM5OP_ADDR define when you're compiling. That will force the
> m5ops to use the pseudo instruction implementation instead of the MMIO
> implementation. MMIO is required when using KVM, but no other time.
>
> Cheers,
> Jason
>
> On Wed, Jun 12, 2019 at 2:38 PM Victor Kariofillis <
> vickariofil...@gmail.com> wrote:
>
>> Hi Andrea,
>>
>> I can't get my microbenchmark to run with gem5. If I execute it without
>> sudo, I get a "Can't open /dev/mem: Permission denied". If I execute it
>> with sudo on its own, it seems to finish fine. But when I want to execute
>> it with gem5, I get a segfault.
>>
>> "warn: mmap: writing to shared mmap region is currently unsupported. The
>> write succeeds on the target, but it will not be propagated to the host or
>> shared mappings
>> warn: mmap: failed to map file into host address space
>> panic: Tried to read unmapped address 0x55ff.
>> PC: 0x400879, Instr:   MOV_R_M : ld   rax, DS:[rax + r11]
>> Memory Usage: 678516 KBytes
>> Program aborted at tick 86427000"
>>
>> I built my microbenchmark like this:
>>
>> 1) gcc -O2 -DM5OP_ADDR=0x -Ipath/to/gem5/include -c
>> gem5_array.cpp -o gem5_array.o
>> 2) gcc gem5_array.o -o gem5_array path/to/gem5/util/m5/m5op_x86.o
>> path/to/gem5/util/m5/m5_mmap.o
>>
>> I don't only want to get the stats for the ROI in the stats file. I'm
>> using some debug flags, so in the output of gem5, I want to see only the
>> printouts from inside the ROI. I'm not sure I would achieve that.
>>
>> Thanks,
>> Victor
>> ___
>> 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

Re: [gem5-users] Instrumenting ROI in Syscall emulation mode

2019-06-13 Thread Jason Lowe-Power
Hi Victor,

Drop the -DM5OP_ADDR define when you're compiling. That will force the
m5ops to use the pseudo instruction implementation instead of the MMIO
implementation. MMIO is required when using KVM, but no other time.

Cheers,
Jason

On Wed, Jun 12, 2019 at 2:38 PM Victor Kariofillis 
wrote:

> Hi Andrea,
>
> I can't get my microbenchmark to run with gem5. If I execute it without
> sudo, I get a "Can't open /dev/mem: Permission denied". If I execute it
> with sudo on its own, it seems to finish fine. But when I want to execute
> it with gem5, I get a segfault.
>
> "warn: mmap: writing to shared mmap region is currently unsupported. The
> write succeeds on the target, but it will not be propagated to the host or
> shared mappings
> warn: mmap: failed to map file into host address space
> panic: Tried to read unmapped address 0x55ff.
> PC: 0x400879, Instr:   MOV_R_M : ld   rax, DS:[rax + r11]
> Memory Usage: 678516 KBytes
> Program aborted at tick 86427000"
>
> I built my microbenchmark like this:
>
> 1) gcc -O2 -DM5OP_ADDR=0x -Ipath/to/gem5/include -c gem5_array.cpp
> -o gem5_array.o
> 2) gcc gem5_array.o -o gem5_array path/to/gem5/util/m5/m5op_x86.o
> path/to/gem5/util/m5/m5_mmap.o
>
> I don't only want to get the stats for the ROI in the stats file. I'm
> using some debug flags, so in the output of gem5, I want to see only the
> printouts from inside the ROI. I'm not sure I would achieve that.
>
> Thanks,
> Victor
> ___
> 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] Measuring IPC in multi-programmed mode

2019-06-13 Thread Surendra Kumar Shukla
Dear All
I want to calculate speedup of running 4 applications in
multi-programmed/multiprocessor mode vs running alone in a hypothetical
system.

For that, I am running 4 benchmarks in 4 separate cores in SE mode.  After
the completion of the simulation, in the stat.txt file, I am getting IPC
for separate CPU i.e CPU0, CPU-1, CPU-2, CPU-3.
I have following doubts-
1. Is the IPC in a CPU(i.e. CPU-0) is the multi programmed IPC.
2. How to calculate the overall IPC of that system.

Kindly help.

-- 
Surendra Kumar Shukla
___
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users