cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Voyager
Voyager
9,106 Views
Registered: ‎10-25-2012

When do I need " Xil_ICacheEnable(); Xil_DCacheEnable();"?

Jump to solution

I found some Xilinx software design, in main function, there are two functions called at beginning:

 

Xil_ICacheEnable();
Xil_DCacheEnable();

 

These two are just macro which are :

microblaze_enable_dcache()

microblaze_enable_icache()

 

seperately. So based on the name, they are used to enable the microblaze cache. My question is when I need them? If I don't call them, the cache inside microblaze will not work?

 

Thanks in advacne.

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Xilinx Employee
Xilinx Employee
15,825 Views
Registered: ‎06-14-2012

Re: When do I need " Xil_ICacheEnable(); Xil_DCacheEnable();"?

Jump to solution

These functions are needed to enable them on the software side. You have to enable cacahe functionality in both hardware and software side.

 

Check this thread. This has some more details that will be helpful.

 

http://forums.xilinx.com/t5/Embedded-Development-Tools/XPS-Microblaze-cache-enable-and-execution-time/td-p/39112

 

Regards

Sikta

View solution in original post

0 Kudos
6 Replies
Highlighted
Xilinx Employee
Xilinx Employee
15,826 Views
Registered: ‎06-14-2012

Re: When do I need " Xil_ICacheEnable(); Xil_DCacheEnable();"?

Jump to solution

These functions are needed to enable them on the software side. You have to enable cacahe functionality in both hardware and software side.

 

Check this thread. This has some more details that will be helpful.

 

http://forums.xilinx.com/t5/Embedded-Development-Tools/XPS-Microblaze-cache-enable-and-execution-time/td-p/39112

 

Regards

Sikta

View solution in original post

0 Kudos
Highlighted
Voyager
Voyager
9,051 Views
Registered: ‎10-25-2012

Re: When do I need " Xil_ICacheEnable(); Xil_DCacheEnable();"?

Jump to solution
Hi Sikta,

Thank you very much for posting the link. I try to enable the cache in Microblaze, after configuration, I can see the microblaze has two new ports : AXI_DC and AXI_IC, so I should connect these two ports to ram? I think I need manually create RAM instance in bd, right?

Thanks.
0 Kudos
Highlighted
Moderator
Moderator
9,036 Views
Registered: ‎07-31-2012

Re: When do I need " Xil_ICacheEnable(); Xil_DCacheEnable();"?

Jump to solution

Hi,

 

Do your design use external memory like DDR ?

If the accessible memory is BRAM only then I don't think that the cache will improve design performance.

 

Regards

Praveen

 

----------------------------------------------------------------------------------------------
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.
----------------------------------------------------------------------------------------------


-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
Highlighted
Scholar
Scholar
9,026 Views
Registered: ‎09-05-2011

Re: When do I need " Xil_ICacheEnable(); Xil_DCacheEnable();"?

Jump to solution
First of all if you have a DDR in your system, it is recommended to have caches in microblaze. When MicroBlaze starts, the data cache is disabled. The data cache must be enabled explicitly with the functions above.

I believe the functions microblaze_enable_dcache()
microblaze_enable_icache() are old.

Check Os Libraries and Collection document for more details:
http://www.xilinx.com/support/documentation/sw_manuals/xilinx2014_4/oslib_rm.pdf
Highlighted
Xilinx Employee
Xilinx Employee
9,022 Views
Registered: ‎06-14-2012

Re: When do I need " Xil_ICacheEnable(); Xil_DCacheEnable();"?

Jump to solution
Highlighted
Voyager
Voyager
8,950 Views
Registered: ‎10-25-2012

Re: When do I need " Xil_ICacheEnable(); Xil_DCacheEnable();"?

Jump to solution
Thank you, all of you.
0 Kudos