Article Details

ID: 3514
Case Type: faq
Category: Device Programming
Related To: Diamond Programmer
Family: LatticeECP3

Search Answer Database

Search Text Image

Why is there a difference in the bitstream file size witha small logic modification in LatticeECP3?

The bitstream file size
increases even with a small modification.

The bitstream comprises both fuse data frames (SRAM
configuration bits) and EBR initialization information. Fuse data frame size
is fixed for the given device irrespective of how huge is the logic. But
the EBR configuration information size can vary; this depends on the number of
EBR used.

In customer case, the portion of the code customer is
commenting is DP_RAM, which uses EBR for its implementation. So, with
DP_RAM enabled, the bitstream increases, because in such case the bitstream has EXTRA EBRs initialization information as
compared to without DP_RAM.

In the example bitstream
files (converted these bitstream into *.txt files for analysis
purpose). Line 5669 of both text files show that fuse
data frame size is same in both cases.

EBR initialization information starts from line 5676, the one with DP_RAM enabled has more EBRs this
is the reason for variation in size of the bitstream.

The calculation below illustrates this:

This DP_RAM uses 3 extra EBRs, and each EBR size is 16 Kbits.

= ((16 * 1024) / 8) *3 -- gives the total number
of bytes used by the DP_RAM

= 6144 Bytes

= (6144 /1024) -- to convert to Kbytes

= 6 KB

So, if we add this value to the bitstream size
with the one DP_RAM disabled (2407 KBs), we get approximately 2414KB.