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

EPCS Memory size calculation

Altera_Forum
Honored Contributor II
2,084 Views

I'm designing with cyclone4. 

 

How to determine the size of the EPCS to be used ? 

 

Do the size of EPCS depend on LEs ? 

 

Which FPGA parameters are associated with Memory size of EPCS ?
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
414 Views

Hi Optcom, 

 

the Cyclone V device handbook lists the approximate sizes of the uncompressed bitstreams in section "Configuration Requirement". 

 

The uncompressed size should actually be fixed, I mean each configuration register in the FPGA requires a bit of data, which is why frankly I don't understand why Altera only states the "approximate" size. I suspect that some header or footer bits might be dynamic, but I doubt that's more than a few bytes of difference. 

 

Anyway, one thing you don't want is that you re-synthesize your design and it doesn't fit into the flash any more, so just make sure your flash is big enough for the uncompressed file stream. 

 

You can generate compressed file streams, but as it is with lossless compression, there's no guarantee about the target file size. I suspect compressed files are always quite small, as every FPGA design contains a lot of empty, and therefore equally configured, LEs, but I would not count on that. 

 

Some numbers for you: I've got an EP4CE40 (Cyclone IV) in my current design. 49% of the LEs are utilized, so you can say that the remaining 51% are configured equally, which should yield a nice compression ratio. The datasheet says that the FPGA required 9.534 MBit of config memory. If I create an uncompressed .rpd-file (raw programming data, can be directly flashed into the EPCQ), I get around 9.534 MBit of data (the rest is 0xFF, i.e. unprogrammed flash cells), whereas a compressed .rpd-file has around 3.495 MBit of data. 

 

BTW., I'm using an EPCQ with 16 MBit. I use the remaining unused flash cells to store a serial number and other stuff. The FPGA doesn't care that the data beyond its config data is programmed with other data (for all I know that's not stated in the datasheet, I just figured out it works, and would have been terribly surprised if it wouldn't have). 

 

 

Best regards, 

GooGooCluster
0 Kudos
Altera_Forum
Honored Contributor II
414 Views

Refer to table 8-2 - Configuration File Size - on page 8-4 of the 'configuration and remote system upgrades in cyclone iv devices (https://www.altera.com/content/dam/altera-www/global/en_us/pdfs/literature/hb/cyclone-iv/cyiv-51008.pdf)' chapter of the handbook. 

 

Cheers, 

Alex
0 Kudos
Altera_Forum
Honored Contributor II
414 Views

I've used the area beyond the configuration data to store software and data for a NIOS soft core processor.

0 Kudos
Altera_Forum
Honored Contributor II
414 Views

Thunk you. It is very detailed.

0 Kudos
Reply