Login

Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.

ARM Community: L2 cache configuration - ARM Community

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

L2 cache configuration ARM Cortex A8 Rate Topic: -----

#1 User is offline   GJP 

  • Member
  • Pip
  • Group: Members
  • Posts: 3
  • Joined: 23-November 10

Posted 20 April 2011 - 05:22 AM

Hello guys,

Anybody here knows what is default size of ARM Cortex-A8 L2 cache as it is given in the manual that it can be from 0kb to 1 mb.How to resize the L2 cache according to our needs.I tried reading the cp15 register using MRC but it is throwing "Illegal instruction" run time error.I suppose I need to be supervisor mode to access the coprocessor registers.Can any body help me with these issues ??

Thanks in advance,
0

#2 User is offline   isogen74 

  • Super Contributor
  • PipPipPipPip
  • Group: Members
  • Posts: 1098
  • Joined: 20-March 07

Posted 20 April 2011 - 08:13 AM

The L2 cache size if fixed for a specific design ... it's part of the hardware layout so cannot be changed. Different chip designs can have different sizes though.

Any yes, you need privileged access to read the register.


When optimizing software, consider that the quickest code to run is the bit you removed from the call path.
1

#3 User is offline   GJP 

  • Member
  • Pip
  • Group: Members
  • Posts: 3
  • Joined: 23-November 10

Posted 21 April 2011 - 05:30 AM

瀏覽文章引用框(isogen74 @ 20 April 2011 - 08:13 AM)

The L2 cache size if fixed for a specific design ... it's part of the hardware layout so cannot be changed. Different chip designs can have different sizes though.

Any yes, you need privileged access to read the register.



Hello isogen74,

First of all, thank you for your response.But I am not talking about the physical size of L2 cache.My question is , as per the reference manual for Cortex A8 L2 cache can be configured to use from 0KB to 1Mb only for data using CSSR register.How can I access this register as a privilaged user so that I configure it as per my needs or is that possible ??
0

#4 User is offline   isogen74 

  • Super Contributor
  • PipPipPipPip
  • Group: Members
  • Posts: 1098
  • Joined: 20-March 07

Posted 21 April 2011 - 10:29 AM

These register's don't modify the cache setup ...

There are two sets of registers:

CSSR - the cache size selection register
CSIR - the cache size identification register

The same CSIR instruction is used for all of the caches which are "architecturally integrated" - the L1 and the L2 in the Cortex-A8 case. You write a cache level into the CSSR to select which cache's data is returned by the CSIR. But the CSIR itself is read-only.

Iso
When optimizing software, consider that the quickest code to run is the bit you removed from the call path.
0

#5 User is offline   GJP 

  • Member
  • Pip
  • Group: Members
  • Posts: 3
  • Joined: 23-November 10

Posted 26 April 2011 - 05:46 AM

Thank you very much...

A few more questions

In CSIR once the level is selected from CSSR, the only thing that differentiates the sizes is 'Numsets'.Where does the processor get this value from ?
&
Will the size of the L2 cache change dynamically or will it remain static once it is set on reset ( because the value of these registers seem to be 'unpredictable on reset' from the manual ) & if it is static what will be default size of L2 cache ?

I am actually trying to optimize an application on Arm cortex A-8.As I am almost done with code level optimization I am trying to find if I can get any support from processor to improve the performance(I am already done with NEON).
0

#6 User is offline   isogen74 

  • Super Contributor
  • PipPipPipPip
  • Group: Members
  • Posts: 1098
  • Joined: 20-March 07

Posted 26 April 2011 - 08:24 AM


It will be a static size for each chip design; it is decided when the silicon is laid out ...

>> what will be default size of L2 cache?



There is no default size - each chip manufacturer decides what sizes to put in the chip, but will typically something like 32KB L1 I and D caches, and 256KB per core for L2. Older ARM cores, such as ARM11, will typically have smaller caches - but as you mention NEON I assume you are only interested in the Cortex-A* cores.
When optimizing software, consider that the quickest code to run is the bit you removed from the call path.
1

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic