How to measure program execution time in ARM Cortex-A8 processor?

Accessing the performance counters isn’t difficult, but you have to enable them from kernel-mode. By default the counters are disabled. In a nutshell you have to execute the following two lines inside the kernel. Either as a loadable module or just adding the two lines somewhere in the board-init will do: /* enable user-mode access … Read more

Is it redundant to check if a modulo operation is needed, then performing it?

If you want to understand what the compiler is doing, you’ll need to just pull up some assembly. I recommend this site (I already entered code from the question)): https://godbolt.org/g/FwZZOb. The first example is more interesting. int div(unsigned int num, unsigned int num2) { if( num >= num2 ) return num % num2; return num; … Read more

what’s ARM TCM memory

TCM, Tightly-Coupled Memory is one (or multiple) small, dedicated memory region that as the name implies is very close to the CPU. The main benefit of it is, that the CPU can access the TCM every cycle. Contrary to the ordinary memory there is no cache involved which makes all memory accesses predictable. The main … Read more

Tool to visualize the device tree file (dtb) used by the Linux kernel? [closed]

dtc -O dts sudo apt-get install device-tree-compiler dtc -I dtb -O dts -o a.dts a.dtb gives a well indented textual representation of the device tree a.dtb, which is easy to understand with a text editor. Or dump it to stdout with: dtc -I dtb -O dts -o – a.dtb The source code for dtc is … Read more

Why ARM NEON not faster than plain C++?

The NEON pipeline on Cortex-A8 is in-order executing, and has limited hit-under-miss (no renaming), so you’re limited by memory latency (as you’re using more than L1/L2 cache size). Your code has immediate dependencies on the values loaded from memory, so it’ll stall constantly waiting for memory. This would explain why the NEON code is slightly … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)