UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor naz_sw
Visitor
364 Views
Registered: ‎02-25-2019

Expand Microblaze memory with BRAM

Jump to solution

I wanted to perform a behavioral simulation on a design with Microblaze. The original design used local memory and the external DDR3 memory and worked fine in SDK. Then, I wanted to remove the external memory and use only the local on. The Microblaze_local_memory block that was automatically instantiated in the project did not have enough memory to fit the firware for the processor:

Capture.PNG

The SDK shows the following errors:

Capture.PNG

I tried to replace the deleted DDR3 ram with internal memory by adding eight BRAM blocks (64kB) to the design and putting them next to each other in the memorymap to make it look like a consecutive chunck of memory. However, the SDK error still remains complaining about overflow.

Any ideas how to fix it?

0 Kudos
1 Solution

Accepted Solutions
Observer andrewsi
Observer
332 Views
Registered: ‎09-09-2017

Re: Expand Microblaze memory with BRAM

Jump to solution

You don't need to add memory manually in your design.  Just let the automation create the local memory block, and then go into the Address Map tab, and expand both the DLMB and ILMB address regions to the desired size.  This will cause the IP to automatically add the correct number of additional BRAMs to the design to expand the available address space, which hopefully will be sufficient to be able to get your design to compile successfully.

Be warned that Microblaze designs seem to get harder to successfully meet timing at high clock speeds as more local BRAM is added to their memory space.  You can either slow down the Microblaze clock until it meets timing, or use the FREQUENCY optimization in the Microblaze IP options. For example, I have an Artix-7 design with PERFORMANCE optimization that uses 256K of BRAM but can only run at 80Mhz on a speed grade 1 part.  Achievable Fmax with more BRAM goes up significantly if you use the FREQUENCY optimization, but on the other hand, I have been encountering some odd behavior with my design that doesn't occur if I use the PERFORMANCE mode instead.

Andy

0 Kudos
7 Replies
Observer andrewsi
Observer
333 Views
Registered: ‎09-09-2017

Re: Expand Microblaze memory with BRAM

Jump to solution

You don't need to add memory manually in your design.  Just let the automation create the local memory block, and then go into the Address Map tab, and expand both the DLMB and ILMB address regions to the desired size.  This will cause the IP to automatically add the correct number of additional BRAMs to the design to expand the available address space, which hopefully will be sufficient to be able to get your design to compile successfully.

Be warned that Microblaze designs seem to get harder to successfully meet timing at high clock speeds as more local BRAM is added to their memory space.  You can either slow down the Microblaze clock until it meets timing, or use the FREQUENCY optimization in the Microblaze IP options. For example, I have an Artix-7 design with PERFORMANCE optimization that uses 256K of BRAM but can only run at 80Mhz on a speed grade 1 part.  Achievable Fmax with more BRAM goes up significantly if you use the FREQUENCY optimization, but on the other hand, I have been encountering some odd behavior with my design that doesn't occur if I use the PERFORMANCE mode instead.

Andy

0 Kudos
Visitor naz_sw
Visitor
296 Views
Registered: ‎02-25-2019

Re: Expand Microblaze memory with BRAM

Jump to solution

Thank you, @andrewsi ,

This is exactly that I was hoping for, however, I can not find where to add the memory. Neither Microblaze nor memory controller give me the options to adjust memory size. See the image of unfolded block of local memory structure - none of those blocks have memory size configuration options either.

Capture.PNG

Which "Address Map" did you refer to?

0 Kudos
Observer andrewsi
Observer
284 Views
Registered: ‎09-09-2017

Re: Expand Microblaze memory with BRAM

Jump to solution

It’s a top level tab in the Vivado window on the top edge, right next to your “block diagram” after you open the diagram.  So subtle you may have just missed it.

0 Kudos
Visitor naz_sw
Visitor
276 Views
Registered: ‎02-25-2019

Re: Expand Microblaze memory with BRAM

Jump to solution

I just re-added the Microblaze core and during block automation I was able to select the memory size. It is strange that Vivado does not give that option after the block automation.

Did you mean the global AXI address editor? Increasing the range?

0 Kudos
Highlighted
Observer andrewsi
Observer
269 Views
Registered: ‎09-09-2017

Re: Expand Microblaze memory with BRAM

Jump to solution

Yes exactly. Changing the size there is all you need to do to get the correct amount of Bram or change it later.  I agree that it’s a little unintuitive, but it works.

Visitor naz_sw
Visitor
264 Views
Registered: ‎02-25-2019

Re: Expand Microblaze memory with BRAM

Jump to solution

Good to know, a cudo from me!

Could someone from Xilinx reps, please, confirm that re-adjusting Microblaze local memory could be safely done as @andrewsi  suggested, so I could accept it as the correct answer?

0 Kudos
Moderator
Moderator
251 Views
Registered: ‎03-19-2014

Re: Expand Microblaze memory with BRAM

Jump to solution

@andrewsi has it right.  This is documented in UG995

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------