GithubHelp home page GithubHelp logo

Comments (5)

ufrisk avatar ufrisk commented on July 30, 2024 2

Example updated with MemReadScatter function.

from memprocfs.

ufrisk avatar ufrisk commented on July 30, 2024

I'm assuming you use the VMMDLL_FLAG_NOCACHE flag on your reads to get fresh data from the device and not reading from the internal cache.

In general, multiple smaller reads are almost always slower than one larger read (even if the larger read is significantly larger than the multiple smaller reads combined.

Also, internally the minimum read is 4096 bytes aligned to 4096-boundrys. Reading 800 bytes won't speed things up one single bit as compared to read 4096 bytes.

The amount of memory do matter though. Your best shot at this is probably to read your multiple non-contiguous chunks of memory one one single call using the VMMDLL_MemReadScatter function.

The function is somewhat complex, it takes an array of pointers that points to pMEM structs. These structs must be initialized with some values and will allow you to read 0x1000 (page) sized memory at page-boundaries. I just now realize I don't have a good example of this in my example project. I'll try to add this in the next couple of days.

from memprocfs.

false avatar false commented on July 30, 2024

I was wondering : with that method I can just pass an array of all my small values I have to read and it will read it the most efficient way right ? I was using it with 800 400 2 and 2 bytes then parse, but If I pass an array of 15 pMem structs you confirm to me it will be as good if not better in term or efficiency?

from memprocfs.

ufrisk avatar ufrisk commented on July 30, 2024

If you pass an array of 15 pMem structs it will read 15 4096-byte (page-sized) chunks (provided that they are on page boundaries.

It does not matter if you read 2, 4, 8 or any other memory amount if they are read from within the same memory page. Regardless how many bytes you read inside the same memory page it will read the whole memory page.

All pMem requested memory will be read in one single read (or at least up until the maximum supported by the FPGA).

from memprocfs.

false avatar false commented on July 30, 2024

Ok, thanks a lot for these precious informations, it helped.

from memprocfs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.