赛灵思
直播中

王林

7年用户 192经验值
私信 关注
[问答]

对BRAM块使用感到困惑

我正在使用ISE 14.7。
我有一个测试项目。
在XPS中,它有一个bram_block,其中两个端口用于dlmb_port,ilmb_port用于micrlaze处理器。
最初,使用XPS中的“系统组件视图”的“地址”选项卡将bram_block设置为64K。
问题一:这个字节还是32位字?
在导航器中,在生成比特流之后,我看到一个摘要说明使用的RAMB16BWER数量是32个中的32个,使用100%。
RAMB16BWER的Doc说它是18Kb。
其中32个是576Kb。
这似乎与微纤维的64K使用不一致,微博是64Kb或256Kb,这取决于上面问题1的答案。
因此,在System Assemlby View的Addresses选项卡上的XPS中,我将bram_block大小更改为8K并再次生成地址。
接下来,在导航器中再次构建比特流时,使用的RAMB16BWER数量减少到32个中的4个,使用12%。
这似乎不一致。
这减少了28个街区。
如果一个块是18Kb,那么减少504Kb。
但是在XPS中,当我将大小从64K缩小到8K时,56K的减少量应该是56Kb或224Kb,这也取决于问题1的答案。
这是怎么回事?
问题二:如何正确计算此ram块的使用情况?
显然,这些知识对于内存使用规划是必要的。
非常感谢,
赫尔穆特

以上来自于谷歌翻译


以下为原文

I'm using ISE 14.7.  

I have a test project.  In XPS, it has a single bram_block with two ports for dlmb_port and ilmb_port for the microblaze processor.

Initially, the bram_block is set to 64K using the Addresses tab of the System Assembly View in XPS.  QUESTION ONE: Is this bytes or 32-bit words?

In the navigator, after generating the bitstream, I see a summary saying that the number of RAMB16BWERs used is 32 out of 32 available, using 100%.  Doc for RAMB16BWER says it's 18Kb.  32 of them makes 576Kb.  That already seems inconsistent with the 64K usage for microblaze, which is either 64Kb or 256Kb, depending on the answer to question one above.

So in XPS on the Addresses tab of the System Assemlby View, I change the bram_block size to 8K and generate addresses again.

Next, in navigator afer building the bitstream again, the number of RAMB16BWERs used reduces to 4 out of 32 available, using 12%.  Again this seems inconsistent.  That's a reduction of 28 blocks.  If a block is 18Kb, then that's a reduction of 504Kb.  But in XPS when I reduced size from 64K to 8K, that reduction of 56K should be either 56Kb or 224Kb, again depending on the answer to question one.

What's up? QUESTION TWO: How do I properly count up this ram block usage?  Obviously, this knowledge is necessary for memory usage planning.

Thanks very much,
Helmut

回帖(3)

吕聪

2018-10-25 15:29:55
你好赫尔穆特,
XPS中显示的大小是KiloBytes,而一个BRAM的大小是以KiloBits给出的。
64千字节的数据= 512千比特。
理论上这意味着使用28.4个BRAM块。
然而,似乎BRAM使用16Bit宽度而不是18,这导致32个BRAM块(32x16Kilobits)。
如果将大小减小到8千字节,则需要64千比特的BRAM,从而导致使用4个BRAM块。
我希望有所帮助
问马库斯

以上来自于谷歌翻译


以下为原文

Hello Helmut,
 
The size shown in XPS is KiloBytes while the size of one BRAM is given in KiloBits.
 
64KiloBytes of Data = 512KiloBits. That would in theory mean usage of 28.4 BRAM blocks. However It seems like the BRAMs are used with 16Bit width instead of 18, which results in 32 BRAM blocks (32x16Kilobits).
 
If you reduce the size to 8KiloBytes you require 64Kilobits of BRAM resulting in 4 BRAM blocks being used.
 
I hope that helps
 
Regards Markus
举报

邝计嘉

