Forum Discussion
Altera_Forum
Honored Contributor
7 years ago --- Quote Start --- Thanks for the answer but to check if it's running in the Cache I need to see the registers in a debug view? --- Quote End --- No. Debug view is not required. Just check if your execution time improves with this change --- Quote Start --- So, my getPixel function is similar to yours. --- Quote End --- Nope. Your function returns a single pixel, mine 8. In an uncached system my code is faster, since the bottleneck is the number of sdram accesses. Each sdram access involves a lot of delays (RAS, CAS, ...) while the bit extraction is made at cpu-register level. In your case you make 7 out of 8 duplicate accesses to the same sdram address, so you lose a lot of time if the system is rather dumb and it accesses sdram every time as if it was a random address. Actually I don't know how processor bus handles sdram access, that's why I suggest this simple code trick to verify if you have any improvement.