Hi TI community. This is my first time posting here.
I have been investigating into CortexM4 ARM uCs that are available for immediate purchase in my country. I have narrowed down a choice between two uCs:
- TM4C129XNCZAD
- STM32F407VGT6 (in further text - STM or STM MCU)
While i mostly prefer TI uC - it is superior in almost every aspect, i am having second-thoughts when considering code execution performance.
Considering flash memory cache I have looked at several other TI uCs and can't understand why is cache so poor (in my opinion).
Having only 4x256bit (32 instructions) cache will most likely cause misses in almost all loops, and repeated function calls (in contrary with STM cache organization which will most likely NOT cause a miss in these situations). Also literal use degrades cache even more. Suggestion that developer should align branch destinations to 8-words, is next to impossible when not writing code in assembler and thoroughly analyzing it. Even though STM would also (for best performance) require code to be aligned to 4-words, this could be overcomed if this branch code path is taken again before removing particular code from cache. This probability when there is only 4 entries in cache is smaller.
On the other hand STM cache is 64x128bit for instructions and 8x128bit for data (literals). Apart from obvious 8 times bigger cache (256 instructions) this cache also takes branches into consideration (not sure how - since it is not described in datasheet). In case of interrupt (since interrupt routines are usually tens of instructions), when returning to interrupted code there is a big probability that it is still in cache. I think that in practice this cache would perform significantly better.
Is there any TI MCU that is in this product range with better cache? And why cache hasn't been made better in this particular MCU? Because in my opinion this significantly slows down CPU. What is yours opinion on this subject?
Above, I have expressed my opinion and point of view, if something isn't correct please state that in your answer.
Looking forward for your answers, sincerely,
Filip.