FPGARelated.com
Forums

BRAM utilization - how to calculate

Started by Jack February 8, 2005
dear all

I have a question about calculating a BRAM utilzation.

I am using XC2VP30 and data sheet says

-----------------------------
    Block SelectRAM+
-----------------------------
18kb Blocks | Max. BRAM (kb)
-----------------------------
136         | 2448
-----------------------------

and in my MHS file, BRAM is specified as

-----------------------------
...
BEGIN lmb_bram_if_cntlr  # 64 kb
 PARAMETER C_BASEADDR = 0x00000000
 PARAMETER C_BASEADDR = 0x0000ffff
 BUS_INTERFACE SLMB = ilmb
...
END

BEGIN lmb_bram_if_cntlr # 64 kb
 PARAMETER C_BASEADDR = 0x00000000
 PARAMETER C_BASEADDR = 0x0000ffff
 BUS_INTERFACE SLMB = dlmb
...
END
-----------------------------

as far as I understand, the BRAM utilization should be

(64 + 64 ) kb / 2448 kb = 5.3 %

But log file says

-----------------------------
Device utilization summary

Number of Block RAMs  : 32 out of 136   23%
...
-----------------------------

I understand this as a NUMBER of BLOCKS out of total NUMBER of BLOCKS.
Anyway, the memory utilization is very low.

Questions are
- Is my understanding correct ?
- How can we utilize more efficiently ?

Thankyou and thankyou for previous Q & A too.

"Jack" <JEmoderatz@yahoo.com> schrieb im Newsbeitrag
news:1107883607.877297.20670@z14g2000cwz.googlegroups.com...
> dear all > > I have a question about calculating a BRAM utilzation. > > I am using XC2VP30 and data sheet says > > ----------------------------- > Block SelectRAM+ > ----------------------------- > 18kb Blocks | Max. BRAM (kb) > ----------------------------- > 136 | 2448 > -----------------------------
Kbits !!
> > and in my MHS file, BRAM is specified as > > ----------------------------- > ... > BEGIN lmb_bram_if_cntlr # 64 kb > PARAMETER C_BASEADDR = 0x00000000 > PARAMETER C_BASEADDR = 0x0000ffff > BUS_INTERFACE SLMB = ilmb > ... > END > > BEGIN lmb_bram_if_cntlr # 64 kb > PARAMETER C_BASEADDR = 0x00000000 > PARAMETER C_BASEADDR = 0x0000ffff > BUS_INTERFACE SLMB = dlmb > ... > END > ----------------------------- > > as far as I understand, the BRAM utilization should be > > (64 + 64 ) kb / 2448 kb = 5.3 %
NO 64 KByte ! the ilmb and dlmb use A and B ports of the same 64KByte block
> Number of Block RAMs : 32 out of 136 23%
correct 32 brams, each 2KB = 64Kb when counting bits each bram has 18bits so 2 bits are wasted, so the bit percent will differ a little Antti
Each BRAM has 18kbit of memory
136 BRAM has 136*18kbit = 2448 kbit (not kbyte)

64 kbyte of memory is requiring 32 BRAMs (each BRAM has 2 kbyte of memory)

So 64 kbyte of memory is requiring 32 BRAMs which is 32/136 = 23% of the 
available BRAMs

G&#4294967295;ran


Jack wrote:
> dear all > > I have a question about calculating a BRAM utilzation. > > I am using XC2VP30 and data sheet says > > ----------------------------- > Block SelectRAM+ > ----------------------------- > 18kb Blocks | Max. BRAM (kb) > ----------------------------- > 136 | 2448 > ----------------------------- > > and in my MHS file, BRAM is specified as > > ----------------------------- > ... > BEGIN lmb_bram_if_cntlr # 64 kb > PARAMETER C_BASEADDR = 0x00000000 > PARAMETER C_BASEADDR = 0x0000ffff > BUS_INTERFACE SLMB = ilmb > ... > END > > BEGIN lmb_bram_if_cntlr # 64 kb > PARAMETER C_BASEADDR = 0x00000000 > PARAMETER C_BASEADDR = 0x0000ffff > BUS_INTERFACE SLMB = dlmb > ... > END > ----------------------------- > > as far as I understand, the BRAM utilization should be > > (64 + 64 ) kb / 2448 kb = 5.3 % > > But log file says > > ----------------------------- > Device utilization summary > > Number of Block RAMs : 32 out of 136 23% > ... > ----------------------------- > > I understand this as a NUMBER of BLOCKS out of total NUMBER of BLOCKS. > Anyway, the memory utilization is very low. > > Questions are > - Is my understanding correct ? > - How can we utilize more efficiently ? > > Thankyou and thankyou for previous Q & A too. >