Content originally posted in LPCWare by mdittrich on Thu Nov 01 15:12:03 MST 2012
Thanks again Noah,
Unfortunately I cannot send you my test code, it is a chunk of our application. It has definitely more of a "branching" than "calculating" mix to it.
The differences you mentioned in the SPIFI mapped memory ranges is good to know... sounds like info that should be in the user manual :) I think it only mentions "debugability" (my term) as the only difference between the two ranges, that and the boot rom sets the M4MEMMAP to 0x14000000. I do not use the Keil tools, and I get the impression I would have had an easier go at it if I did. I use GCC, OpenOCD, and Eclipse CDT. I programmed the SPIFI via OpenOCD (feature only in their git repo) and my code running from SRAM downloading the program payload via UART programming SPIFI via the library.
The most reliable way I could get things booting from SPIFI was to immediately copy my text section to internal SRAM after boot, right in the reset ISR before main(). For the SPIFI test, I left the benchmarked code linked in 0x14000000 range, not copied to SRAM. I verified my PC was in that range with the debugger while running the test. The only ISR enabled was the systick. So that, the vector table, and all library code that the benchmarked code might call into was in SRAM, possibly giving it a leg up against the SDRAM test numbers which had ALL text in the SDRAM, including the ISRs and vector table.
The code was compiled with GCC 4.5.2, as an M3, with no optimizations and with "long jumps" enabled. Again, I was testing/comparing code memory throughput and I figured this would be worst case for that... and those also happened to be the settings when I finally got it all working :) Anyway, at this stage I was not interested in getting the most out of a part, I just want to pick the right part. Or really just avoid the wrong one. My part will have internal flash. I won't say my results are 100% scientific, but it did provide a good "smell test".
And I want to be clear that I am not knocking the SPIFI, it is a really unique peripheral. I will appreciate the direct memory mapping. I am sure there are applications that would not be dramatically effected by running from it, it just falls way short of my performance expectations. YMMV. And I am sure I don't have it setup for max performance. I am also sure changing the settings wont yield an exponential performance improvement that I need/expect for my app. The 60% figure that bavarian quoted is believable (and best case??), but I think that the 25% I saw is also believable given the math of a 4 bit interface feeding a 32 bit processor at identical clock rates. Its actually pretty impressive when you look at it like that. Its too bad they don't make DDR QSPI flash devices that we could run at 4x the Cortex frequency! :)
My only real gripe is the vague documentation and the closed source binary SPIFI library... and hopefully neither of those persist.
Thanks again for your responses,
MD