Hi Pedro, No, I don't think there's an easy way to run m5_write_file on the guest from the host. That is an instruction that is executed on the guest, and the host can't easily control what is executing on the guest (especially when you consider that it has to execute in the right context, etc.). Similarly, the host doesn't have any (easy) way of knowing what address or location on the disk to read/write.
I'm sure you could devise a way to do this, but it's not going to be straightforward :). I would do what you suggest and just use stdout via the serial tty. Cheers, Jason On Wed, Jun 16, 2021 at 6:52 AM Pedro Becker via gem5-users < gem5-users@gem5.org> wrote: > Hello gem5 community, > > I'm running an application with FS (fs.py), for which I have generated > some checkpoints. > Now I can restore the checkpoints and run for a given number of ticks. All > good. > > My application outputs data to a file as the execution goes on. This file > is written in the image, inside gem5. > Now, I'd like to have the generated file in the host once the simulation > finishes. > > I know that there is the m5op 'm5_write_file', which can 'export' the file > from the simulated image to the host. > However, since my simulation ends abruptly (after a number of ticks), I > cannot make sure I call the m5op to export the file at the very last moment > (collecting the maximum amount of data produced by my program). > > Is there a simple way to request this file transfer from the python > scripts (e.g., fs.py), once I leave the simulation loop (i.e., when the > simulation ends)? > The alternative would be to output the log to the screen (together with > other info already printed there) and filter the output later, which is > what I'm going to do in the lack of a more elegant way. > > Again, > Thank you. > _______________________________________________ > gem5-users mailing list -- gem5-users@gem5.org > To unsubscribe send an email to gem5-users-le...@gem5.org > %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s >
_______________________________________________ gem5-users mailing list -- gem5-users@gem5.org To unsubscribe send an email to gem5-users-le...@gem5.org %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s