cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
edfisher
Adventurer
Adventurer
6,076 Views
Registered: ‎05-27-2011

Estimating Microblaze BRAM or External Memory Requirements

 

Good morning.

 

We are designing an FPGA-based distributed sensor/computation system. This will use the Sartan 6 with a Microblaze to support backend Ethernet communications.

 

We are currently at the PCB design stage. I'm looking to estimate the BRAM usage or if external SRAM memory for our application will be needed.

 

The majority of computation is in hardware, DSP etc. However we expect to need TCP/IP Ethernet at the backend using the lwIP IP core. Data transmit is pretty much a dumb terminal in that it just needs to transmit TCP/IP ethernet frames upon a hardware interupt and recieve packets putting the encoded data onto the AXI interface to update the FPGA logic control register map.

 

I can't spend the time starting the embedded C just yet as the PCB is sucking up my time, so I'm looking to estimate memory requirements for the system. Mainly to assess if we need to purchase external SRAM and non-volitile memory ICs.

 

Obviously I'm wanting to avoid a situation where we don't have enough heap/stack or instruction memory available for the Microblaze, and hence a PCB re-spin.

 

I had a look at xapp1026, which point to iwIP documentation in the install directory of SDK. Having looked around in there I couldn't see memory usage. Short of writing some embedded C and compiling into .elf I'm at a loss as to how to estimate this.

 

Thanks.

Ed

0 Kudos
2 Replies
sampatd
Scholar
Scholar
6,062 Views
Registered: ‎09-05-2011

Not sure how you can estimate the application size unless you've actually compiled the .elf

However, once you compile your code in SDK, you should be able to see the size of the elf and hence calculate the number of BRAMs required:

For example, in SDK at the end of compilation - you can see the following

started...

text data bss dec hex filename
6206 360 2192 8758 2236 C:/Laptop/Cases/DDR_Reserve/TestApp_Peripheral/executable.elf

the size of elf then would just be =text + data + bss = 6206+360+2192=8758 (dec) = 2236 (hex)
0 Kudos
edfisher
Adventurer
Adventurer
6,058 Views
Registered: ‎05-27-2011

Ok sure thanks.

As we are still at the PCB design stage. I may take a day out to do some rudimentary C code but include the relevant drivers etc in the .elf.

 

I'll then just add on 100% to get at least some kind of ball park figure for selecting the external memory. We have budget and PCB area but no point in purchasing a memory IC that is too large.

 

Thanks.

Ed 

0 Kudos