Hi all
Here is a problem about the using of TCM.
I put two functions(they are just the same) of time-delay in the ITCM and the normal RAM, using the scatter file, and execute them one after another.
But at the end of func in ITCM, there is a PREFTECH abort(May it didn't execute fully at all).
During my boot.s, only ITCM bank0 was initialized:
MOV r9, #0x0
MCR p15, 0, r0, c9, c2, 0
LDR r0, =BASE_ITCM_BANK0 ;0xc20000
ORR r0, r0, #0x0D
MCR p15, 0, r0, c9, c1, 1
Here are the points that confused me:
1 why this prefetch abort happened ?
2 I wonder whether initialization of the ITCM_BANK0 is enough.
Sorry about my poor english T T, and thanks for your apply.
Hello,
what part do you use?
Best regards,
Yasuhiko Koumoto.
from the 'MCR p15, 0, r0, c9, c2, 0', I guess you use ARM11.
If it is true, is 'MOV r9,#0x0 valid.
I think it should be 'MOV r0,#0x0'.
Didn't you select ITCM1?
Otherwise, you had not set the Instruction TCM Non-secure Control Access Register.
Wasn't your ITCM access from the Non-Secure world?
Please check them.
Hi こおもとせんせい
Thanks a lot for your reply.
It seems after my config about the TCM's Non_secure control register, the program runs without exception :
MOV r0, #0 ; select ITCM bank0
MCR p15, 0, r0, c9, c2. 0
LDR r0, =BASE_ITCM_BANK0
MOV r0, #1
MCR p15, 0, r0, c9, c1, 3
But I didn't select ITCM bank1, as long as DTCM.
And also, it looks there is no that much difference between those two delays in time-consume.
did you measure the performance on condition the both instruction and data caches were disabled?
On ARM11 both the L1 caches and the TCMs are single cycle; I wouldn't expect much performance difference (there are scenarios where TCM can be slower than L1 cache). It's worth noting that the main purpose of TCM isn't performance, but predictability, which is necessary for some system routines in some real-time operating systems.
HTH, Pete
Hi Mr Harris:
Thanks for your reply.
What I have done about the TCM is just to check whether my ITCM works.
But I can not find another way to check it(there is no OS right now).
What's your suggestion?
Thanks a lot.
Ervin
Remap your TCM over a dead spot in your physical address map. If the code runs then the TCM is working.
Thank you for sharing this. mcdvoice