Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
20704 Discussions

block ram area equivalent in logic elements , Cyclone iv

Altera_Forum
Honored Contributor II
1,156 Views

Hi, 

 

I have several designs synthesized on cyclone iv fpga and all of them use only 2 resources : Logic elements and Block Rams (M9k). I want to compare the area consumption of the designs , but since each of them has different number of LE s and BRAM s I don't have a common unit of comparison. Would it make sense to find out the area equivalence of BRAMs in terms of LE s so that we have all the resources in terms of LE s and it would be possible to do a area comparison?  

 

I wanted to know how many LE s would make up a BRAM. So 

1) First I synthesised only a simple dual port memory. So the resource used was only 1 BRAM (M9K). No LE s are used. 

 

2)Next I turned off the "auto RAM replacement" option so that the entire design is implemented using LEs. 9,939 / 109,424 ( 9 % ) - So many LE s were used up. 

 

so 1 bram is apprx equal to 9,939 LE s. Does this make any sense or trying to express brams in terms of LE s doesn't make sense at all? 

 

Thanks
0 Kudos
5 Replies
Altera_Forum
Honored Contributor II
389 Views

Not really, you'll just get some insanely high LE counts.

0 Kudos
Altera_Forum
Honored Contributor II
389 Views

For the present example, the comparison doesn't make much sense. Nobody would replace a dual port memory by registers, except as a mistake. It's more interesting if register banks are replaced by small sclices of block memory. In this cases, RAM blocks are often only partly populated but can still save a lot of overall FPGA resources. Due to this partial utilization, calculating LE equivalents misses the point.

0 Kudos
Altera_Forum
Honored Contributor II
389 Views

The synthesisor will also auto generate code into syncrams without you realising, or pack common logic together that you didnt realise was common. Shift registers are a common example. You can stop the synthesisor doing this via settings or instance assignments in the qpf, but usually this may only be neccesary for tight timing requirements.

0 Kudos
Altera_Forum
Honored Contributor II
389 Views

Thanks guys... 

 

I appreciate your replies. So is there any other way I can measure the area of the design? I was just trying to replace RAM s by LE s so that I have a common unit for measurement. Now area = no. of LEs + no. of BRAM s . How else can I compare area of my designs ? Kindly suggest me if yo have any ideas...
0 Kudos
Altera_Forum
Honored Contributor II
389 Views

Why do you want to? Some designs use up a lot of logic, some a lot of memory and some a lot of multipliers. If you migrate to a different family these numbers may change because of differences in architecture. Converting everything to LEs is meaningless (why would I use LEs when I have memories/DSPs available). 

 

You just list you project in N LEs, memories and DSP blocks, and you can carry it accross the family. The compiler will give you a % total used for each.
0 Kudos
Reply