cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Observer
Observer
951 Views
Registered: ‎11-01-2018

What is enable_caches() doing in the funtion init_platform()?

Jump to solution

I created a helloworld project in the SDK (my board is the MicroZed Zynq 7010). The very first thing that happens in main() is the following...

 

int main()
{
    init_platform();
    // do stuff
    return 0;
}

The function init_platform() is automatically created for me and is defined in platform.c as such...

 

init_platform()
{
    enable_caches();
    init_uart();
}

The function enable_cashes() is defined as such...

cache.png

My three questions are...

  1. Is this even being used since the IDE gray's out the code? If it is how do I tell which one of the preprocessor macros is being used?
  2. On a high level what does enable caches do exactly and is there a user guide that Xilinx has that may explain it at a lower level in detail?
  3. What board do I post regarding questions on "ARM Cortex A9 Programming/Configuration" and "Zynq 7010 Configuration within Vivado"?
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Xilinx Employee
Xilinx Employee
897 Views
Registered: ‎09-14-2018

hi @scy86dev 


My three questions are...

  1. Is this even being used since the IDE gray's out the code? If it is how do I tell which one of the preprocessor macros is being used?
  2. On a high level what does enable caches do exactly and is there a user guide that Xilinx has that may explain it at a lower level in detail?
  3. What board do I post regarding questions on "ARM Cortex A9 Programming/Configuration" and "Zynq 7010 Configuration within Vivado"?

1. It grays because none of the macros are defined. You can search in project to see if you can find them.

2. Not sure if this is what you want - refer to ug585 ch.3 to learn more about cache and you'll have to go to ARM docs if you want to go deeper.

 

----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.

View solution in original post

4 Replies
Highlighted
Moderator
Moderator
923 Views
Registered: ‎09-12-2007

It will enable cache if added to your system. In your case, you don't have cache. So it won't do anything.

 

Highlighted
Participant
Participant
914 Views
Registered: ‎08-14-2015

The Z7010 does have cache.

0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
898 Views
Registered: ‎09-14-2018

hi @scy86dev 


My three questions are...

  1. Is this even being used since the IDE gray's out the code? If it is how do I tell which one of the preprocessor macros is being used?
  2. On a high level what does enable caches do exactly and is there a user guide that Xilinx has that may explain it at a lower level in detail?
  3. What board do I post regarding questions on "ARM Cortex A9 Programming/Configuration" and "Zynq 7010 Configuration within Vivado"?

1. It grays because none of the macros are defined. You can search in project to see if you can find them.

2. Not sure if this is what you want - refer to ug585 ch.3 to learn more about cache and you'll have to go to ARM docs if you want to go deeper.

 

----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.

View solution in original post

Highlighted
Xilinx Employee
Xilinx Employee
869 Views
Registered: ‎02-01-2008

Keep in mind that the example apps can target Zynq, MPSoC, or Microblaze designs so the apps are configured to support all processors. In the case of zynq/mpsoc, cache is enabled by default in the BSP so there is no need to enable it in the app.

Often, to clean up a zynq/mpsoc hello_world example and start using it for my own custom design, I will delete the platform files and remove the include and function calls from my app.

0 Kudos