RRZE-HPC / pycachesim

Python Cache Hierarchy Simulator
GNU Affero General Public License v3.0
88 stars 27 forks source link

Request for Instructions on How to Feed a binary file to the simulator #12

Closed piyumalranawaka closed 3 years ago

piyumalranawaka commented 3 years ago

Hi,

I find your simulator very interesting for my research. I am trying to figure out how to feed a workload into the simulator but unfortunately I could not find any information.I would be much thankful if you could provide some instructions on how to do it.

Thank You & Warm Regards, Piyumal

cod3monk commented 3 years ago

This requires some little programming. An example is given in https://github.com/RRZE-HPC/pycachesim/blob/master/examples.py

On line 37 you see how a single byte is loaded from address 23.

For performance reasons I suggest using the load, store and loadstore (found in the CacheSimulator class) functions with iterators that give a sequence of addresses instead of accessing single addresses.

Hope this helps as a starting point.

cod3monk commented 3 years ago

Feel free to reopen if more questions come up.