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

problems about EPCS devices' storage format

Altera_Forum
Honored Contributor II
1,942 Views

Hi! 

I have a problems about EPCS devices.I want to make a document about EPCS devices' storage format, where could I find any references?what is the EPCS storage format?
0 Kudos
9 Replies
Altera_Forum
Honored Contributor II
439 Views

Is this what you are looking for: 

http://www.altera.com/literature/hb/cfg/cyc_c51014.pdf 

 

Jake
0 Kudos
Altera_Forum
Honored Contributor II
439 Views

Thanks Jake! 

But this document I have read don't have more informations about storage format.I want to know more such as the timing diagram, file format, how to store file and how to convert,because I will use MCU to connect EPCS.
0 Kudos
Altera_Forum
Honored Contributor II
439 Views

The document I gave you has the timing diagram. The EPCS devices are nothing more than serial flash devices which Altera purchases from Numonyx (used to be STMicro) and rebrands with the Altera name. The flash has no concept of files systems or anything like that. File systems would be handled inside your MCU. With flash you have the concept of blocks and pages. This is all detailed in the document I gave you. Truly, there is no further knowledge to be had about the EPCS device itself. Just a flash device. 

 

Jake
0 Kudos
Altera_Forum
Honored Contributor II
439 Views

Hi Jake, 

Do you mean I can use SPI flash timing diagram? And the file could be handled in MCU? But is there no need to convert that the EPCS can identify? What is the file format?
0 Kudos
Altera_Forum
Honored Contributor II
439 Views

I didn't previously answer your post, because I didn't understand what actually meant with storage format respectively file format. Unfortunately, it's still unclear after all. 

 

Yes, Altera EPCS is compatible with industry standard SPI flash. This is also obvious from the Altera data sheets. Respective types with same ID have been used as a replacement by other users, as reported in the forum before. 

 

For configuration purposes, the binary bitstream, as contained in the *.rbf file must be programmed to the SPI flash. But the bit order is LSB first, as specified in the AS configuration scheme documents. If I remember right, I have mentioned this fact also in response to one of your previous same topic posts.  

 

So, which problem is actually left?
0 Kudos
Altera_Forum
Honored Contributor II
439 Views

Hello, Altera Guru, 

My mainly problem is: as many documents said,connect with configure device, there always use JTAG or some others, but I wll use MCU to connect with it, this don't have any method and documents for me to consult,so the timing diagram or file format etc. is hard for me to do. I must to make a particular plan which can help our team to do this project. 

Thanks for your help! suggestions please!
0 Kudos
Altera_Forum
Honored Contributor II
439 Views

Does your MCU have an SPI interface? In that case you can directly connect it to the flash and program it that way.

0 Kudos
Altera_Forum
Honored Contributor II
439 Views

You need a SPI interface at your CPU (hard- or software) and you need to tri-state the FPGA lines driving the EPCS during CPU access by pulling nCE high. That's the hardware side. 

 

For the software side, you write the *.rbf content to the SPI flash starting at sector 0. As said, the bit order has to be reversed compared to the usual SPI format. 

 

In addition, there's an Altera srunner project with source code for EPCS programming. As another hint, if you have doubts about data bit order, "file formats" and such, you can also read back a correctly programmed EPCS device from your CPU and compare to the original configuration files. I take for granted, that you have at least an operational JTAG interface in your target hardware, so every information is at your fingertips.
0 Kudos
Altera_Forum
Honored Contributor II
439 Views

Thanks a lot! I will try!

0 Kudos
Reply