libparanut
A Hardware Abstraction Layer for ParaNut Architectures.
|
Builds the architecture dependent assembly files of the Cache Module since they are performance critical, very dependent on cache line size, and should not take up to much space. More...
Builds the architecture dependent assembly files of the Cache Module since they are performance critical, very dependent on cache line size, and should not take up to much space.
This means we can neither make the cache line size a variable, since that would mean a performance trade off, nor can we put an implementation for every possible cache line size, since that would take a giant amount of space in the binary. This Python Script seems the perfect solution for that, except for the fact that it reduces binary compatibility of the libparanut to ParaNuts with different cache line sizes. Having to re-compile the libparanut is, of of course, a minor inconvenience, but the only other solution, which would be code that modifies itself on startup, is extremely complex and could be a possible subject for another Bachelor Thesis.
For all those who hate having to recompile stuff, it is also possible to start this script with the option "auto", which generates a file that does contain all of the cache line size functions from 32 bit to 2048 in powers of two. Since every other linesize is deemed to be unrealistic, this version has the most binary compatibility ... but also the biggest code size of them all. Make of that what you want.
Also check documentation of PN_CACHE_LINESIZE.