On Thursday 09,December,2010 12:43 AM, avadh patel wrote:
On Wed, Dec 8, 2010 at 6:09 AM, Shen Zhong <[email protected] <mailto:[email protected]>> wrote:

    Dear all,

      Suppose I know a certain virtual address, and I need to read the
    corresponding data from the main memory in ptlsim, but I don't want to
    add an entry to the load store queue, since there was no such load
    instruction in the application we are running.
      What I found is ptlsim didn't implement the memory itself, what it
    does is reading the data from the host memory. Is it right? If so how
    can I read the data from the memory after knowing its virtual address?


Yes you are right about no data memory in simulated model. You can read the data using 'Context::loadvirt' function. But before using that function you need to make sure
that requested virtual address doesn't have page fault.

- Avadh

      Thanks a lot!

    -Regards
     Shen Zhong


    _______________________________________________
    http://www.marss86.org
    Marss86-Devel mailing list
    [email protected]
    <mailto:[email protected]>
    https://www.cs.binghamton.edu/mailman/listinfo/marss86-devel

Thanks a lot Avadh.
Now I can read the data from memory. I use the "has_page_fault" function to check whether there is page fault. However, sometimes there are page faults, but I still want to read the data even if there is page fault. How can I handle it?

-Best Regards
 Shen Zhong


_______________________________________________
http://www.marss86.org
Marss86-Devel mailing list
[email protected]
https://www.cs.binghamton.edu/mailman/listinfo/marss86-devel

Reply via email to