How to make a program only access part of the cache?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How to make a program only access part of the cache?

1,071 次查看
peterzheng
Contributor II

Hi,

 

Currently I was doing a project on P4080DS using CodeWarrior. I need to run a simple program, for example, "hello world", on one core of P4080DS. Is it possible to make this project only use part of the L3 cache during the running?

 

Maybe through some assembly code?

 

Thanks & Regards,

Peter Zheng

标签 (1)
标记 (3)
0 项奖励
回复
4 回复数

893 次查看
lunminliang
NXP Employee
NXP Employee

Hi,

Maybe you can configure part of CPC to be SRAM.

What's your purpose of this? If you would like some of the DRAM persisting in Cache, you may try the Cache Lock function. See 8.3.2 Line Locking in P4080RM,pdf for more details if this is what you want.

http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=P4080&fpsp=1&tab=Documentation_Tab

Will your "Hello World" program use DRAM with Cache enabled?


Have a great day,
Lunmin

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复

893 次查看
peterzheng
Contributor II

Hi Lunmin,

My program will use DRAM with cache enabled.

Regards,

Peter

0 项奖励
回复

893 次查看
peterzheng
Contributor II

Hi Lunmin,

I want to run the same program on all 8 cores. The simple program will create a array of integer with the size of 1/8 of CPC and then read the array.

For example, for program in Core 0, I want it can only access 1/8 of CPC.

                       for program in Core 1, I want it can only access another 1/8 of CPC....etc.

Could this be achieved using Line Locking?

Regards,

Peter

0 项奖励
回复

893 次查看
lunminliang
NXP Employee
NXP Employee

Hi,

No, could not.

Please refer to your another thread, I have a description about the CPC partition:

How to partition the L3 Cacahe of P4080 using CodeWarrior?


Have a great day,
Lunmin

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复