Page 1 of 1

Cache Line Size

PostPosted: Sat Aug 08, 2015 1:44 pm
by jain.ramya
Dear Sir,

I would like to know how I could get d-Cache line size on parallealla cluster.

I tried a simple program
#include <stdio.h>

int main(void) {
unsigned int cache_info = 0;
unsigned int dcache_lsize;

asm volatile("mrc p15, 0, %0, c0, c0, 1":"=r" (cache_info));
dcache_lsize = 4 << ((cache_info >> 16) & 0xF);
printf("dcache line size: %d\n", dcache_lsize);
return 0;
}
but results in illegal instruction, though the ARM ABI says the mrc instruction is supported.

Any help with this would be deeply appreciated.

Re: Cache Line Size

PostPosted: Fri Sep 18, 2015 4:49 pm
by timpart
Are you confusing the ARM processors on the Parallella board FPGA with the 16 Epithany cores?

The Epithany cores are not ARM based, so ARM instructions are not valid on them. To answer your question, the Epithany has no data or instruction cache on it, so there is no line size.

Tim

Re: Cache Line Size

PostPosted: Fri Sep 18, 2015 5:54 pm
by sebraa
Are you sure that you can access this register from userspace?
At least some other registers (i.e. MIDR, TLBTR, MPIDR etc) are only accessible in privileged mode, i.e. not from an application.