bespoke-silicon-group / bsg_manycore

Tile based architecture designed for computing efficiency, scalability and generality
Other
221 stars 58 forks source link

Add amoor and lw prefetch commands #646

Closed drichmond closed 2 years ago

drichmond commented 2 years ago

Admittedly one of the more odd PRs that I've submitted.

This PR adds two inline functions: bsg_amo_prefetch and bsg_lw_prefetch. These functions can be used to prefetch data into the cache for a tile to read later.

bsg_amo_prefetch uses amoor.w, but with an operand of 0 so it doesn't disturb data. However, the cache doesn't know this so it pollutes the dirty bit. Therefore, bsg_amo_prefetch should only be used to verify prefetching behavior. In the statistics parser, correct use of bsg_amo_prefetch will drive the load/store miss rate to 0

After verifying behavior with bsg_amo_prefetch replace all instances with bsg_lw_prefetch

drichmond commented 2 years ago

To switch back and forth?

There are times I want to use both. If I have multiple phases of a program, I want to use amo for one phase, and lw for the other.