Discussion:
[gem5-users] EmulatedDriver in SE mode: initialize the driver
João Miguel Morgado Pereira Vieira
2018-08-07 12:14:37 UTC
Permalink
Hi guys,

I am just starting using gem5 to integrate an accelerator with an ARM core. My work is inspired by powerjg’s <https://github.com/powerjg/gem5/tree/devel/accel/src/accel> accelerator, and one of the things that he does to allow communication between the processor and the accelerator is to implement an EmulatedDriver. The EmulatedDriver is needed to have information about the ThreadContext, that is required to perform address translation from the accelerator side. The driver requires two methods to be implemented: open (that initializes the ThreadContext) and ioctl (that I am not going to use). I also need to do that, however I cannot manage to pass the ThreadContext to the accelerator (that is set when the method ::open() is called upon the driver object).

I was wondering if I have to initialize something from the software side (the program running in the ARM core), but unfortunately I cannot find any relevant documentation about this
 I am using the SE mode. Do some of you guys ever came across such a problem?

Thanks in advance,

Best,
Joao Vieira
Jason Lowe-Power
2018-08-09 21:39:48 UTC
Permalink
Hi Joao,

I'm not sure exactly what the problem is because I haven't used this code
in quite some time. However, I would start by making sure the code here (
https://gem5.googlesource.com/public/gem5/+/master/src/sim/syscall_emul.hh#691)
is executing. That's what's going to call your emulated driver's "open"
function.

You may also want to use the "SyscallVerbose" DPRINTF flag.

Jason

On Tue, Aug 7, 2018 at 5:14 AM João Miguel Morgado Pereira Vieira <
Post by João Miguel Morgado Pereira Vieira
Hi guys,
I am just starting using gem5 to integrate an accelerator with an ARM
core. My work is inspired by powerjg’s
<https://github.com/powerjg/gem5/tree/devel/accel/src/accel> accelerator,
and one of the things that he does to allow communication between the
processor and the accelerator is to implement an EmulatedDriver. The
EmulatedDriver is needed to have information about the ThreadContext, that
is required to perform address translation from the accelerator side. The
driver requires two methods to be implemented: open (that initializes the
ThreadContext) and ioctl (that I am not going to use). I also need to do
that, however I cannot manage to pass the ThreadContext to the accelerator
(that is set when the method ::open() is called upon the driver object).
I was wondering if I have to initialize something from the software side
(the program running in the ARM core), but unfortunately I cannot find any
relevant documentation about this
 I am using the SE mode. Do some of you
guys ever came across such a problem?
Thanks in advance,
Best,
Joao Vieira
_______________________________________________
gem5-users mailing list
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
Loading...