I would like to measure the operational intensity (= #operations / # DRAM bytes transferred) of a piece of code running on the DSP cores of an EVMK2H evaluation board. For this, I need to now how many bytes are read and written from/to memory, e.g., like this:
start_DRAM_counting();
do_work();
stop_DRAM_counting();
long DRAM_bytes_transferred = DRAM_bytes_read() + DRAM_bytes_written();
or
long DRAM_bytes_transferred = - DRAM_bytes_read() - DRAM_bytes_written();
do_work();
DRAM_bytes_transferred += DRAM_bytes_read() + DRAM_bytes_written();
.How can I measure the memory bandwidth usage? Is there example code that shows how it works?
Thanks in Advance, John