2018-10-25 15:46:49
马库斯,
我考虑了字节和单词,但不考虑位。
我之前写过:
“接下来,在导航器再次构建比特流时,使用的RAMB16BWER数量减少到32个中的4个,使用12%。再次这看起来不一致。这减少了28个块。如果一个块是18Kb,那么这是一个减少
但在XPS中,当我将尺寸从64K缩小到8K时,56K的减少量应该是56Kb或224Kb,这也取决于问题一的答案。“
重新计算,这减少了28个街区。
那么一个块是一个微不足道的18K位?
这是18位宽?
这是18位宽的1K字。
使用16位宽,每个块仍然只有1K字。
因此,对于16位字,减少28个块意味着减少28K字的使用。
同时,导致这种情况的变化是微型电池使用的存储器从64K减少到8K。
这减少了56K。
嗯......减少56K字节,这是28K字,每个16位?
不甘心!
请确认!因此即使bram_block将用作16位字,其大小也以字节为单位指定。
(这通常是业内的情况。)(之前我没有区分“KB”和“Kb”。它很微妙。而且“Kb”非常小)
如果这一切都是真的,那么:
在XPS(地址选项卡)中为dmlb_cntlr和ilmb_cntlr指定的微光泽内存使用情况在K BYTES中。
(建议:标题澄清可能会有所帮助。)
大小为9Kb和18Kb的bram_blocks(至少对于Spartan 6来说)是BITS,而不是BYTES。
此外,它们是18位字,在使用16位字时将未充分利用。
实际上,对于任何字大小(10位或更多位,我怀疑),它们的大小只有512和1K字。
如果我的LX16只有32个18Kb块,那么可以说它只有32K字,每个16位,我们可能称之为64K字节。
这很小!
(坏幽默)现在让我们弄清楚那些K是kibi还是公斤...我很确定它们实际上是kibi,1024,而不是千,1000. 64KiB总计。

以上来自于谷歌翻译


以下为原文

Markus,
 
I considered bytes and words, but not bits.
 
I previously wrote:
"Next, in navigator afer building the bitstream again, the number of RAMB16BWERs used reduces to 4 out of 32 available, using 12%.  Again this seems inconsistent.  That's a reduction of 28 blocks.  If a block is 18Kb, then that's a reduction of 504Kb.  But in XPS when I reduced size from 64K to 8K, that reduction of 56K should be either 56Kb or 224Kb, again depending on the answer to question one."
 
Recalculating, that's a reduction of 28 blocks.  So one block is a paltry 18K bits?  And that's 18 bits wide?  So that's 1K words at 18 bits wide.  Using at 16 bits wide, that's still only 1K words... per block.  So the reduction of 28 blocks means a reduction of 28K words usage, for 16 bit words.
 
Meanwhile, the change causing this was a reduction from 64K to 8K for the memory used by microblaze.  That's a reduction of 56K.  Hmmm...  Is that a reduction of 56K bytes, which is 28K words of 16 bits each?  Reconciled!  Please confirm! So even though the bram_block is going to be used as 16-bit words, its size is specified in bytes.  (This is often the case in the industry.)  (I didn't differentiate between "KB" and "Kb" before.  It's subtle.  And as "Kb" it's VERY SMALL)
 
If all that's true, then:
 

  • The microblaze memory usage specified in XPS (Addresses tab) for dmlb_cntlr and ilmb_cntlr is in K BYTES.  (Suggestion: A heading clarification might help.)
  • The bram_blocks of size 9Kb and 18Kb (for the Spartan 6 at least) are BITS, not BYTES.  Furthermore, they're 18-bit words that will be underutilized when using 16-bit words.  In reality, they're simply 512 and 1K words in size, for any word size (of 10 or more bits, I suspect).

  • If my LX16 has only 32 of the 18Kb blocks, then one could say it only has 32K words of 16-bits each, which we might call 64K bytes.  That's pretty darned small!
(Bad Humor) Now let's figure out if those K's are kibi or kilo...  I'm pretty sure they're in fact kibi, for 1024, and not kilo, for 1000.  64KiB total.
举报

吕聪

2018-10-25 15:56:08
你好赫尔穆特,
“是”是您所有问题的答案。
关心马库斯

以上来自于谷歌翻译


以下为原文

Hello Helmut,
 
"Yes" is the answer to all your questions.
 
Regards markus
举报

更多回帖

发帖
×
20
完善资料,
赚取积分