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

Remote update EPCS file format?(rpd or rbf)

Altera_Forum
Honored Contributor II
5,477 Views

I have a Cyclone III EP3C5 design that uses an EPCS4 device in AS mode for remote system update. my question: what file format am I supposed to use when downloading a new application configuration into the EPCS16?.rpd or .rbf or else? 

Please help. 

 

Thanks a lot in advance
0 Kudos
13 Replies
Altera_Forum
Honored Contributor II
3,279 Views

.rbf 

 

But make sure you use the correct bit order. 

In some applications you need to flip the bits like this: 

out_byte[7] <= inByte[0]; 

out_byte[6] <= inByte[1]; 

out_byte[5] <= inByte[2]; 

out_byte[4] <= inByte[3]; 

out_byte[3] <= inByte[4]; 

out_byte[2] <= inByte[5]; 

out_byte[1] <= inByte[6]; 

out_byte[0] <= inByte[7];
0 Kudos
Altera_Forum
Honored Contributor II
3,279 Views

i am afraid i have to disagree. RPD is the correct format. it is already bit reversed.

0 Kudos
Altera_Forum
Honored Contributor II
3,279 Views

If you are using srunner software then rpd is the obvious choice. But I wrote my own drivers from scratch and just used the rbf file because it was lying around on the disk. And yes, I had to bit reverse the bytes for use by the altera altasmi_parallel megafunction. Watch that one! 

 

Nick
0 Kudos
Altera_Forum
Honored Contributor II
3,279 Views

use the .rbf file and write it into your flash reversing the bits of each byte.  

 

The .rbf file can be generated at build time, but its up to you to write it into flash correctly.
0 Kudos
Altera_Forum
Honored Contributor II
3,279 Views

Where can I find the rbf format definition

0 Kudos
Altera_Forum
Honored Contributor II
3,279 Views

Hmmm not sure I ever found a definition, which is why I had to find out the hard way that the bits are in reverse order with respect to the way the serial flash is programmed. But viewing with a hex editor, it just seems to be what it's name suggests: a binary config file (compressed if you have compression enabled). There are some bytes at the top that never change - some kind of header.

0 Kudos
Altera_Forum
Honored Contributor II
3,279 Views

I did it as amilcar (http://www.alteraforum.com/forum/member.php?u=27697) said,it works, thanks a lot.

0 Kudos
Altera_Forum
Honored Contributor II
3,279 Views

RBF file is encrypted, isn't it? Then, how can you write its content in EPCS?

0 Kudos
Altera_Forum
Honored Contributor II
3,279 Views

RBF file is not encrypted,i wrote it to EPCS use I2c bus of CPU through FPGA,using remote configeration core in FPGA.

0 Kudos
Altera_Forum
Honored Contributor II
3,279 Views

lanliang714 

 

I have made the settings in 'device and pin' settings in Quartus for rbf file genaration and compiled the design. Quartus have generated the .rbf file. When I open this .rbf file in Quartus editor, its contents are all symbols. Is it a problem of Quartus Licence? Which Quartus are you using? I am using Quartus II 12.0 sp2. Thanks.
0 Kudos
Altera_Forum
Honored Contributor II
3,279 Views

I use quartus 9.0&#65292;same as you&#65292;i just see symbols ,that‘s doesn't matter

0 Kudos
Altera_Forum
Honored Contributor II
3,279 Views

Then what did you write into EPCS? How did you applied bit-reversal to each byte before writing into EPCS? You mentioned that you used I2C, so you must had some byte to transfer. You can't transfer symbols. I think you might be reading the file in some way and that's why you didn't bother about the contents of the file. How did you do that?

0 Kudos
Altera_Forum
Honored Contributor II
3,279 Views

i think you make this too complicated,CPU deliver the .rbf file without any change, 

i did bit-reversal in fpga as foll 

assign d_to_E[0] = data_to_EPCS[7]; 

assign d_to_E[1] = data_to_EPCS[6]; 

assign d_to_E[2] = data_to_EPCS[5]; 

assign d_to_E[3] = data_to_EPCS[4]; 

assign d_to_E[4] = data_to_EPCS[3]; 

assign d_to_E[5] = data_to_EPCS[2]; 

assign d_to_E[6] = data_to_EPCS[1]; 

assign d_to_E[7] = data_to_EPCS[0];
0 Kudos
Reply