Sure. The example config scripts don't instantiate standard I/O devices like hard drives in SE mode because they're not needed, but you can still do it. The recently added GPU model is a good example of something that has some device-like characteristics but is used in SE mode. There are a couple of special hooks we added just to support this:
1. You have to create a virtual-to-physical mapping in the config script to allow your program to access the device registers. There's a map() method on the Process object that enables this. See http://grok.gem5.org/xref/gem5/configs/example/apu_se.py#493 2. There's an EmulatedDriver object you can use to create a fake "driver" inside gem5 that lets your simulated application talk to your device through ioctl() operations on a file descriptor. There's a "CLDriver" class that does this for the GPU model. See http://grok.gem5.org/xref/gem5/src/sim/emul_driver.hh and http://grok.gem5.org/xref/gem5/src/gpu-compute/cl_driver.hh, and where it gets instantiated at http://grok.gem5.org/xref/gem5/configs/example/apu_se.py#365. Steve On Sun, Mar 13, 2016 at 3:06 PM George Michelogiannakis < [email protected]> wrote: > Hi folks, > > Is it possible to add an I/O device in SE mode? I'm trying to add a device > to capture accesses to certain memory locations but it seems I/O devices > don't get instantiated in SE mode. > > Thank you! > George M > _______________________________________________ > gem5-users mailing list > [email protected] > http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
_______________________________________________ gem5-users mailing list [email protected] http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
