Hello, First of all, please reply to the users list, not directly to the person who responded. This allows everyone to see answers and/or chime in and help.
Second, the page you linked is out of date. Please use the main gem5 website for all of the up to date documentation (e.g., http://doxygen.gem5.org/release/current/classLSQUnit.html) Third, I still don't fully understand what your goals are. However, you can use the system port (actually, I think I was wrong before, you should use the "getPort" function, not "getSystemPort") to make functional (or debug) accesses to the memory. You can create a `Packet` with a `Request` and send a functional request across the port (i.e., call sendFunctional(pkt)). You can use either virtual (in SE mode) or physical address (in both modes). I am sure there are some caveats to using virtual addresses, but I don't know exactly what they are. If you're trying to make new timing accesses, then you should use the main "dcache_port" and "icache_port" that are connected to the CPU. Again, you can construct a Packet object with a Request and send it across the port (e.g., sendTimingReq(pkt)). You may want to read up on the details of how gem5's memory objects work: http://www.gem5.org/documentation/learning_gem5/part2/memoryobject/ Cheers, Jason On Mon, Aug 3, 2020 at 1:15 PM ABD ALRHMAN ABO ALKHEEL < abdkeel...@hotmail.com> wrote: > Hi Jason, > > Thanks for your email. > > What I want to do is finding the memory address that the LD instruction > loads data from ( I can get the physical and virtual address from the Read > method in the lsqunit) > http://pages.cs.wisc.edu/~swilson/gem5-docs/classLSQUnit.html and saving > those addresses. After a specific time, I want to access the memory to read > the data from those addresses. Can I use getSystemPort function to access > the memory and read the data from those addresses? If so, should I use the > virtual address or the physical address? > > Thanks > > > ------------------------------ > *From:* Jason Lowe-Power <ja...@lowepower.com> > *Sent:* Monday, August 3, 2020 3:26 PM > *To:* gem5 users mailing list <gem5-users@gem5.org> > *Cc:* gem5-users <gem5-users-boun...@gem5.org>; ABD ALRHMAN ABO ALKHEEL < > abdkeel...@hotmail.com> > *Subject:* Re: [gem5-users] Re: Reading from memory in Gem5 > > Hello, > > This sounds like you probably want to use "functional" accesses. These are > built for introspection and debugging, which is what it sounds like you > want to do. Using the System object, there is a `getSystemPort` > function that will return a gem5 port that you can use with functional > accesses to "backdoor" into the memory. See > http://doxygen.gem5.org/release/current/classSystem.html#a5ecbd1eaa3e0d19f4640bb71a0b59d64 > . > > Cheers, > Jason > > On Sun, Aug 2, 2020 at 7:01 AM ABD ALRHMAN ABO ALKHEEL via gem5-users < > gem5-users@gem5.org> wrote: > > Hi All, how to read data from memory in Gem5 ? Can I read data from memory > in Gem5 for a specific addresses? If so, should I use the virtual address > or physical address? For example, how load instructions read the data from > memory? Any help would be appreciated. Thanks > > ------------------------------ > *From:* ABD ALRHMAN ABO ALKHEEL > *Sent:* Saturday, August 1, 2020 3:19 PM > *To:* gem5 users mailing list <gem5-users@gem5.org>; gem5-users < > gem5-users-boun...@gem5.org> > *Subject:* Reading from memory in Gem5 > > Hi All, how to read data from memory in Gem5 ? Can I read data from memory > in Gem5 for a specific addresses? If so, should I use the virtual address > or physical address? For example, how load instructions read the data from > memory? Any help would be appreciated. Thanks > _______________________________________________ > 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